Index: /trunk/BazaReklamSetup/BazaReklamSetup.vdproj
===================================================================
--- /trunk/BazaReklamSetup/BazaReklamSetup.vdproj (revision 981)
+++ /trunk/BazaReklamSetup/BazaReklamSetup.vdproj (revision 998)
@@ -82,4 +82,10 @@
         "Entry"
         {
+        "MsmKey" = "8:_61EDB5BB1F4F4436A7DDA1B9B3025B3D"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_65508AB999A44FC7909AAE84E5BD5F45"
         "OwnerKey" = "8:_UNDEFINED"
@@ -95,10 +101,4 @@
         {
         "MsmKey" = "8:_78F7FF4DBAE741BDB144A21AB75A662F"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_90355BBD5BDA4A8FB195EB7C7A954ADA"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -410,4 +410,24 @@
             "IsolateTo" = "8:"
             }
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_61EDB5BB1F4F4436A7DDA1B9B3025B3D"
+            {
+            "SourcePath" = "8:..\\BazaReklam\\Resources\\br.ico"
+            "TargetName" = "8:br.ico"
+            "Tag" = "8:"
+            "Folder" = "8:_A71B9F4A6F7A4846B9A8121692FB34D3"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            }
             "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6C6DB793A8DA3CF4F3943CD8BBC6D521"
             {
@@ -441,24 +461,4 @@
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_90355BBD5BDA4A8FB195EB7C7A954ADA"
-            {
-            "SourcePath" = "8:..\\BazaReklam\\cab.ico"
-            "TargetName" = "8:cab.ico"
-            "Tag" = "8:"
-            "Folder" = "8:_A71B9F4A6F7A4846B9A8121692FB34D3"
-            "Condition" = "8:"
-            "Transitive" = "11:FALSE"
-            "Vital" = "11:TRUE"
-            "ReadOnly" = "11:FALSE"
-            "Hidden" = "11:FALSE"
-            "System" = "11:FALSE"
-            "Permanent" = "11:FALSE"
-            "SharedLegacy" = "11:FALSE"
-            "PackageAs" = "3:1"
-            "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
-            "IsolateTo" = "8:"
-            }
             "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CC2D346B584D9209A0B0C23E19E16393"
             {
@@ -573,4 +573,5 @@
         {
         "LangId" = "3:0"
+        "RequiresElevation" = "11:FALSE"
         }
         "Product"
@@ -578,6 +579,6 @@
         "Name" = "8:Microsoft Visual Studio"
         "ProductName" = "8:Baza Reklam"
-        "ProductCode" = "8:{0553529D-70F2-40D5-9ED7-0DAB681B62BB}"
-        "PackageCode" = "8:{F7CFD8B8-FE02-4E5C-9665-28F5691FBC7C}"
+        "ProductCode" = "8:{4B16CA46-93C5-463C-B503-24C98C651B53}"
+        "PackageCode" = "8:{68299E18-89FE-42F3-8661-61DCD67F0F45}"
         "UpgradeCode" = "8:{4E2DBBA4-3139-4790-8DDB-7AADFC963A7D}"
         "RestartWWWService" = "11:FALSE"
@@ -585,5 +586,5 @@
         "DetectNewerInstalledVersion" = "11:TRUE"
         "InstallAllUsers" = "11:TRUE"
-        "ProductVersion" = "8:1.2.8"
+        "ProductVersion" = "8:1.2.10"
         "Manufacturer" = "8:AACT"
         "ARPHELPTELEPHONE" = "8:"
@@ -709,5 +710,5 @@
             "Folder" = "8:_3EC045D247324FEAAAFA23650D200DFD"
             "WorkingFolder" = "8:_A71B9F4A6F7A4846B9A8121692FB34D3"
-            "Icon" = "8:_90355BBD5BDA4A8FB195EB7C7A954ADA"
+            "Icon" = "8:_61EDB5BB1F4F4436A7DDA1B9B3025B3D"
             "Feature" = "8:"
             }
@@ -723,5 +724,5 @@
             "Folder" = "8:_9BF0E65BEA7A4F3680D59A772BB53D46"
             "WorkingFolder" = "8:_A71B9F4A6F7A4846B9A8121692FB34D3"
-            "Icon" = "8:_90355BBD5BDA4A8FB195EB7C7A954ADA"
+            "Icon" = "8:_61EDB5BB1F4F4436A7DDA1B9B3025B3D"
             "Feature" = "8:"
             }
@@ -1182,7 +1183,4 @@
             }
         }
