Pokaż
Ignoruj:
Data:
2009-05-19 15:23:04 (17 years ago)
Autor:
marek
Opis:

re #161

Lokalizacja:
branches/ReklamaReorganizacja/BazaReklam
Pliki:
6 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • branches/ReklamaReorganizacja/BazaReklam/ClientsForm.cs

    r645 r646  
    286286        { 
    287287            if (rEKLAMABindingSource.Current == null) return; 
    288              
    289             DataRowView row = (DataRowView) rEKLAMABindingSource.Current; 
    290             int idRek = Int32.Parse(row["reklamaId"].ToString()); 
    291             int custId = Int32.Parse(row["customerId"].ToString()); 
    292  
    293             OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek); 
    294  
    295             if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK) 
    296             { 
    297                 rEKLAMADataSet.REKLAMA.Clear(); 
    298                 rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId); 
     288 
     289            try 
     290            { 
     291                Cursor = Cursors.WaitCursor; 
     292                DataRowView row = (DataRowView) rEKLAMABindingSource.Current; 
     293                int idRek = Int32.Parse(row["reklamaId"].ToString()); 
     294                int custId = Int32.Parse(row["customerId"].ToString()); 
     295 
     296                OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek); 
     297 
     298                if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK) 
     299                { 
     300                    rEKLAMADataSet.REKLAMA.Clear(); 
     301                    rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId); 
     302                } 
     303            } 
     304            finally 
     305            { 
     306                Cursor = Cursors.Default; 
    299307            } 
    300308        } 
     
    303311        { 
    304312            if (kLIENCIBindingSource.Current == null) return; 
    305              
    306             DataRowView row = (DataRowView) kLIENCIBindingSource.Current; 
    307             REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row; 
    308  
    309             if (klient.IskodKlientaNull()) 
    310             { 
    311                 MessageBox.Show("Proszê uzupe³niæ kod klienta"); 
    312                 return; 
    313             } 
    314  
    315             OrderDetails.getOrderDetails().DodajNoweZamowienie(klient.CustomerID, klient.kodKlienta); 
    316  
    317             if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK) 
    318             { 
    319                 rEKLAMADataSet.REKLAMA.Clear(); 
    320                 rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, klient.CustomerID); 
     313 
     314            try 
     315            { 
     316                Cursor = Cursors.WaitCursor; 
     317 
     318                DataRowView row = (DataRowView) kLIENCIBindingSource.Current; 
     319                REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row; 
     320 
     321                if (klient.IskodKlientaNull()) 
     322                { 
     323                    MessageBox.Show("Proszê uzupe³niæ kod klienta"); 
     324                    return; 
     325                } 
     326 
     327                OrderDetails.getOrderDetails().DodajNoweZamowienie(klient.CustomerID, klient.kodKlienta); 
     328 
     329                if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK) 
     330                { 
     331                    rEKLAMADataSet.REKLAMA.Clear(); 
     332                    rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, klient.CustomerID); 
     333                } 
     334            } 
     335            finally 
     336            { 
     337                Cursor = Cursors.Default; 
    321338            } 
    322339        } 
     
    385402        { 
    386403            if (rEKLAMABindingSource.Current == null) return; 
    387              
    388             DataRowView row = (DataRowView) rEKLAMABindingSource.Current; 
    389             int idRek = Int32.Parse(row["reklamaId"].ToString()); 
    390             int custId = Int32.Parse(row["customerId"].ToString()); 
    391  
    392             OrderDetails.getOrderDetails().WznowZamowienie(idRek); 
    393  
    394             if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK) 
    395             { 
    396                 rEKLAMADataSet.REKLAMA.Clear(); 
    397                 rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId); 
     404 
     405            try 
     406            { 
     407                Cursor = Cursors.WaitCursor; 
     408 
     409                DataRowView row = (DataRowView) rEKLAMABindingSource.Current; 
     410                int idRek = Int32.Parse(row["reklamaId"].ToString()); 
     411                int custId = Int32.Parse(row["customerId"].ToString()); 
     412 
     413                OrderDetails.getOrderDetails().WznowZamowienie(idRek); 
     414 
     415                if (OrderDetails.getOrderDetails().ShowDialog() == DialogResult.OK) 
     416                { 
     417                    rEKLAMADataSet.REKLAMA.Clear(); 
     418                    rEKLAMATableAdapter.FillByCustomerId(rEKLAMADataSet.REKLAMA, custId); 
     419                } 
     420            } 
     421            finally 
     422            { 
     423                Cursor = Cursors.Default; 
    398424            } 
    399425        } 
  • branches/ReklamaReorganizacja/BazaReklam/OrderDetails.Designer.cs

    r645 r646  
    187187            this.editItem = new System.Windows.Forms.ToolStripMenuItem(); 
    188188            this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 
     189            this.btnSaveClose = new System.Windows.Forms.Button(); 
    189190            sYMBOL_AKWIZYTORALabel = new System.Windows.Forms.Label(); 
    190191            tYTULLabel = new System.Windows.Forms.Label(); 
     
    13831384            //  
    13841385            this.dodajButton.Image = ((System.Drawing.Image)(resources.GetObject("dodajButton.Image"))); 
    1385             this.dodajButton.Location = new System.Drawing.Point(817, 607); 
     1386            this.dodajButton.Location = new System.Drawing.Point(743, 607); 
    13861387            this.dodajButton.Name = "dodajButton"; 
    13871388            this.dodajButton.Size = new System.Drawing.Size(76, 36); 
     
    13951396            //  
    13961397            this.anulujButton.Image = ((System.Drawing.Image)(resources.GetObject("anulujButton.Image"))); 
    1397             this.anulujButton.Location = new System.Drawing.Point(730, 607); 
     1398            this.anulujButton.Location = new System.Drawing.Point(652, 607); 
    13981399            this.anulujButton.Name = "anulujButton"; 
    13991400            this.anulujButton.Size = new System.Drawing.Size(74, 36); 
     
    18061807            this.errorProvider.ContainerControl = this; 
    18071808            //  
     1809            // btnSaveClose 
     1810            //  
     1811            this.btnSaveClose.Image = ((System.Drawing.Image)(resources.GetObject("btnSaveClose.Image"))); 
     1812            this.btnSaveClose.Location = new System.Drawing.Point(832, 607); 
     1813            this.btnSaveClose.Name = "btnSaveClose"; 
     1814            this.btnSaveClose.Size = new System.Drawing.Size(76, 36); 
     1815            this.btnSaveClose.TabIndex = 80; 
     1816            this.btnSaveClose.Text = "Zapisz i zamknij"; 
     1817            this.btnSaveClose.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 
     1818            this.btnSaveClose.UseVisualStyleBackColor = true; 
     1819            this.btnSaveClose.Click += new System.EventHandler(this.btnSaveClose_Click); 
     1820            //  
    18081821            // OrderDetails 
    18091822            //  
     
    18121825            this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange; 
    18131826            this.ClientSize = new System.Drawing.Size(920, 669); 
     1827            this.Controls.Add(this.btnSaveClose); 
    18141828            this.Controls.Add(this.button3); 
    18151829            this.Controls.Add(this.EmailButton); 
     
    20022016        private System.Windows.Forms.GroupBox moduleInfo; 
    20032017        private System.Windows.Forms.Label lblModuleDescription; 
     2018        private System.Windows.Forms.Button btnSaveClose; 
    20042019 
    20052020 
  • branches/ReklamaReorganizacja/BazaReklam/OrderDetails.cs

    r645 r646  
    44using System.ComponentModel; 
    55using System.Data; 
     6using System.Diagnostics; 
    67using System.Drawing; 
    78using System.Text; 
     
    113114        private OrderDetails() 
    114115        { 
     116            Debug.WriteLine(string.Format("Event: {0}", "Constructor")); 
     117             
    115118            InitializeComponent(); 
    116119 
     
    179182        private void OrderDetails_Load(object sender, EventArgs e) 
    180183        { 
     184            Debug.WriteLine(string.Format("Event: {0}", "Form_Load")); 
    181185            wyroznienie_exportedCheckBox.Enabled = User.Instance().St_produkcja; 
    182186        } 
     
    187191        private void tYTULComboBox_SelectedIndexChanged(object sender, EventArgs e) 
    188192        { 
    189             if (obslugaZdarzen) 
    190             { 
    191                 if (SelectedTitle != null) 
    192                 { 
    193                     ComboBoxHelper.Bind(SelectedTitle.Sections, grzbietComboBox); 
    194                     if (SelectedTitle.Sections.Count > 1) 
    195                     { 
    196                         grzbietComboBox.Items.Insert(0, new Section(0, null, "--proszê wybraæ--")); 
    197                         if (SelectedTitle.Sections.Count != 0) 
    198                             grzbietComboBox.SelectedIndex = 0; 
    199                     } 
    200                     else if (SelectedTitle.Sections.Count == 1) 
    201                     { 
     193            if (!obslugaZdarzen) return; 
     194 
     195            Debug.WriteLine(string.Format("Event: {0}", "tYTULComboBox_SelectedIndexChanged")); 
     196 
     197            if (SelectedTitle != null) 
     198            { 
     199                ComboBoxHelper.Bind(SelectedTitle.Sections, grzbietComboBox); 
     200                if (SelectedTitle.Sections.Count > 1) 
     201                { 
     202                    grzbietComboBox.Items.Insert(0, new Section(0, null, "--proszê wybraæ--")); 
     203                    if (SelectedTitle.Sections.Count != 0) 
    202204                        grzbietComboBox.SelectedIndex = 0; 
    203                         ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox); 
    204  
    205                         if (SelectedSection.Modules.Count > 1) 
    206                             mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--")); 
    207                         if (SelectedSection.Modules.Count != 0) 
    208                             mOD_TYPComboBox.SelectedIndex = 0; 
    209                     } 
    210  
    211                     iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text; 
    212                 } 
     205                } 
     206                else if (SelectedTitle.Sections.Count == 1) 
     207                { 
     208                    grzbietComboBox.SelectedIndex = 0; 
     209                    ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox); 
     210 
     211                    if (SelectedSection.Modules.Count > 1) 
     212                        mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--")); 
     213                    if (SelectedSection.Modules.Count != 0) 
     214                        mOD_TYPComboBox.SelectedIndex = 0; 
     215                } 
     216 
     217                iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text; 
    213218            } 
    214219        } 
     
    216221        private void grzbietComboBox_SelectedIndexChanged(object sender, EventArgs e) 
    217222        { 
    218             if (obslugaZdarzen) 
    219             { 
    220                 if (SelectedSection == null) return; 
    221  
    222                 ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox); 
    223                 if (SelectedSection.Modules.Count > 1) 
    224                     mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--")); 
    225                 if (SelectedSection.Modules.Count != 0) 
    226                     mOD_TYPComboBox.SelectedIndex = 0; 
    227  
    228                 iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text; 
    229  
    230             } 
     223            if (!obslugaZdarzen) return; 
     224 
     225            Debug.WriteLine(string.Format("Event: {0}", "grzbietComboBox_SelectedIndexChanged")); 
     226             
     227            if (SelectedSection == null) return; 
     228 
     229            ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox); 
     230            if (SelectedSection.Modules.Count > 1) 
     231                mOD_TYPComboBox.Items.Insert(0, new Module(0, "--proszê wybraæ--")); 
     232            if (SelectedSection.Modules.Count != 0) 
     233                mOD_TYPComboBox.SelectedIndex = 0; 
     234 
     235            iD_REKLAMYTextBox.Text = (nowyRekord) ? numeryReklam[SelectedTitle.ShortName] : iD_REKLAMYTextBox.Text; 
    231236        } 
    232237 
     
    260265        private void ResetComboBoxes() 
    261266        { 
     267            Debug.WriteLine(string.Format("Event: {0}", "ResetComboBoxes")); 
     268 
    262269            tYTULComboBox.SelectedIndex = -1; 
    263270            cbLocation.SelectedIndex = 0; 
     
    283290            Cursor = Cursors.WaitCursor; 
    284291 
     292            SaveChanges(); 
     293 
     294            MessageBox.Show("Zmiany zapisane"); 
     295            Cursor = Cursors.Default; 
     296        } 
     297 
     298        private void btnSaveClose_Click(object sender, EventArgs e) 
     299        { 
     300            if (!ValidateChildren()) 
     301            { 
     302                MessageBox.Show("Proszê uzupe³niæ wymagane pola."); 
     303                return; 
     304            } 
     305 
     306            Cursor = Cursors.WaitCursor; 
     307 
     308            SaveChanges(); 
     309 
     310            MessageBox.Show("Zmiany zapisane"); 
     311            Cursor = Cursors.Default; 
     312            Close(); 
     313        } 
     314 
     315        private void SaveChanges() 
     316        { 
    285317            Reklama.MOD_TYP = SelectedModule.Name; 
    286318            Reklama.TYTU£ = SelectedTitle.ShortName; 
     
    345377 
    346378            ukazeSieDataGridView.Sort(ukazeSieDataGridView.Columns[0], ListSortDirection.Ascending); 
    347  
    348             MessageBox.Show("Zmiany zapisane"); 
    349             Cursor = Cursors.Default; 
    350379        } 
    351380 
     
    362391        private void promocjaComboBox_TextChanged(object sender, EventArgs e) 
    363392        { 
    364             if (!obslugaZdarzen || promocjaComboBox.Text != "" || rEKLAMABindingSource.Current == null)  
     393            if (!obslugaZdarzen || !string.IsNullOrEmpty(promocjaComboBox.Text) || rEKLAMABindingSource.Current == null) 
    365394                return; 
    366395             
     
    377406                (REKLAMADataSet.REKLAMARow) ((DataRowView) rEKLAMABindingSource.Current).Row; 
    378407 
    379             sprawdzBledy(); 
     408            SprawdzBledy(); 
    380409 
    381410            if (!User.Instance().St_kierownik && reklama.IsPROMOCJANull()) 
     
    428457            obslugaZdarzen = true; 
    429458 
    430             blokowanieZrealizowanychEmisji(); 
     459            BlokowanieZrealizowanychEmisji(); 
    431460 
    432461            Zmiany(); 
     
    441470                rEKLAMAUKAZESIEWNRBindingSource.RemoveCurrent(); 
    442471            } 
    443             blokowanieZrealizowanychEmisji(); 
     472            BlokowanieZrealizowanychEmisji(); 
    444473        } 
    445474 
     
    459488        /// Blokuje emisje,które ju¿ siê ukaza³y. 
    460489        /// </summary> 
    461         private void blokowanieZrealizowanychEmisji() 
     490        private void BlokowanieZrealizowanychEmisji() 
    462491        { 
    463492            //  ukazeSieDataGridView.Enabled = true;  
     
    487516 
    488517 
    489         public void zablokujGroupBoxa(GroupBox g) 
     518        public void ZablokujGroupBoxa(GroupBox g) 
    490519        { 
    491520            foreach (Control c in g.Controls) 
     
    503532        } 
    504533 
    505         public void odblokujGroupBoxa(GroupBox g) 
     534        public void OdblokujGroupBoxa(GroupBox g) 
    506535        { 
    507536            foreach (Control c in g.Controls) 
     
    522551        /// Blokuje kontrolki zwi¹zane z danymi zamówienia 
    523552        /// </summary> 
    524         private void zablokujGroupBoxy() 
    525         { 
    526             zablokujGroupBoxa(groupBox1); 
     553        private void ZablokujGroupBoxy() 
     554        { 
     555            ZablokujGroupBoxa(groupBox1); 
    527556 
    528557            if (!(User.Instance().St_produkcja | User.Instance().St_kierownik)) 
    529558            { 
    530                 zablokujGroupBoxa(groupBox2); 
    531             } 
    532             zablokujGroupBoxa(groupBox3); 
    533             zablokujGroupBoxa(groupBox4); 
     559                ZablokujGroupBoxa(groupBox2); 
     560            } 
     561            ZablokujGroupBoxa(groupBox3); 
     562            ZablokujGroupBoxa(groupBox4); 
    534563 
    535564            //lokalizacje mo¿na zmieniaæ 
     
    541570        /// Odblokuje kontrolki zwi¹zane z danymi zamówienia 
    542571        /// </summary> 
    543         private void odblokujGroupBoxy() 
    544         { 
    545             odblokujGroupBoxa(groupBox1); 
    546             odblokujGroupBoxa(groupBox2); 
    547             odblokujGroupBoxa(groupBox3); 
    548             odblokujGroupBoxa(groupBox4); 
     572        private void OdblokujGroupBoxy() 
     573        { 
     574            OdblokujGroupBoxa(groupBox1); 
     575            OdblokujGroupBoxa(groupBox2); 
     576            OdblokujGroupBoxa(groupBox3); 
     577            OdblokujGroupBoxa(groupBox4); 
    549578        } 
    550579 
     
    576605        /// Sprawdza poprawnoœæ zamówienia... pewnie niekompletnie 
    577606        /// </summary> 
    578         private void sprawdzBledy() 
     607        private void SprawdzBledy() 
    579608        { 
    580609            if (ogl_dzialComboBox.SelectedValue == null) 
     
    617646        /// Przelicza wartoœæ zamówienia. 
    618647        /// </summary> 
    619         private void przelicz() 
     648        private void Przelicz() 
    620649        { 
    621650            DataRowView row = (DataRowView)rEKLAMABindingSource.Current; 
     
    912941        public void WznowZamowienie(int rekId) 
    913942        { 
     943            Debug.WriteLine(string.Format("Event: {0}", "WznowZamowienie")); 
     944 
    914945            nowyRekord = true; 
    915946            bylyZmiany = false; 
     
    937968            newRow["WYS"] = oldRow["WYS"]; 
    938969            newRow["MOD_TYP"] = oldRow["MOD_TYP"]; 
    939             newRow["KROTNOŒÆ"] = oldRow["KROTNOŒÆ"]; 
     970            newRow["KROTNOŒÆ"] = 0; 
    940971            newRow["ODSTÊP"] = oldRow["ODSTÊP"]; 
    941972            newRow["KOLOR"] = oldRow["KOLOR"]; 
     
    9901021            cbLocation.SelectedIndex = GetAdLocationIndex(Convert.ToInt32(newRow["AdLocationId"])); 
    9911022 
    992             if (Reklama.ogl_dzial > 0) 
    993             { 
    994                 ogl_dzialComboBox.SelectedIndex = GetNavigationColumnIndex(Reklama.ogl_dzial); 
    995                 if (Reklama.ogl_rozdzial > 0) 
    996                     ogl_rozdzialComboBox.SelectedIndex = GetNavigationSubColumnIndex(Reklama.ogl_rozdzial); 
    997             } 
     1023            if (EnableModuleCount(SelectedModule)) 
     1024            { 
     1025                ModuleCount moduleCount = GetModuleCount(SelectedModule, Reklama); 
     1026                txtHorizontal.Text = moduleCount.Horizontal.ToString(); 
     1027                txtVertical.Text = moduleCount.Vertical.ToString(); 
     1028            } 
     1029 
     1030            sZERTextBox.Text = Reklama.SZER.ToString(); 
     1031            wYSTextBox.Text = Reklama.WYS.ToString(); 
    9981032 
    9991033            obslugaZdarzen = false; 
     
    10241058        private void OrderDetails_FormClosing(object sender, FormClosingEventArgs e) 
    10251059        { 
     1060            Debug.WriteLine(string.Format("Event: {0}", "FormClosing")); 
     1061 
    10261062            if (nowyRekord) 
    10271063            { 
     
    10801116                if (wystawionoFakture) 
    10811117                { 
    1082                     zablokujGroupBoxy(); 
     1118                    ZablokujGroupBoxy(); 
    10831119                } 
    10841120                else 
    10851121                { 
    1086                     odblokujGroupBoxy(); 
    1087                 } 
    1088             } 
    1089  
    1090             blokowanieZrealizowanychEmisji(); 
     1122                    OdblokujGroupBoxy(); 
     1123                } 
     1124            } 
     1125 
     1126            BlokowanieZrealizowanychEmisji(); 
    10911127        } 
    10921128 
     
    13301366        private void ukazeSieDataGridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) 
    13311367        { 
    1332             blokowanieZrealizowanychEmisji(); 
     1368            BlokowanieZrealizowanychEmisji(); 
    13331369        } 
    13341370 
     
    13851421 
    13861422                    rEKLAMABindingSource.EndEdit(); 
    1387                     przelicz(); 
     1423                    Przelicz(); 
    13881424                } 
    13891425                else 
     
    14571493        private void Init() 
    14581494        { 
     1495            Debug.WriteLine(string.Format("Event: {0}", "Init")); 
     1496 
    14591497            if (rEKLAMABindingSource.Current == null) return; 
    14601498 
     
    15651603        private void mOD_TYPComboBox_SelectedIndexChanged(object sender, EventArgs e) 
    15661604        { 
     1605            if (!obslugaZdarzen) return; 
     1606 
     1607            Debug.WriteLine(string.Format("Event: {0}", "mOD_TYPComboBox_SelectedIndexChanged")); 
     1608 
     1609 
    15671610            if (SelectedModule == null || SelectedModule.Id == 0) 
    15681611            { 
     
    15941637            txtVertical.BackColor = readOnly ? SystemColors.InactiveCaptionText : Color.White; 
    15951638 
    1596             txtHorizontal.Text = 1.ToString(); 
    1597             txtVertical.Text = 1.ToString(); 
    1598  
     1639            if (readOnly) 
     1640            { 
     1641                txtHorizontal.Text = 1.ToString(); 
     1642                txtVertical.Text = 1.ToString();                 
     1643            } 
    15991644 
    16001645            //Enable/Disable dzial rozdzial combos... 
     
    17111756        private void txtHorizontal_TextChanged(object sender, EventArgs e) 
    17121757        { 
     1758            Debug.WriteLine(string.Format("Event: {0}", "txtHorizontal_TextChanged")); 
     1759 
    17131760            if (Validate()) 
    17141761            { 
     
    17271774        private void txtVertical_TextChanged(object sender, EventArgs e) 
    17281775        { 
     1776            Debug.WriteLine(string.Format("Event: {0}", "txtVertical_TextChanged")); 
     1777 
    17291778            if (Validate()) 
    17301779            { 
     
    18171866        private void txtHorizontal_Validating(object sender, CancelEventArgs e) 
    18181867        { 
     1868            Debug.WriteLine(string.Format("Event: {0}", "txtHorizontal_Validating")); 
     1869 
    18191870            string errorMessage = "Proszê podaæ wartoœæ z przedzia³u 1-8."; 
    18201871            string regex = "^[1-8]{1}$"; 
     
    18461897        private void txtVertical_Validating(object sender, CancelEventArgs e) 
    18471898        { 
     1899            Debug.WriteLine(string.Format("Event: {0}", "txtVertical_Validating")); 
     1900 
     1901 
    18481902            string errorMessage = "Proszê podaæ wartoœæ z przedzia³u 1-8."; 
    18491903            string regex = "^[1-8]{1}$"; 
     
    18891943        private void ogl_dzialComboBox_SelectedIndexChanged(object sender, EventArgs e) 
    18901944        { 
    1891             if (obslugaZdarzen) 
    1892             { 
    1893                 if ((SelectedNavigationColumn != null) && (SelectedTitle != null)) 
    1894                 { 
    1895                     NavigationColumnRepository navigationColumnRepository = 
    1896                         new NavigationColumnRepository(ConnString.getConnString().Value); 
    1897                     navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn); 
    1898                     ComboBoxHelper.Bind(navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn), 
    1899                         ogl_rozdzialComboBox); 
    1900  
    1901                     ogl_rozdzialComboBox.DisplayMember = "Name"; 
    1902                     ogl_rozdzialComboBox.ValueMember = "Id"; 
    1903                 } 
     1945            if (!obslugaZdarzen) return; 
     1946 
     1947            Debug.WriteLine(string.Format("Event: {0}", "txtVertical_Validating")); 
     1948 
     1949            if ((SelectedNavigationColumn != null) && (SelectedTitle != null)) 
     1950            { 
     1951                NavigationColumnRepository navigationColumnRepository = 
     1952                    new NavigationColumnRepository(ConnString.getConnString().Value); 
     1953                navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn); 
     1954                ComboBoxHelper.Bind( 
     1955                    navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn), 
     1956                    ogl_rozdzialComboBox); 
     1957 
     1958                ogl_rozdzialComboBox.DisplayMember = "Name"; 
     1959                ogl_rozdzialComboBox.ValueMember = "Id"; 
    19041960            } 
    19051961        } 
  • branches/ReklamaReorganizacja/BazaReklam/OrderDetails.resx

    r645 r646  
    388388    <value>155</value> 
    389389  </metadata> 
     390  <data name="btnSaveClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 
     391    <value> 
     392        iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 
     393        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK7wAA 
     394        Cu8BfXaKSAAAA0RJREFUSEvVlXlI02EYx58d3rJ0m85j5hE6t2mmzDLvmRdp5pVRlh1kBwRGiWJGf0RG 
     395        ogR2eSEdioTH5uY000qCIIj+UVOCwD/rLyGbRX+UT8+7C5coeBT0gy/bb3vfz/f7PO/vfX8A/9nFobxM 
     396        m3y1Qg7chllohI9QC6eJvoXE2xyXJ5Dr1AY/6qcr8fzbYvRsd/wFxVBJcJ+Nm3RCtkMLfG98X4O5oypU 
     397        aj1RZfBBTjVnhuDZJMH6q+iGTB7BG6arMXcs1gSPHPDGGIME+Ve5nwl8iSRdn0EXpHGbYaGBJSe4gsE1 
     398        Xhill6CwxWURdkE3gWtIgTaDbe88gqQ6QaawAjzpR/6Kzo9AzWkGY/1UNeY9j0O5xgMjGHzQAk+HHpp7 
     399        n1RAEgIgcEP1gqbkUdnPg+NqFHW4TPGzQEV/ui575LohEe6C8eZkFea/iMdwgiu1Xrid4CKWPAN6aU4L 
     400        6TApwBQ0pENw7cSrTGyYrsDS13GYORqGDk28GYgENQ1wt5l0QQLB5+smK01wGYP3izFC52WGZ0GfBV5q 
     401        aY25CyE9grmmD1WYNCLBPaOBmD4WjLuHpQj1MAnhkEJD3OAhxMEd+MLgReNJGNYnQAXBI63wbBv8iB2c 
     402        Gfh3us+Wv0k3wdUjgZj8dCum0ufOQT+EOjIpg1O0ieauT1wkeIoJLie4UudtTr4X+gnTSjpKCiI52K2f 
     403        Wy0nR/jYeT5jLMQEThgOoAoCMH7IH6MHJCh5IMAbE1VYQusTyuAaMcoHxGZ4DmhWhVuc3OEQnHRu531V 
     404        PwsisNSUXqX3xRidBAtfJmGiQWZKHt4nQgWDtxJ8H2hpfpslefCy5EvK4NJ3ERyAcpcWvjFh2B9jDX4Y 
     405        rfPBKK03KjQiaokIw5ms8DwbvIzmrgq3+jATMRTBGed7PGPskC/uoF3Jnm/WbxlJrhWZk+eDjsa2k46x 
     406        Z2S15HZrQTdmk0I469zEX2C7Ukmpw3qFKLPCC2zw42uF21eyH8453eJ9U1JL5DoxittcF6k6vSX5uuH2 
     407        JqlQTsfVBP8K9xOk2XaoFe74Z/lrvTe3CyCVdIF0mVRiWdANw5dWwo4KduSyU1FEWvkQXGsJS8b/pffs 
     408        BhL906m/AVuDSMCQycqGAAAAAElFTkSuQmCC 
     409</value> 
     410  </data> 
    390411</root> 
  • branches/ReklamaReorganizacja/BazaReklam/ProjectForm.Designer.cs

    r569 r646  
    181181            //  
    182182            path_to_materialLabel.AutoSize = true; 
    183             path_to_materialLabel.Location = new System.Drawing.Point(28, 428); 
     183            path_to_materialLabel.Location = new System.Drawing.Point(28, 454); 
    184184            path_to_materialLabel.Name = "path_to_materialLabel"; 
    185185            path_to_materialLabel.Size = new System.Drawing.Size(115, 13); 
     
    190190            //  
    191191            uwagiLabel.AutoSize = true; 
    192             uwagiLabel.Location = new System.Drawing.Point(28, 467); 
     192            uwagiLabel.Location = new System.Drawing.Point(28, 493); 
    193193            uwagiLabel.Name = "uwagiLabel"; 
    194194            uwagiLabel.Size = new System.Drawing.Size(40, 13); 
     
    315315            this.lokalizacjaTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 
    316316            this.lokalizacjaTextBox.Location = new System.Drawing.Point(28, 398); 
    317             this.lokalizacjaTextBox.MaxLength = 25; 
     317            this.lokalizacjaTextBox.MaxLength = 100; 
     318            this.lokalizacjaTextBox.Multiline = true; 
    318319            this.lokalizacjaTextBox.Name = "lokalizacjaTextBox"; 
    319             this.lokalizacjaTextBox.Size = new System.Drawing.Size(446, 21); 
     320            this.lokalizacjaTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 
     321            this.lokalizacjaTextBox.Size = new System.Drawing.Size(446, 53); 
    320322            this.lokalizacjaTextBox.TabIndex = 16; 
    321323            //  
     
    325327            this.path_to_materialTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.pRODUKCJABindingSource, "path_to_material", true)); 
    326328            this.path_to_materialTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 
    327             this.path_to_materialTextBox.Location = new System.Drawing.Point(28, 444); 
     329            this.path_to_materialTextBox.Location = new System.Drawing.Point(28, 470); 
    328330            this.path_to_materialTextBox.MaxLength = 100; 
    329331            this.path_to_materialTextBox.Name = "path_to_materialTextBox"; 
     
    336338            this.uwagiTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.pRODUKCJABindingSource, "uwagi", true)); 
    337339            this.uwagiTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 
    338             this.uwagiTextBox.Location = new System.Drawing.Point(26, 486); 
     340            this.uwagiTextBox.Location = new System.Drawing.Point(26, 512); 
    339341            this.uwagiTextBox.MaxLength = 200; 
    340342            this.uwagiTextBox.Multiline = true; 
     
    374376            this.dodajButton.DialogResult = System.Windows.Forms.DialogResult.OK; 
    375377            this.dodajButton.Image = ((System.Drawing.Image)(resources.GetObject("dodajButton.Image"))); 
    376             this.dodajButton.Location = new System.Drawing.Point(439, 515); 
     378            this.dodajButton.Location = new System.Drawing.Point(439, 541); 
    377379            this.dodajButton.Name = "dodajButton"; 
    378380            this.dodajButton.Size = new System.Drawing.Size(50, 43); 
     
    399401            this.bindingNavigatorMoveLastItem, 
    400402            this.bindingNavigatorSeparator2}); 
    401             this.bindingNavigator1.Location = new System.Drawing.Point(0, 578); 
     403            this.bindingNavigator1.Location = new System.Drawing.Point(0, 618); 
    402404            this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem; 
    403405            this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem; 
     
    481483            this.anulujButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 
    482484            this.anulujButton.Image = ((System.Drawing.Image)(resources.GetObject("anulujButton.Image"))); 
    483             this.anulujButton.Location = new System.Drawing.Point(381, 515); 
     485            this.anulujButton.Location = new System.Drawing.Point(381, 541); 
    484486            this.anulujButton.Name = "anulujButton"; 
    485487            this.anulujButton.Size = new System.Drawing.Size(52, 43); 
     
    492494            //  
    493495            this.sTANLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.pRODUKCJABindingSource, "STAN", true)); 
    494             this.sTANLabel1.Location = new System.Drawing.Point(27, 535); 
     496            this.sTANLabel1.Location = new System.Drawing.Point(27, 571); 
    495497            this.sTANLabel1.Name = "sTANLabel1"; 
    496498            this.sTANLabel1.Size = new System.Drawing.Size(100, 23); 
     
    500502            //  
    501503            this.drukujProjektButton.Image = ((System.Drawing.Image)(resources.GetObject("drukujProjektButton.Image"))); 
    502             this.drukujProjektButton.Location = new System.Drawing.Point(296, 515); 
     504            this.drukujProjektButton.Location = new System.Drawing.Point(296, 541); 
    503505            this.drukujProjektButton.Name = "drukujProjektButton"; 
    504506            this.drukujProjektButton.Size = new System.Drawing.Size(50, 43); 
     
    514516            //  
    515517            this.dodajNowyButton.Image = ((System.Drawing.Image)(resources.GetObject("dodajNowyButton.Image"))); 
    516             this.dodajNowyButton.Location = new System.Drawing.Point(394, 470); 
     518            this.dodajNowyButton.Location = new System.Drawing.Point(394, 496); 
    517519            this.dodajNowyButton.Name = "dodajNowyButton"; 
    518520            this.dodajNowyButton.Size = new System.Drawing.Size(95, 32); 
     
    541543            //  
    542544            this.usunButton.Enabled = false; 
    543             this.usunButton.Location = new System.Drawing.Point(296, 470); 
     545            this.usunButton.Location = new System.Drawing.Point(296, 496); 
    544546            this.usunButton.Name = "usunButton"; 
    545547            this.usunButton.Size = new System.Drawing.Size(91, 31); 
     
    593595            "francuski", 
    594596            "hiszpañski"}); 
    595             this.jezykComboBox.Location = new System.Drawing.Point(160, 550); 
     597            this.jezykComboBox.Location = new System.Drawing.Point(160, 576); 
    596598            this.jezykComboBox.Name = "jezykComboBox"; 
    597599            this.jezykComboBox.Size = new System.Drawing.Size(114, 21); 
     
    601603            //  
    602604            this.label1.AutoSize = true; 
    603             this.label1.Location = new System.Drawing.Point(157, 535); 
     605            this.label1.Location = new System.Drawing.Point(157, 561); 
    604606            this.label1.Name = "label1"; 
    605607            this.label1.Size = new System.Drawing.Size(37, 13); 
     
    610612            //  
    611613            this.btnOpenFolder.Image = global::Baza_Reklam.Properties.Resources.folder; 
    612             this.btnOpenFolder.Location = new System.Drawing.Point(439, 444); 
     614            this.btnOpenFolder.Location = new System.Drawing.Point(439, 470); 
    613615            this.btnOpenFolder.Name = "btnOpenFolder"; 
    614616            this.btnOpenFolder.Size = new System.Drawing.Size(35, 23); 
     
    621623            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 
    622624            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
    623             this.ClientSize = new System.Drawing.Size(509, 603); 
     625            this.ClientSize = new System.Drawing.Size(509, 643); 
    624626            this.Controls.Add(this.btnOpenFolder); 
    625627            this.Controls.Add(this.label1); 
  • branches/ReklamaReorganizacja/BazaReklam/ZamowieniaForm.cs

    r645 r646  
    739739            errorMessage += zamowienie.IsidKontaNull() ? "Nie wybrano konta. \n" : ""; 
    740740            errorMessage += zamowienie.IssposobZaplatyNull() ? "Nie wybrano sposobu zap³aty. \n" : ""; 
    741             errorMessage += string.IsNullOrEmpty(klientRow.Country) ? "Brak pañstwa klienta. \n" : ""; 
    742             errorMessage += string.IsNullOrEmpty(klientRow.Adres_Fkatura) ? "Brak adresu faktury klienta. \n" : ""; 
    743             errorMessage += string.IsNullOrEmpty(klientRow.Nip) ? "Brak nipu klienta. \n" : ""; 
    744  
    745             if (klientRow.Country != "Polska") 
    746                 errorMessage += string.IsNullOrEmpty(klientRow.nipKraj) ? "Brak symbolu kraju w nipie klienta. \n" : ""; 
     741            errorMessage += klientRow.IsCountryNull() || string.IsNullOrEmpty(klientRow.Country) ? "Brak pañstwa klienta. \n" : ""; 
     742            errorMessage += klientRow.IsAdres_FkaturaNull() || string.IsNullOrEmpty(klientRow.Adres_Fkatura) ? "Brak adresu faktury klienta. \n" : ""; 
     743            errorMessage += klientRow.IsNipNull() || string.IsNullOrEmpty(klientRow.Nip) ? "Brak nipu klienta. \n" : ""; 
     744 
     745            if (!klientRow.IsCountryNull() && klientRow.Country != "Polska") 
     746                errorMessage += klientRow.IsnipKrajNull() || string.IsNullOrEmpty(klientRow.nipKraj) ? "Brak symbolu kraju w nipie klienta. \n" : ""; 
    747747 
    748748            if (rEKLAMADataSet.REKLAMA.Rows.Count <= 0)