Index: branches/ReklamaReorganizacja/BazaReklam/OrderDetails.cs
===================================================================
--- branches/ReklamaReorganizacja/BazaReklam/OrderDetails.cs (revision 645)
+++ branches/ReklamaReorganizacja/BazaReklam/OrderDetails.cs (revision 646)
@@ -4,4 +4,5 @@
 using System.ComponentModel;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
 using System.Text;
@@ -113,4 +114,6 @@
         private OrderDetails()
         {
+            Debug.WriteLine(string.Format("Event: {0}", "Constructor"));
+            
             InitializeComponent();
 
@@ -179,4 +182,5 @@
         private void OrderDetails_Load(object sender, EventArgs e)
         {
+            Debug.WriteLine(string.Format("Event: {0}", "Form_Load"));
             wyroznienie_exportedCheckBox.Enabled = User.Instance().St_produkcja;
         }
@@ -187,28 +191,29 @@
         private void tYTULComboBox_SelectedIndexChanged(object sender, EventArgs e)
         {
-            if (obslugaZdarzen)
-            {
-                if (SelectedTitle != null)
-                {
-                    ComboBoxHelper.Bind(SelectedTitle.Sections, grzbietComboBox);
-                    if (SelectedTitle.Sections.Count > 1)
-                    {
-                        grzbietComboBox.Items.Insert(0, new Section(0, null, "--proszê wybraæ--"));
-                        if (SelectedTitle.Sections.Count != 0)
-                            grzbietComboBox.SelectedIndex = 0;
-                    }
-                    else if (SelectedTitle.Sections.Count == 1)
-                    {
+            if (!obslugaZdarzen) return;
+
+            Debug.WriteLine(string.Format("Event: {0}", "tYTULComboBox_SelectedIndexChanged"));
+
+            if (SelectedTitle != null)
+            {
+                ComboBoxHelper.Bind(SelectedTitle.Sections, grzbietComboBox);
+                if (SelectedTitle.Sections.Count > 1)
+                {
+                    grzbietComboBox.Items.Insert(0, new Section(0, null, "--proszê wybraæ--"));
+                    if (SelectedTitle.Sections.Count != 0)
                         grzbietComboBox.SelectedIndex = 0;
-                        ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox);
-
-                        if (SelectedSection.Modules.Count > 1)
-                            mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--"));
-                        if (SelectedSection.Modules.Count != 0)
-                            mOD_TYPComboBox.SelectedIndex = 0;
-                    }
-
-                    iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text;
-                }
+                }
+                else if (SelectedTitle.Sections.Count == 1)
+                {
+                    grzbietComboBox.SelectedIndex = 0;
+                    ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox);
+
+                    if (SelectedSection.Modules.Count > 1)
+                        mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--"));
+                    if (SelectedSection.Modules.Count != 0)
+                        mOD_TYPComboBox.SelectedIndex = 0;
+                }
+
+                iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text;
             }
         }
@@ -216,17 +221,17 @@
         private void grzbietComboBox_SelectedIndexChanged(object sender, EventArgs e)
         {
-            if (obslugaZdarzen)
-            {
-                if (SelectedSection == null) return;
-
-                ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox);
-                if (SelectedSection.Modules.Count > 1)
-                    mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--"));
-                if (SelectedSection.Modules.Count != 0)
-                    mOD_TYPComboBox.SelectedIndex = 0;
-
-                iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text;
-
-            }
+            if (!obslugaZdarzen) return;
+
+            Debug.WriteLine(string.Format("Event: {0}", "grzbietComboBox_SelectedIndexChanged"));
+            
+            if (SelectedSection == null) return;
+
+            ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox);
+            if (SelectedSection.Modules.Count > 1)
+                mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--"));
+            if (SelectedSection.Modules.Count != 0)
+                mOD_TYPComboBox.SelectedIndex = 0;
+
+            iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text;
         }
 