-        "VJSharpPlugin"
-        {
-        }
     }
 }
Index: /trunk/BazaReklam/OrderDetails.cs
===================================================================
--- /trunk/BazaReklam/OrderDetails.cs (revision 936)
+++ /trunk/BazaReklam/OrderDetails.cs (revision 998)
@@ -306,8 +306,12 @@
             Cursor = Cursors.WaitCursor;
 
-            SaveChanges();
-
+            if (!SaveChanges())
+            {
+                Cursor = Cursors.Default;
+                return;
+            }
+
+            Cursor = Cursors.Default;
             MessageBox.Show("Zmiany zapisane");
-            Cursor = Cursors.Default;
         }
 
@@ -322,13 +326,35 @@
             Cursor = Cursors.WaitCursor;
 
-            SaveChanges();
-
+            if (!SaveChanges())
+            {
+                Cursor = Cursors.Default;
+                return;
+            }
+
+            Cursor = Cursors.Default;
             MessageBox.Show("Zmiany zapisane");
-            Cursor = Cursors.Default;
             Close();
         }
 
-        private void SaveChanges()
-        {
+        private bool SaveChanges()
+        {
+            if (SelectedModule == null)
+            {
+                MessageBox.Show("Baza reklam", "Wybierz modu³ reklamy!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return false;
+            }
+
+            if (SelectedTitle == null)
+            {
+                MessageBox.Show("Baza reklam", "Wybierz tytu³!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return false;
+            }
+
+            if (SelectedSection == null)
+            {
+                MessageBox.Show("Baza reklam", "Wybierz sekcjê!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return false;
+            }
+
             Reklama.MOD_TYP = SelectedModule.Name;
             Reklama.TYTU£ = SelectedTitle.ShortName;
@@ -377,5 +403,5 @@
                 MessageBox.Show("Zosta³a zmieniona opcja wyró¿nienia. Zamówienie nale¿y ponownie przeliczyæ");
                 Cursor = Cursors.Default;
-                return;
+                return false;
             }
 
@@ -400,4 +426,6 @@
 
             ukazeSieDataGridView.Sort(ukazeSieDataGridView.Columns[0], ListSortDirection.Ascending);
+
+            return true;
         }
 
@@ -406,5 +434,6 @@
             foreach (REKLAMADataSet.UKAZE_SIE_W_NRRow emisja in emisje.Rows)
             {
-                if (emisja.IsidFakturyNull()) return true;
+                if (emisja.IsidFakturyNull())
+                    return true;
             }
 
@@ -531,5 +560,6 @@
                 }
 
-                if (r.ReadOnly && r.DefaultCellStyle.BackColor == Color.MintCream) continue;
+                if (r.ReadOnly && r.DefaultCellStyle.BackColor == Color.MintCream)
+                    continue;
 
                 foreach (DataGridViewRow s in ukazaloSieDataGridView.Rows)
@@ -739,4 +769,10 @@
                 rEKLAMABindingSource.EndEdit();
             }
+#if DEBUG
+            else
+            {
+                MessageBox.Show("Przelicz()\n.Co jest null!");
+            }
+#endif
 
         }
@@ -906,6 +942,4 @@
             rEKLAMA_STRONATableAdapter.FillByReklamaId(rEKLAMADataSet.REKLAMA_STRONA, reklamaId);
             uKAZE_SIE_W_NRTableAdapter.FillByReklamaId(rEKLAMADataSet.UKAZE_SIE_W_NR, reklamaId);
-            
-
 
             //Set ComboBox selected item
@@ -1492,5 +1526,4 @@
             rEKLAMABindingSource.EndEdit();
             PrzeliczCaleZamowienie();
-
         }
 
@@ -1740,5 +1773,4 @@
             if (SelectedModule == null) return;
 
-
             txtTotalModuleAmount.Text =
                     ReCaluculateModuleAmount(txtHorizontal.Text, txtVertical.Text).ToString();
@@ -1831,5 +1863,5 @@
             Debug.WriteLine(string.Format("Event: {0}", "txtVertical_Validating"));
 
