Index: trunk/BazaReklam/ClientsForm.cs
===================================================================
--- trunk/BazaReklam/ClientsForm.cs (revision 470)
+++ trunk/BazaReklam/ClientsForm.cs (revision 483)
@@ -644,5 +644,5 @@
                                     command.CommandText += "left join dbo.KONTAKTY K2 on K.CustomerId = K2.CustomerID " +
                                         "left join dbo.AGENCI A on K.UserName = A.Symbol " +
-                                        "group by K.kodKlienta, K.CustomerID, K.FirstName, K.LastName, K.OrganizationName, " +
+                                        "group by K.AgentExpo, K.kodKlienta, K.CustomerID, K.FirstName, K.LastName, K.OrganizationName, " +
                                         "K.Address, K.City, K.State, K.PostalCode, K.Country, K.Nip, K.ContactName, K.PhoneNumber, K.FaxNumber," +
                                         "K.Note, K.data, K.Adres_Fkatura, K.Adres_Kor, K.Platnik_VAT, K.Aktywny,  " +
@@ -2071,11 +2071,8 @@
                     PaymentForm2 pf2;
                     if (Convert.IsDBNull(row["idWplaty"]))
-                    {
                         pf2 = new PaymentForm2(0, Convert.ToInt32(row["ID_FAKTURY"]));
-                    }
                     else
-                    {
                         pf2 = new PaymentForm2(Convert.ToInt32(row["idWplaty"]), Convert.ToInt32(row["ID_FAKTURY"]));
-                    }
+                    
                     if (pf2.ShowDialog() == DialogResult.OK)
                     {
@@ -2581,6 +2578,6 @@
         private void cbKontaktTyp_SelectedIndexChanged(object sender, EventArgs e)
         {
+            if (sender == null) return;
             if (((ToolStripComboBox)(sender)).ComboBox.SelectedItem is DataRowView || kLIENCIBindingSource.Current == null) return;
-
 
             rEKLAMADataSet.KONTAKTY.Clear();