@@ -260,4 +265,6 @@
         private void ResetComboBoxes()
         {
+            Debug.WriteLine(string.Format("Event: {0}", "ResetComboBoxes"));
+
             tYTULComboBox.SelectedIndex = -1;
             cbLocation.SelectedIndex = 0;
@@ -283,4 +290,29 @@
             Cursor = Cursors.WaitCursor;
 
+            SaveChanges();
+
+            MessageBox.Show("Zmiany zapisane");
+            Cursor = Cursors.Default;
+        }
+
+        private void btnSaveClose_Click(object sender, EventArgs e)
+        {
+            if (!ValidateChildren())
+            {
+                MessageBox.Show("Proszê uzupe³niæ wymagane pola.");
+                return;
+            }
+
+            Cursor = Cursors.WaitCursor;
+
+            SaveChanges();
+
+            MessageBox.Show("Zmiany zapisane");
+            Cursor = Cursors.Default;
+            Close();
+        }
+
+        private void SaveChanges()
+        {
             Reklama.MOD_TYP = SelectedModule.Name;
             Reklama.TYTU£ = SelectedTitle.ShortName;
@@ -345,7 +377,4 @@
 
             ukazeSieDataGridView.Sort(ukazeSieDataGridView.Columns[0], ListSortDirection.Ascending);
-
-            MessageBox.Show("Zmiany zapisane");
-            Cursor = Cursors.Default;
         }
 
@@ -362,5 +391,5 @@
         private void promocjaComboBox_TextChanged(object sender, EventArgs e)
         {
-            if (!obslugaZdarzen || promocjaComboBox.Text != "" || rEKLAMABindingSource.Current == null) 
+            if (!obslugaZdarzen || !string.IsNullOrEmpty(promocjaComboBox.Text) || rEKLAMABindingSource.Current == null)
                 return;
             
@@ -377,5 +406,5 @@
                 (REKLAMADataSet.REKLAMARow) ((DataRowView) rEKLAMABindingSource.Current).Row;
 
-            sprawdzBledy();
+            SprawdzBledy();
 
             if (!User.Instance().St_kierownik && reklama.IsPROMOCJANull())
@@ -428,5 +457,5 @@
             obslugaZdarzen = true;
 
-            blokowanieZrealizowanychEmisji();
+            BlokowanieZrealizowanychEmisji();
 
             Zmiany();
@@ -441,5 +470,5 @@
                 rEKLAMAUKAZESIEWNRBindingSource.RemoveCurrent();
             }
-            blokowanieZrealizowanychEmisji();
+            BlokowanieZrealizowanychEmisji();
         }
 
@@ -459,5 +488,5 @@
         /// Blokuje emisje,które ju¿ siê ukaza³y.
         /// </summary>