-            if ((SelectedNavigationColumn != null) && (SelectedTitle != null))
+            if (SelectedNavigationColumn != null && SelectedTitle != null)
             {
                 NavigationColumnRepository navigationColumnRepository =
Index: /trunk/BazaReklam/OrdersForm.cs
===================================================================
--- /trunk/BazaReklam/OrdersForm.cs (revision 996)
+++ /trunk/BazaReklam/OrdersForm.cs (revision 998)
@@ -976,20 +976,5 @@
         private void reklamaDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
         {
-            if (reklamyZestawienieBindingSource.Current != null)
-            {
-                DataRowView row = (DataRowView)reklamyZestawienieBindingSource.Current;
-                int idRek = Int32.Parse(row["reklamaId"].ToString());
-
-
-                OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek);
-                DialogResult result = OrderDetails.getOrderDetails().ShowDialog();
-
-                if (result == DialogResult.OK)
-                {
-                    rEKLAMADataSet.ReklamyZestawienie.Clear();
-                    sqlDataAdapter.Fill(rEKLAMADataSet.ReklamyZestawienie);
-                }
-            }
-
+            EditReklama();
         }
 
@@ -1191,4 +1176,9 @@
         private void zamToolStripButton_Click(object sender, EventArgs e)
         {
+            EditReklama();
+        }
+
+        private void EditReklama()
+        {
             if (reklamyZestawienieBindingSource.Current != null)
             {
@@ -1197,5 +1187,9 @@
 
                 OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek);
-                OrderDetails.getOrderDetails().ShowDialog();
+                if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK)
+                {
+                    rEKLAMADataSet.ReklamyZestawienie.Clear();
+                    sqlDataAdapter.Fill(rEKLAMADataSet.ReklamyZestawienie);
+                }
             }
         }
Index: /trunk/BazaReklam/ZestawienieZamowienForm.cs
===================================================================
--- /trunk/BazaReklam/ZestawienieZamowienForm.cs (revision 791)
+++ /trunk/BazaReklam/ZestawienieZamowienForm.cs (revision 998)
@@ -226,5 +226,4 @@
         private void zamToolStripButton_Click(object sender, EventArgs e)
         {
-
             if (reklamyZestawienieBindingSource.Current != null)
             {
@@ -239,5 +238,4 @@
                 }
             }
-
         }
 
Index: /trunk/BazaReklam/Baza Reklam.csproj
===================================================================
--- /trunk/BazaReklam/Baza Reklam.csproj (revision 996)
+++ /trunk/BazaReklam/Baza Reklam.csproj (revision 998)
@@ -36,8 +36,9 @@
     <ProductName>Baza Reklam</ProductName>
     <PublisherName>AACT</PublisherName>
+    <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>index.htm</WebPage>
     <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
     <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.2.9.0</ApplicationVersion>