-        private void blokowanieZrealizowanychEmisji()
+        private void BlokowanieZrealizowanychEmisji()
         {
             //  ukazeSieDataGridView.Enabled = true; 
@@ -487,5 +516,5 @@
 
 
-        public void zablokujGroupBoxa(GroupBox g)
+        public void ZablokujGroupBoxa(GroupBox g)
         {
             foreach (Control c in g.Controls)
@@ -503,5 +532,5 @@
         }
 
-        public void odblokujGroupBoxa(GroupBox g)
+        public void OdblokujGroupBoxa(GroupBox g)
         {
             foreach (Control c in g.Controls)
@@ -522,14 +551,14 @@
         /// Blokuje kontrolki zwi¹zane z danymi zamówienia
         /// </summary>
-        private void zablokujGroupBoxy()
-        {
-            zablokujGroupBoxa(groupBox1);
+        private void ZablokujGroupBoxy()
+        {
+            ZablokujGroupBoxa(groupBox1);
 
             if (!(User.Instance().St_produkcja | User.Instance().St_kierownik))
             {
-                zablokujGroupBoxa(groupBox2);
-            }
-            zablokujGroupBoxa(groupBox3);
-            zablokujGroupBoxa(groupBox4);
+                ZablokujGroupBoxa(groupBox2);
+            }
+            ZablokujGroupBoxa(groupBox3);
+            ZablokujGroupBoxa(groupBox4);
 
             //lokalizacje mo¿na zmieniaæ
@@ -541,10 +570,10 @@
         /// Odblokuje kontrolki zwi¹zane z danymi zamówienia
         /// </summary>
-        private void odblokujGroupBoxy()
-        {
-            odblokujGroupBoxa(groupBox1);
-            odblokujGroupBoxa(groupBox2);
-            odblokujGroupBoxa(groupBox3);
-            odblokujGroupBoxa(groupBox4);
+        private void OdblokujGroupBoxy()
+        {
+            OdblokujGroupBoxa(groupBox1);
+            OdblokujGroupBoxa(groupBox2);
+            OdblokujGroupBoxa(groupBox3);
+            OdblokujGroupBoxa(groupBox4);
         }
 
@@ -576,5 +605,5 @@
         /// Sprawdza poprawnoæ zamówienia... pewnie niekompletnie
         /// </summary>
-        private void sprawdzBledy()
+        private void SprawdzBledy()
         {
             if (ogl_dzialComboBox.SelectedValue == null)
@@ -617,5 +646,5 @@
         /// Przelicza wartoæ zamówienia.
         /// </summary>
-        private void przelicz()
+        private void Przelicz()
         {
             DataRowView row = (DataRowView)rEKLAMABindingSource.Current;
@@ -912,4 +941,6 @@
         public void WznowZamowienie(int rekId)
         {
+            Debug.WriteLine(string.Format("Event: {0}", "WznowZamowienie"));
+
             nowyRekord = true;
             bylyZmiany = false;
@@ -937,5 +968,5 @@
             newRow["WYS"] = oldRow["WYS"];
             newRow["MOD_TYP"] = oldRow["MOD_TYP"];
-            newRow["KROTNOÆ"] = oldRow["KROTNOÆ"];
+            newRow["KROTNOÆ"] = 0;
             newRow["ODSTÊP"] = oldRow["ODSTÊP"];
             newRow["KOLOR"] = oldRow["KOLOR"];
@@ -990,10 +1021,13 @@
             cbLocation.SelectedIndex = GetAdLocationIndex(Convert.ToInt32(newRow["AdLocationId"]));
 
-            if (Reklama.ogl_dzial > 0)
-            {
-                ogl_dzialComboBox.SelectedIndex = GetNavigationColumnIndex(Reklama.ogl_dzial);
-                if (Reklama.ogl_rozdzial > 0)
-                    ogl_rozdzialComboBox.SelectedIndex = GetNavigationSubColumnIndex(Reklama.ogl_rozdzial);
-            }
+            if (EnableModuleCount(SelectedModule))
+            {
+                ModuleCount moduleCount = GetModuleCount(SelectedModule, Reklama);
+                txtHorizontal.Text = moduleCount.Horizontal.ToString();
+                txtVertical.Text = moduleCount.Vertical.ToString();
+            }
+
+            sZERTextBox.Text = Reklama.SZER.ToString();
+            wYSTextBox.Text = Reklama.WYS.ToString();
 
             obslugaZdarzen = false;
@@ -1024,4 +1058,6 @@
         private void OrderDetails_FormClosing(object sender, FormClosingEventArgs e)
         {
+            Debug.WriteLine(string.Format("Event: {0}", "FormClosing"));
+
             if (nowyRekord)
             {
@@ -1080,13 +1116,13 @@
                 if (wystawionoFakture)
                 {
-                    zablokujGroupBoxy();
+                    ZablokujGroupBoxy();
                 }
                 else
                 {
-                    odblokujGroupBoxy();
-                }
-            }
-
-            blokowanieZrealizowanychEmisji();
+                    OdblokujGroupBoxy();
+                }
+            }
+
+            BlokowanieZrealizowanychEmisji();
         }
 
@@ -1330,5 +1366,5 @@
         private void ukazeSieDataGridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
         {
-            blokowanieZrealizowanychEmisji();
+            BlokowanieZrealizowanychEmisji();
         }
 
@@ -1385,5 +1421,5 @@
 
                     rEKLAMABindingSource.EndEdit();
-                    przelicz();
+                    Przelicz();
                 }
                 else
@@ -1457,4 +1493,6 @@
         private void Init()
         {
+            Debug.WriteLine(string.Format("Event: {0}", "Init"));
+
             if (rEKLAMABindingSource.Current == null) return;
 
@@ -1565,4 +1603,9 @@
         private void mOD_TYPComboBox_SelectedIndexChanged(object sender, EventArgs e)
         {
+            if (!obslugaZdarzen) return;
+
+            Debug.WriteLine(string.Format("Event: {0}", "mOD_TYPComboBox_SelectedIndexChanged"));
+
+
             if (SelectedModule == null || SelectedModule.Id == 0)
             {
@@ -1594,7 +1637,9 @@
             txtVertical.BackColor = readOnly ? SystemColors.InactiveCaptionText : Color.White;
 
-            txtHorizontal.Text = 1.ToString();
-            txtVertical.Text = 1.ToString();
-
+            if (readOnly)
+            {
+                txtHorizontal.Text = 1.ToString();
+                txtVertical.Text = 1.ToString();                
+            }
 
             //Enable/Disable dzial rozdzial combos...
@@ -1711,4 +1756,6 @@
         private void txtHorizontal_TextChanged(object sender, EventArgs e)
         {
+            Debug.WriteLine(string.Format("Event: {0}", "txtHorizontal_TextChanged"));
+
             if (Validate())
             {
@@ -1727,4 +1774,6 @@
         private void txtVertical_TextChanged(object sender, EventArgs e)
         {
+            Debug.WriteLine(string.Format("Event: {0}", "txtVertical_TextChanged"));
+
             if (Validate())
             {
@@ -1817,4 +1866,6 @@
         private void txtHorizontal_Validating(object sender, CancelEventArgs e)
         {
+            Debug.WriteLine(string.Format("Event: {0}", "txtHorizontal_Validating"));
+
             string errorMessage = "Proszê podaæ wartoæ z przedzia³u 1-8.";
             string regex = "^[1-8]{1}$";
@@ -1846,4 +1897,7 @@
         private void txtVertical_Validating(object sender, CancelEventArgs e)
         {
+            Debug.WriteLine(string.Format("Event: {0}", "txtVertical_Validating"));
+
+
             string errorMessage = "Proszê podaæ wartoæ z przedzia³u 1-8.";
             string regex = "^[1-8]{1}$";
@@ -1889,17 +1943,19 @@
         private void ogl_dzialComboBox_SelectedIndexChanged(object sender, EventArgs e)
         {
-            if (obslugaZdarzen)
-            {
-                if ((SelectedNavigationColumn != null) && (SelectedTitle != null))
-                {
-                    NavigationColumnRepository navigationColumnRepository =
-                        new NavigationColumnRepository(ConnString.getConnString().Value);
-                    navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn);
-                    ComboBoxHelper.Bind(navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn),
-                        ogl_rozdzialComboBox);
-
-                    ogl_rozdzialComboBox.DisplayMember = "Name";
-                    ogl_rozdzialComboBox.ValueMember = "Id";
-                }
+            if (!obslugaZdarzen) return;
+
+            Debug.WriteLine(string.Format("Event: {0}", "txtVertical_Validating"));
+
+            if ((SelectedNavigationColumn != null) && (SelectedTitle != null))
+            {
+                NavigationColumnRepository navigationColumnRepository =
+                    new NavigationColumnRepository(ConnString.getConnString().Value);
+                navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn);
+                ComboBoxHelper.Bind(
+                    navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn),
+                    ogl_rozdzialComboBox);
+
+                ogl_rozdzialComboBox.DisplayMember = "Name";
+                ogl_rozdzialComboBox.ValueMember = "Id";
             }
         }
Index: branches/ReklamaReorganizacja/BazaReklam/ZamowieniaForm.cs
===================================================================
--- branches/ReklamaReorganizacja/BazaReklam/ZamowieniaForm.cs (revision 645)
+++ branches/ReklamaReorganizacja/BazaReklam/ZamowieniaForm.cs (revision 646)
@@ -739,10 +739,10 @@
             errorMessage += zamowienie.IsidKontaNull() ? "Nie wybrano konta. \n" : "";
             errorMessage += zamowienie.IssposobZaplatyNull() ? "Nie wybrano sposobu zap³aty. \n" : "";
-            errorMessage += string.IsNullOrEmpty(klientRow.Country) ? "Brak pañstwa klienta. \n" : "";
-            errorMessage += string.IsNullOrEmpty(klientRow.Adres_Fkatura) ? "Brak adresu faktury klienta. \n" : "";
-            errorMessage +=  string.IsNullOrEmpty(klientRow.Nip) ? "Brak nipu klienta. \n" : "";
-
-            if (klientRow.Country != "Polska")
-                errorMessage += string.IsNullOrEmpty(klientRow.nipKraj) ? "Brak symbolu kraju w nipie klienta. \n" : "";
+            errorMessage += klientRow.IsCountryNull() || string.IsNullOrEmpty(klientRow.Country) ? "Brak pañstwa klienta. \n" : "";
+            errorMessage += klientRow.IsAdres_FkaturaNull() || string.IsNullOrEmpty(klientRow.Adres_Fkatura) ? "Brak adresu faktury klienta. \n" : "";
+            errorMessage += klientRow.IsNipNull() || string.IsNullOrEmpty(klientRow.Nip) ? "Brak nipu klienta. \n" : "";
+
+            if (!klientRow.IsCountryNull() && klientRow.Country != "Polska")
+                errorMessage += klientRow.IsnipKrajNull() || string.IsNullOrEmpty(klientRow.nipKraj) ? "Brak symbolu kraju w nipie klienta. \n" : "";
 
             if (rEKLAMADataSet.REKLAMA.Rows.Count <= 0)
Index: branches/ReklamaReorganizacja/BazaReklam/ProjectForm.Designer.cs
===================================================================
--- branches/ReklamaReorganizacja/BazaReklam/ProjectForm.Designer.cs (revision 569)
+++ branches/ReklamaReorganizacja/BazaReklam/ProjectForm.Designer.cs (revision 646)
@@ -181,5 +181,5 @@
             // 
             path_to_materialLabel.AutoSize = true;
-            path_to_materialLabel.Location = new System.Drawing.Point(28, 428);
+            path_to_materialLabel.Location = new System.Drawing.Point(28, 454);
             path_to_materialLabel.Name = "path_to_materialLabel";
             path_to_materialLabel.Size = new System.Drawing.Size(115, 13);
@@ -190,5 +190,5 @@
             // 
             uwagiLabel.AutoSize = true;
-            uwagiLabel.Location = new System.Drawing.Point(28, 467);
+            uwagiLabel.Location = new System.Drawing.Point(28, 493);
             uwagiLabel.Name = "uwagiLabel";
             uwagiLabel.Size = new System.Drawing.Size(40, 13);
@@ -315,7 +315,9 @@
             this.lokalizacjaTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
             this.lokalizacjaTextBox.Location = new System.Drawing.Point(28, 398);
-            this.lokalizacjaTextBox.MaxLength = 25;
+            this.lokalizacjaTextBox.MaxLength = 100;
+            this.lokalizacjaTextBox.Multiline = true;
             this.lokalizacjaTextBox.Name = "lokalizacjaTextBox";
-            this.lokalizacjaTextBox.Size = new System.Drawing.Size(446, 21);
+            this.lokalizacjaTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+            this.lokalizacjaTextBox.Size = new System.Drawing.Size(446, 53);
             this.lokalizacjaTextBox.TabIndex = 16;
             // 
@@ -325,5 +327,5 @@
             this.path_to_materialTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.pRODUKCJABindingSource, "path_to_material", true));
             this.path_to_materialTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
-            this.path_to_materialTextBox.Location = new System.Drawing.Point(28, 444);
+            this.path_to_materialTextBox.Location = new System.Drawing.Point(28, 470);
             this.path_to_materialTextBox.MaxLength = 100;
             this.path_to_materialTextBox.Name = "path_to_materialTextBox";
@@ -336,5 +338,5 @@
             this.uwagiTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.pRODUKCJABindingSource, "uwagi", true));
             this.uwagiTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
-            this.uwagiTextBox.Location = new System.Drawing.Point(26, 486);
+            this.uwagiTextBox.Location = new System.Drawing.Point(26, 512);
             this.uwagiTextBox.MaxLength = 200;
             this.uwagiTextBox.Multiline = true;
@@ -374,5 +376,5 @@
             this.dodajButton.DialogResult = System.Windows.Forms.DialogResult.OK;
             this.dodajButton.Image = ((System.Drawing.Image)(resources.GetObject("dodajButton.Image")));
-            this.dodajButton.Location = new System.Drawing.Point(439, 515);
+            this.dodajButton.Location = new System.Drawing.Point(439, 541);
             this.dodajButton.Name = "dodajButton";
             this.dodajButton.Size = new System.Drawing.Size(50, 43);
@@ -399,5 +401,5 @@
             this.bindingNavigatorMoveLastItem,
             this.bindingNavigatorSeparator2});
-            this.bindingNavigator1.Location = new System.Drawing.Point(0, 578);
+            this.bindingNavigator1.Location = new System.Drawing.Point(0, 618);
             this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
             this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem;
@@ -481,5 +483,5 @@
             this.anulujButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
             this.anulujButton.Image = ((System.Drawing.Image)(resources.GetObject("anulujButton.Image")));
-            this.anulujButton.Location = new System.Drawing.Point(381, 515);
+            this.anulujButton.Location = new System.Drawing.Point(381, 541);
             this.anulujButton.Name = "anulujButton";
             this.anulujButton.Size = new System.Drawing.Size(52, 43);
@@ -492,5 +494,5 @@
             // 
             this.sTANLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.pRODUKCJABindingSource, "STAN", true));
-            this.sTANLabel1.Location = new System.Drawing.Point(27, 535);
+            this.sTANLabel1.Location = new System.Drawing.Point(27, 571);
             this.sTANLabel1.Name = "sTANLabel1";
             this.sTANLabel1.Size = new System.Drawing.Size(100, 23);
@@ -500,5 +502,5 @@
             // 
             this.drukujProjektButton.Image = ((System.Drawing.Image)(resources.GetObject("drukujProjektButton.Image")));
-            this.drukujProjektButton.Location = new System.Drawing.Point(296, 515);
+            this.drukujProjektButton.Location = new System.Drawing.Point(296, 541);
             this.drukujProjektButton.Name = "drukujProjektButton";
             this.drukujProjektButton.Size = new System.Drawing.Size(50, 43);
@@ -514,5 +516,5 @@
             // 
             this.dodajNowyButton.Image = ((System.Drawing.Image)(resources.GetObject("dodajNowyButton.Image")));
-            this.dodajNowyButton.Location = new System.Drawing.Point(394, 470);
+            this.dodajNowyButton.Location = new System.Drawing.Point(394, 496);
             this.dodajNowyButton.Name = "dodajNowyButton";
             this.dodajNowyButton.Size = new System.Drawing.Size(95, 32);
@@ -541,5 +543,5 @@
             // 
             this.usunButton.Enabled = false;
-            this.usunButton.Location = new System.Drawing.Point(296, 470);
+            this.usunButton.Location = new System.Drawing.Point(296, 496);
             this.usunButton.Name = "usunButton";
             this.usunButton.Size = new System.Drawing.Size(91, 31);
@@ -593,5 +595,5 @@
             "francuski",
             "hiszpañski"});
-            this.jezykComboBox.Location = new System.Drawing.Point(160, 550);
+            this.jezykComboBox.Location = new System.Drawing.Point(160, 576);
             this.jezykComboBox.Name = "jezykComboBox";
             this.jezykComboBox.Size = new System.Drawing.Size(114, 21);
@@ -601,5 +603,5 @@
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(157, 535);
+            this.label1.Location = new System.Drawing.Point(157, 561);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(37, 13);
@@ -610,5 +612,5 @@
             // 
             this.btnOpenFolder.Image = global::Baza_Reklam.Properties.Resources.folder;
-            this.btnOpenFolder.Location = new System.Drawing.Point(439, 444);
+            this.btnOpenFolder.Location = new System.Drawing.Point(439, 470);
             this.btnOpenFolder.Name = "btnOpenFolder";
             this.btnOpenFolder.Size = new System.Drawing.Size(35, 23);
@@ -621,5 +623,5 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(509, 603);
+            this.ClientSize = new System.Drawing.Size(509, 643);
             this.Controls.Add(this.btnOpenFolder);
             this.Controls.Add(this.label1);
Index: branches/ReklamaReorganizacja/BazaReklam/OrderDetails.Designer.cs
===================================================================
--- branches/ReklamaReorganizacja/BazaReklam/OrderDetails.Designer.cs (revision 645)
+++ branches/ReklamaReorganizacja/BazaReklam/OrderDetails.Designer.cs (revision 646)
@@ -187,4 +187,5 @@
             this.editItem = new System.Windows.Forms.ToolStripMenuItem();
             this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+            this.btnSaveClose = new System.Windows.Forms.Button();
             sYMBOL_AKWIZYTORALabel = new System.Windows.Forms.Label();
             tYTULLabel = new System.Windows.Forms.Label();