+    <ApplicationVersion>1.2.10.0</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>false</BootstrapperEnabled>
Index: /trunk/BazaReklam/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/BazaReklam/Properties/AssemblyInfo.cs (revision 996)
+++ /trunk/BazaReklam/Properties/AssemblyInfo.cs (revision 998)
@@ -30,3 +30,3 @@
 //
 [assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.2.9")]
+[assembly: AssemblyFileVersion("1.2.10")]
Index: /trunk/BazaReklam/ClientsForm.cs
===================================================================
--- /trunk/BazaReklam/ClientsForm.cs (revision 900)
+++ /trunk/BazaReklam/ClientsForm.cs (revision 998)
@@ -291,35 +291,26 @@
             if (rEKLAMABindingSource.Current == null) return;
 
+            DataRowView row = (DataRowView)rEKLAMABindingSource.Current;
+            int idRek = Int32.Parse(row["reklamaId"].ToString());
+            int custId = Int32.Parse(row["customerId"].ToString());
+
+            OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek);
+            if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK)
+            {
+                rEKLAMADataSet.REKLAMA.Clear();
+                rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId);
+            }
+        }
+
+        private void nowaButton_Click(object sender, EventArgs e)
+        {
+            if (kLIENCIBindingSource.Current == null) return;
+
             try
             {
                 Cursor = Cursors.WaitCursor;
-                DataRowView row = (DataRowView) rEKLAMABindingSource.Current;
-                int idRek = Int32.Parse(row["reklamaId"].ToString());
-                int custId = Int32.Parse(row["customerId"].ToString());
-
-                OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek);
-
-                if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK)
-                {
-                    rEKLAMADataSet.REKLAMA.Clear();
-                    rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId);
-                }
-            }
-            finally
-            {
-                Cursor = Cursors.Default;
-            }
-        }
-
-        private void nowaButton_Click(object sender, EventArgs e)
-        {
-            if (kLIENCIBindingSource.Current == null) return;
-
-            try
-            {
-                Cursor = Cursors.WaitCursor;
-
-                DataRowView row = (DataRowView) kLIENCIBindingSource.Current;
-                REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row;
+
+                DataRowView row = (DataRowView)kLIENCIBindingSource.Current;
+                REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow)row.Row;
 
                 if (klient.IskodKlientaNull())
@@ -392,5 +383,5 @@
                     finally
                     {
-                        if (cmd.Connection!=null)
+                        if (cmd.Connection != null)
                         {
                             cmd.Connection.Close();
@@ -411,5 +402,5 @@
                 Cursor = Cursors.WaitCursor;
 
-                DataRowView row = (DataRowView) rEKLAMABindingSource.Current;
+                DataRowView row = (DataRowView)rEKLAMABindingSource.Current;
                 int idRek = Int32.Parse(row["reklamaId"].ToString());
                 int custId = Int32.Parse(row["customerId"].ToString());
@@ -432,5 +423,5 @@
         {
             if (kLIENCIBindingSource.Current == null) return;
-            
+
             const string caption = "Klient - usuwanie klienta";
 
@@ -439,9 +430,9 @@
                                                         MessageBoxButtons.YesNo,
                                                         MessageBoxIcon.Question);
-            
+
             if (dialogResult != DialogResult.Yes) return;
 
 
-            DataRowView row = (DataRowView) kLIENCIBindingSource.Current;
+            DataRowView row = (DataRowView)kLIENCIBindingSource.Current;
             int custId = Int32.Parse(row["CustomerId"].ToString());
 
@@ -451,9 +442,9 @@
             {
 
-                dialogResult = MessageBox.Show("Istniej¹ dane (reklamy, osoby do kontaktu lub klasyfikacja klienta) zwi¹zane z klientem! Usun¹æ klienta?", 
+                dialogResult = MessageBox.Show("Istniej¹ dane (reklamy, osoby do kontaktu lub klasyfikacja klienta) zwi¹zane z klientem! Usun¹æ klienta?",
                                                 caption,
                                                MessageBoxButtons.YesNo,
                                                MessageBoxIcon.Question);
-                
+
                 if (dialogResult == DialogResult.Yes)
                 {
@@ -678,5 +669,5 @@
 
                                     rEKLAMADataSet.KLIENCI.Clear();
-                                    
+
                                     command.CommandText = "sp_GetClientsWithNoContact";
                                     command.CommandType = CommandType.StoredProcedure;
@@ -796,5 +787,5 @@
 
             sqlDataAdapter.Fill(rEKLAMADataSet.KLIENCI);
-            
+
             clientsDataGridView.Refresh();
 
@@ -809,6 +800,6 @@
         {
             if (rEKLAMABindingSource.Current == null) return;
-            
-            DataRowView row = (DataRowView) rEKLAMABindingSource.Current;
+
+            DataRowView row = (DataRowView)rEKLAMABindingSource.Current;
             int idReklamy = Convert.ToInt32(row["reklamaId"]);
             Facturer f = new Facturer(idReklamy);
@@ -817,5 +808,5 @@
             {
                 rEKLAMADataSet.REKLAMA.Clear();
-                DataRowView r = (DataRowView) kLIENCIBindingSource.Current;
+                DataRowView r = (DataRowView)kLIENCIBindingSource.Current;
                 int customerId = Int32.Parse(r["CustomerId"].ToString());
                 rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, customerId);
@@ -829,6 +820,6 @@
             if (rEKLAMABindingSource.Current == null) return;
 
-            DataRowView row = (DataRowView) rEKLAMABindingSource.Current;
-            REKLAMADataSet.REKLAMARow reklama = (REKLAMADataSet.REKLAMARow) row.Row;
+            DataRowView row = (DataRowView)rEKLAMABindingSource.Current;
+            REKLAMADataSet.REKLAMARow reklama = (REKLAMADataSet.REKLAMARow)row.Row;
 
             if (AdHelper.IsOgloszenie(reklama))
@@ -840,6 +831,6 @@
             {
                 ProjectForm pf = new ProjectForm(reklama.ReklamaID);
-            pf.ShowDialog();
-        }
+                pf.ShowDialog();
+            }
         }
 
@@ -984,5 +975,5 @@
             if (zestawienieFakturBindingSource.Current == null) return;
 
-            DataRowView row = (DataRowView) zestawienieFakturBindingSource.Current;
+            DataRowView row = (DataRowView)zestawienieFakturBindingSource.Current;
 
             //nie ma faktury
@@ -1096,5 +1087,5 @@
                 DataRowView r = datatable.AddNew();
                 kONTAKTYBindingSource.MoveLast();
-                
+
 
 
@@ -1105,5 +1096,5 @@
                 AddUpdateKontakt(r, custId);
 
-                
+
 
                 kONTAKTYBindingSource.EndEdit();
@@ -1119,5 +1110,5 @@
         {
             if (kONTAKTYBindingSource.Current == null) return;
-            
+
             if (MessageBox.Show("Czy na pewno chcesz usun¹æ rekord?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
             {
@@ -1132,5 +1123,5 @@
             if (rEKLAMABindingSource.Current == null) return;
 
-            DataRowView row = (DataRowView) rEKLAMABindingSource.Current;
+            DataRowView row = (DataRowView)rEKLAMABindingSource.Current;
             int idReklamy = Convert.ToInt32(row["reklamaId"]);
             int custId = Convert.ToInt32(row["customerId"]);
@@ -1147,6 +1138,6 @@
             if (rEKLAMABindingSource.Current == null) return;
 
-            DataRowView row = (DataRowView) rEKLAMABindingSource.Current;
-            REKLAMADataSet.REKLAMARow reklama = (REKLAMADataSet.REKLAMARow) row.Row;
+            DataRowView row = (DataRowView)rEKLAMABindingSource.Current;
+            REKLAMADataSet.REKLAMARow reklama = (REKLAMADataSet.REKLAMARow)row.Row;
 
             if (reklama.IsID_FAKTURYNull())
@@ -1186,5 +1177,5 @@
         {
             if (kLIENCIBindingSource.Current == null) return;
-            
+
             MessageBox.Show("Dane zapisano", "Klient");
         }
@@ -1269,5 +1260,5 @@
 
 
-                if (((REKLAMADataSet.KLIENCIRow)row.Row).IsCountryNull()) 
+                if (((REKLAMADataSet.KLIENCIRow)row.Row).IsCountryNull())
                     countryComboBox.SelectedIndex = -1;
 
@@ -1278,5 +1269,5 @@
         private void kryteriumWyszukiwania_KeyPress(object sender, KeyPressEventArgs e)
         {
-            if (e.KeyChar == 13) 
+            if (e.KeyChar == 13)
                 szukajToolStripButton.PerformClick();
         }
@@ -2264,5 +2255,5 @@
             ExcelHelper excelHelper = new ExcelHelper();
             excelHelper.Export(clientsDataGridView);
-            
+
             Cursor = Cursors.Default;
         }
@@ -2321,5 +2312,5 @@
         {
             if (kLIENCIBindingSource.Current == null) return;
-            
+
             try
             {
@@ -2329,5 +2320,5 @@
 
                 ZamowieniaForm zam = new ZamowieniaForm(klient);
-                zam.ShowDialog();                
+                zam.ShowDialog();
             }
             finally
@@ -2490,9 +2481,9 @@
             }
 
-           // if (idSubscription > 0  && gridSubscriptions.DataSource
+            // if (idSubscription > 0  && gridSubscriptions.DataSource
             List<Subscription> subscriptions = (List<Subscription>)gridSubscriptions.DataSource;
 
-            DataRowView row = (DataRowView) kLIENCIBindingSource.Current;
-            REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row;
+            DataRowView row = (DataRowView)kLIENCIBindingSource.Current;
+            REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow)row.Row;
 
             SubscriptionForm subscriptionForm = new SubscriptionForm(klient.CustomerID, subscript);