@@ -1383,5 +1384,5 @@
             // 
             this.dodajButton.Image = ((System.Drawing.Image)(resources.GetObject("dodajButton.Image")));
-            this.dodajButton.Location = new System.Drawing.Point(817, 607);
+            this.dodajButton.Location = new System.Drawing.Point(743, 607);
             this.dodajButton.Name = "dodajButton";
             this.dodajButton.Size = new System.Drawing.Size(76, 36);
@@ -1395,5 +1396,5 @@
             // 
             this.anulujButton.Image = ((System.Drawing.Image)(resources.GetObject("anulujButton.Image")));
-            this.anulujButton.Location = new System.Drawing.Point(730, 607);
+            this.anulujButton.Location = new System.Drawing.Point(652, 607);
             this.anulujButton.Name = "anulujButton";
             this.anulujButton.Size = new System.Drawing.Size(74, 36);
@@ -1806,4 +1807,16 @@
             this.errorProvider.ContainerControl = this;
             // 
+            // btnSaveClose
+            // 
+            this.btnSaveClose.Image = ((System.Drawing.Image)(resources.GetObject("btnSaveClose.Image")));
+            this.btnSaveClose.Location = new System.Drawing.Point(832, 607);
+            this.btnSaveClose.Name = "btnSaveClose";
+            this.btnSaveClose.Size = new System.Drawing.Size(76, 36);
+            this.btnSaveClose.TabIndex = 80;
+            this.btnSaveClose.Text = "Zapisz i zamknij";
+            this.btnSaveClose.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+            this.btnSaveClose.UseVisualStyleBackColor = true;
+            this.btnSaveClose.Click += new System.EventHandler(this.btnSaveClose_Click);
+            // 
             // OrderDetails
             // 
@@ -1812,4 +1825,5 @@
             this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange;
             this.ClientSize = new System.Drawing.Size(920, 669);
+            this.Controls.Add(this.btnSaveClose);
             this.Controls.Add(this.button3);
             this.Controls.Add(this.EmailButton);
@@ -2002,4 +2016,5 @@
         private System.Windows.Forms.GroupBox moduleInfo;
         private System.Windows.Forms.Label lblModuleDescription;
+        private System.Windows.Forms.Button btnSaveClose;
 
 
Index: branches/ReklamaReorganizacja/BazaReklam/ClientsForm.cs
===================================================================
--- branches/ReklamaReorganizacja/BazaReklam/ClientsForm.cs (revision 645)
+++ branches/ReklamaReorganizacja/BazaReklam/ClientsForm.cs (revision 646)
@@ -286,15 +286,23 @@
         {
             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);
+
+            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;
             }
         }
@@ -303,20 +311,29 @@
         {
             if (kLIENCIBindingSource.Current == null) return;
-            
-            DataRowView row = (DataRowView) kLIENCIBindingSource.Current;
-            REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row;
-
-            if (klient.IskodKlientaNull())
-            {
-                MessageBox.Show("Proszê uzupe³niæ kod klienta");
-                return;
-            }
-
-            OrderDetails.getOrderDetails().DodajNoweZamowienie(klient.CustomerID, klient.kodKlienta);
-
-            if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK)
-            {
-                rEKLAMADataSet.REKLAMA.Clear();
-                rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, klient.CustomerID);
+
+            try
+            {
+                Cursor = Cursors.WaitCursor;
+
+                DataRowView row = (DataRowView) kLIENCIBindingSource.Current;
+                REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row;
+
+                if (klient.IskodKlientaNull())
+                {
+                    MessageBox.Show("Proszê uzupe³niæ kod klienta");
+                    return;
+                }
+
+                OrderDetails.getOrderDetails().DodajNoweZamowienie(klient.CustomerID, klient.kodKlienta);
+
+                if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK)
+                {
+                    rEKLAMADataSet.REKLAMA.Clear();
+                    rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, klient.CustomerID);
+                }
+            }
+            finally
+            {
+                Cursor = Cursors.Default;
             }
         }
@@ -385,15 +402,24 @@
         {
             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().WznowZamowienie(idRek);
-
-            if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK)
-            {
-                rEKLAMADataSet.REKLAMA.Clear();
-                rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId);
+
+            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().WznowZamowienie(idRek);
+
+                if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK)
+                {
+                    rEKLAMADataSet.REKLAMA.Clear();
+                    rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId);
+                }
+            }
+            finally
+            {
+                Cursor = Cursors.Default;
             }
         }
Index: branches/ReklamaReorganizacja/BazaReklam/OrderDetails.resx
===================================================================
--- branches/ReklamaReorganizacja/BazaReklam/OrderDetails.resx (revision 645)
+++ branches/ReklamaReorganizacja/BazaReklam/OrderDetails.resx (revision 646)
@@ -388,3 +388,24 @@
     <value>155</value>
   </metadata>
+  <data name="btnSaveClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK7wAA
+        Cu8BfXaKSAAAA0RJREFUSEvVlXlI02EYx58d3rJ0m85j5hE6t2mmzDLvmRdp5pVRlh1kBwRGiWJGf0RG
+        ogR2eSEdioTH5uY000qCIIj+UVOCwD/rLyGbRX+UT8+7C5coeBT0gy/bb3vfz/f7PO/vfX8A/9nFobxM
+        m3y1Qg7chllohI9QC6eJvoXE2xyXJ5Dr1AY/6qcr8fzbYvRsd/wFxVBJcJ+Nm3RCtkMLfG98X4O5oypU
+        aj1RZfBBTjVnhuDZJMH6q+iGTB7BG6arMXcs1gSPHPDGGIME+Ve5nwl8iSRdn0EXpHGbYaGBJSe4gsE1
+        Xhill6CwxWURdkE3gWtIgTaDbe88gqQ6QaawAjzpR/6Kzo9AzWkGY/1UNeY9j0O5xgMjGHzQAk+HHpp7
+        n1RAEgIgcEP1gqbkUdnPg+NqFHW4TPGzQEV/ui575LohEe6C8eZkFea/iMdwgiu1Xrid4CKWPAN6aU4L
+        6TApwBQ0pENw7cSrTGyYrsDS13GYORqGDk28GYgENQ1wt5l0QQLB5+smK01wGYP3izFC52WGZ0GfBV5q
+        aY25CyE9grmmD1WYNCLBPaOBmD4WjLuHpQj1MAnhkEJD3OAhxMEd+MLgReNJGNYnQAXBI63wbBv8iB2c
+        Gfh3us+Wv0k3wdUjgZj8dCum0ufOQT+EOjIpg1O0ieauT1wkeIoJLie4UudtTr4X+gnTSjpKCiI52K2f
+        Wy0nR/jYeT5jLMQEThgOoAoCMH7IH6MHJCh5IMAbE1VYQusTyuAaMcoHxGZ4DmhWhVuc3OEQnHRu531V
+        PwsisNSUXqX3xRidBAtfJmGiQWZKHt4nQgWDtxJ8H2hpfpslefCy5EvK4NJ3ERyAcpcWvjFh2B9jDX4Y
+        rfPBKK03KjQiaokIw5ms8DwbvIzmrgq3+jATMRTBGed7PGPskC/uoF3Jnm/WbxlJrhWZk+eDjsa2k46x
+        Z2S15HZrQTdmk0I469zEX2C7Ukmpw3qFKLPCC2zw42uF21eyH8453eJ9U1JL5DoxittcF6k6vSX5uuH2
+        JqlQTsfVBP8K9xOk2XaoFe74Z/lrvTe3CyCVdIF0mVRiWdANw5dWwo4KduSyU1FEWvkQXGsJS8b/pffs
+        BhL906m/AVuDSMCQycqGAAAAAElFTkSuQmCC
+</value>
+  </data>
 </root>
