Zbiór zmian 658 dla branches

Pokaż
Ignoruj:
Data:
2009-05-27 17:49:28 (17 years ago)
Autor:
marek
Opis:

re #161

Lokalizacja:
branches/ReklamaReorganizacja/BazaReklam
Pliki:
8 zmodyfikowane

Legenda:

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

    r539 r658  
    11using System; 
    22using System.Collections; 
     3using System.Collections.Generic; 
    34using System.Data; 
    45using System.Data.SqlClient; 
     
    3334        public static void bindujTytuly(ToolStripComboBox toolStripComboBox) 
    3435        { 
    35             SqlCommand command = new SqlCommand(); 
    36             command.Connection = new SqlConnection(ConnString.getConnString().Value); 
    37  
    38             command.CommandText = "select SYMB from [LISTA TYTU£ÓW] where st_aktywny=-1"; 
    39             command.Connection.Open(); 
    40  
    41             SqlDataReader reader = command.ExecuteReader(); 
    42  
    43             if (reader.HasRows) 
    44             { 
    45                 while (reader.Read()) 
    46                 { 
    47                     toolStripComboBox.Items.Add(reader.GetValue(0).ToString()); 
    48                 } 
    49             } 
    50             command.Connection.Close(); 
     36            List<ComboItem> comboItems = new List<ComboItem>(); 
     37             
     38            SqlCommand command = new SqlCommand(); 
     39            command.Connection = new SqlConnection(ConnString.getConnString().Value); 
     40 
     41            command.CommandText = "select Id, SYMB from [LISTA TYTU£ÓW] where st_aktywny=-1"; 
     42            command.Connection.Open(); 
     43 
     44            SqlDataReader reader = command.ExecuteReader(); 
     45 
     46            if (reader.HasRows) 
     47            { 
     48                while (reader.Read()) 
     49                { 
     50                    comboItems.Add(new ComboItem(reader.GetInt32(0), reader.GetString(1))); 
     51                } 
     52            } 
     53            command.Connection.Close(); 
     54 
     55            toolStripComboBox.ComboBox.DataSource = comboItems.ToArray(); 
     56            toolStripComboBox.ComboBox.DisplayMember = "Display"; 
     57            toolStripComboBox.ComboBox.ValueMember = "Value"; 
    5158        } 
    5259 
     
    7481        public static void bindujTypyReklam(ToolStripComboBox toolStripComboBox) 
    7582        { 
    76             /* 
    77             SLOWNIKDataSetTableAdapters.LISTA_TYPOW_REKLAMYTableAdapter ta = 
    78                 new SLOWNIKDataSetTableAdapters.LISTA_TYPOW_REKLAMYTableAdapter(); 
    79  
    80             ta.Connection.ConnectionString = ConnString.getConnString().Value; 
    81  
    82             ((ComboBox)toolStripComboBox.Control).DataSource = ta.GetData(); 
    83             ((ComboBox)toolStripComboBox.Control).DisplayMember = "SYMB"; 
    84             ((ComboBox)toolStripComboBox.Control).ValueMember = "SYMB"; 
    85             toolStripComboBox.SelectedIndex = -1; 
    86              */ 
    87  
    8883            SqlCommand command = new SqlCommand(); 
    8984            command.Connection = new SqlConnection(ConnString.getConnString().Value); 
     
    105100 
    106101 
    107         public static void bindujGrzbiety(ToolStripComboBox toolStripComboBox) 
     102        public static void BindujGrzbiety(ToolStripComboBox toolStripComboBox) 
    108103        { 
    109104            SLOWNIKDataSetTableAdapters.GRZBIETYTableAdapter ta = 
     
    138133        } 
    139134 
     135        public static void BindujGrzbiety(ToolStripComboBox toolStripComboBox, int tytulId) 
     136        { 
     137            List<ComboItem> comboItems = new List<ComboItem>(); 
     138 
     139            SqlCommand command = new SqlCommand(); 
     140            command.Connection = new SqlConnection(ConnString.getConnString().Value); 
     141 
     142            command.CommandText = string.Format("SELECT Id, Nazwa FROM dbo.Grzbiety WHERE TytulId={0} AND Active=1", 
     143                                                tytulId); 
     144            command.Connection.Open(); 
     145 
     146            SqlDataReader reader = command.ExecuteReader(); 
     147 
     148            if (reader != null && reader.HasRows) 
     149            { 
     150                while (reader.Read()) 
     151                    comboItems.Add(new ComboItem(reader.GetInt32(0), reader.GetString(1))); 
     152            } 
     153            command.Connection.Close(); 
     154 
     155            toolStripComboBox.ComboBox.DataSource = comboItems.ToArray(); 
     156            toolStripComboBox.ComboBox.DisplayMember = "Display"; 
     157            toolStripComboBox.ComboBox.ValueMember = "Value"; 
     158        } 
     159 
    140160        public static void bindujAgencje(ToolStripComboBox toolStripComboBox) 
    141161        { 
    142             /* 
    143             SLOWNIKDataSetTableAdapters.AGENCJETableAdapter ta = 
    144                 new SLOWNIKDataSetTableAdapters.AGENCJETableAdapter(); 
    145  
    146             ta.Connection.ConnectionString = ConnString.getConnString().Value; 
    147  
    148             ((ComboBox)toolStripComboBox.Control).DataSource = ta.GetData(); 
    149             ((ComboBox)toolStripComboBox.Control).DisplayMember = "Symbol"; 
    150             ((ComboBox)toolStripComboBox.Control).ValueMember = "Id_agencji"; 
    151             toolStripComboBox.SelectedIndex = -1; 
    152              * */ 
    153  
    154162            SqlCommand command = new SqlCommand(); 
    155163            command.Connection = new SqlConnection(ConnString.getConnString().Value); 
     
    191199                } 
    192200            } 
     201            command.Connection.Close(); 
     202 
    193203            toolStripComboBox.ComboBox.DataSource = kontakTypList; 
    194204            toolStripComboBox.ComboBox.DisplayMember = "Display"; 
    195205            toolStripComboBox.ComboBox.ValueMember = "Value"; 
    196             command.Connection.Close(); 
    197206        } 
    198207 
     
    232241        } 
    233242 
    234         //Przez BindingSource by bylo filtrowanie 
    235         public static void bindujModuly(ToolStripComboBox toolStripComboBox) 
    236         { 
    237             SLOWNIKDataSetTableAdapters.NAZWY_MODULOWTableAdapter ta = 
    238                 new SLOWNIKDataSetTableAdapters.NAZWY_MODULOWTableAdapter(); 
    239  
    240             ta.Connection.ConnectionString = ConnString.getConnString().Value; 
    241  
    242             BindingSource bs2 = new BindingSource(); 
    243             bs2.DataSource = ta.GetData(); 
    244             ((ComboBox) toolStripComboBox.Control).DataSource = bs2; 
    245             ((ComboBox) toolStripComboBox.Control).DisplayMember = "MOD_TYP"; 
    246             ((ComboBox) toolStripComboBox.Control).ValueMember = "MOD_TYP"; 
    247             toolStripComboBox.SelectedIndex = -1; 
    248  
    249             /* 
    250             SqlCommand command = new SqlCommand(); 
    251             command.Connection = new SqlConnection(ConnString.getConnString().Value); 
    252  
    253             command.CommandText = "select Symbol from dbo.AGENCI where aktywny=1 order by Symbol"; 
    254             command.Connection.Open(); 
    255  
    256             SqlDataReader reader = command.ExecuteReader(); 
    257  
    258             if (reader.HasRows) 
    259             { 
    260                 while (reader.Read()) 
    261                 { 
    262                     toolStripComboBox.Items.Add(reader.GetValue(0).ToString()); 
    263                 } 
    264             } 
    265             command.Connection.Close(); */ 
     243        public static void BindujModuly(ToolStripComboBox toolStripComboBox, string title) 
     244        { 
     245 
     246            List<ComboItem> comboItems = new List<ComboItem>(); 
     247 
     248            SqlCommand command = new SqlCommand(); 
     249            command.Connection = new SqlConnection(ConnString.getConnString().Value); 
     250 
     251            command.CommandText = string.Format("SELECT Id, MOD_TYP FROM dbo.[Nazwy Modu³ów] WHERE Tytul='{0}' AND Active=1 ORDER BY MOD_TYP", 
     252                                                title); 
     253            command.Connection.Open(); 
     254 
     255            SqlDataReader reader = command.ExecuteReader(); 
     256 
     257            if (reader != null && reader.HasRows) 
     258            { 
     259                while (reader.Read()) 
     260                    comboItems.Add(new ComboItem(reader.GetInt32(0), reader.GetString(1))); 
     261            } 
     262            command.Connection.Close(); 
     263 
     264            toolStripComboBox.ComboBox.DataSource = comboItems.ToArray(); 
     265            toolStripComboBox.ComboBox.DisplayMember = "Display"; 
     266            toolStripComboBox.ComboBox.ValueMember = "Value"; 
    266267        } 
    267268 
  • branches/ReklamaReorganizacja/BazaReklam/Classes/Helpers/AdHelper.cs

    r649 r658  
    5656        public static AdSize GetAdSize(int horizontal, int vertical, Module module) 
    5757        { 
     58            AdSize adSize = new AdSize(); 
     59 
     60            if (!EnableModuleCount(module)) 
     61            { 
     62                adSize.Width = Convert.ToInt32(module.Width * 10); 
     63                adSize.Height = Convert.ToInt32(module.Height * 10); 
     64                return adSize; 
     65            } 
     66 
    5867            int width = 0; 
    5968            int height = 0; 
     
    8190            } 
    8291 
    83             AdSize adSize = new AdSize(); 
     92             
    8493            adSize.Width = width; 
    8594            adSize.Height = height; 
     
    8796        } 
    8897 
     98        public static bool EnableModuleCount(Module module) 
     99        { 
     100            switch (module.Section.Title.ShortName) 
     101            { 
     102                case "GS": 
     103                    return EnableGsModuleCount(module); 
     104                case "adMot": 
     105                    return EnableAdMotoModuleCount(module); 
     106                default: 
     107                    return EnableAmtModuleCount(module); 
     108            } 
     109        } 
     110 
     111        //TODO: get this info from db, IsSplitable...? 
     112        private static bool EnableAmtModuleCount(Module module) 
     113        { 
     114            switch (module.Name) 
     115            { 
     116                case "AWEB": 
     117                case "AWEF": 
     118                case "ALAF": 
     119                case "AZOF": 
     120                    return true; 
     121            } 
     122 
     123            return false; 
     124        } 
     125 
     126        //TODO: get this info from db, IsSplitable...? 
     127        private static bool EnableGsModuleCount(Module module) 
     128        { 
     129            switch (module.Name) 
     130            { 
     131                case "GOK1M": 
     132                //case "GOK2": 
     133                case "GOK3M": 
     134                //case "GOK4": 
     135                case "GWEW_P": 
     136                case "GWEW": 
     137                    //case "GART_S": 
     138                    return true; 
     139            } 
     140 
     141            return false; 
     142        } 
     143 
     144        //TODO: get this info from db, IsSplitable...? 
     145        private static bool EnableAdMotoModuleCount(Module module) 
     146        { 
     147            switch (module.Name) 
     148            { 
     149                case "ad-Text": 
     150                case "Truck-Text": 
     151                    return true; 
     152            } 
     153 
     154            return false; 
     155        } 
     156 
    89157    } 
    90158} 
  • branches/ReklamaReorganizacja/BazaReklam/Classes/Helpers/ComboBoxHelper.cs

    r643 r658  
    1515        } 
    1616 
     17        public static void Bind<T>(IEnumerable<T> list, ComboBox comboBox, T defaultItem) 
     18        { 
     19            Bind(list, comboBox); 
     20 
     21            comboBox.Items.Insert(0, defaultItem); 
     22        } 
     23 
    1724        //public static int GetItemIndex<T>(T type, int value, ComboBox comboBox) 
    1825        //{ 
  • branches/ReklamaReorganizacja/BazaReklam/ListaReklamNaWydanieForm.Designer.cs

    r561 r658  
    3131            this.components = new System.ComponentModel.Container(); 
    3232            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ListaReklamNaWydanieForm)); 
    33             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); 
    34             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); 
    35             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); 
    36             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); 
    37             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); 
    38             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); 
    39             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); 
    40             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); 
    41             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); 
    42             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); 
    43             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); 
     33            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); 
     34            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); 
     35            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); 
     36            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); 
     37            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); 
     38            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); 
     39            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); 
     40            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); 
     41            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); 
     42            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); 
     43            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); 
    4444            this.dataGridView1 = new System.Windows.Forms.DataGridView(); 
    4545            this.rezerwacjeToolStrip = new System.Windows.Forms.ToolStrip(); 
     
    183183            // tytToolStripComboBox2 
    184184            //  
     185            this.tytToolStripComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 
    185186            this.tytToolStripComboBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 
    186187            this.tytToolStripComboBox2.Name = "tytToolStripComboBox2"; 
    187188            this.tytToolStripComboBox2.Size = new System.Drawing.Size(75, 31); 
     189            this.tytToolStripComboBox2.SelectedIndexChanged += new System.EventHandler(this.tytToolStripComboBox2_SelectedIndexChanged); 
    188190            //  
    189191            // toolStripLabel8 
     
    312314            this.listaReklamDataGridView.AllowUserToAddRows = false; 
    313315            this.listaReklamDataGridView.AllowUserToDeleteRows = false; 
    314             dataGridViewCellStyle1.BackColor = System.Drawing.Color.MintCream; 
    315             this.listaReklamDataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; 
     316            dataGridViewCellStyle12.BackColor = System.Drawing.Color.MintCream; 
     317            this.listaReklamDataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12; 
    316318            this.listaReklamDataGridView.AutoGenerateColumns = false; 
    317319            this.listaReklamDataGridView.BackgroundColor = System.Drawing.Color.White; 
     
    369371            //  
    370372            this.TYP.DataPropertyName = "TYP"; 
    371             dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    372             this.TYP.DefaultCellStyle = dataGridViewCellStyle2; 
     373            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     374            this.TYP.DefaultCellStyle = dataGridViewCellStyle13; 
    373375            this.TYP.HeaderText = "Typ"; 
    374376            this.TYP.Name = "TYP"; 
     
    380382            this.tYTU£DataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    381383            this.tYTU£DataGridViewTextBoxColumn.DataPropertyName = "TYTU£"; 
    382             dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    383             this.tYTU£DataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3; 
     384            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     385            this.tYTU£DataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle14; 
    384386            this.tYTU£DataGridViewTextBoxColumn.HeaderText = "Tytu³"; 
    385387            this.tYTU£DataGridViewTextBoxColumn.Name = "tYTU£DataGridViewTextBoxColumn"; 
     
    391393            this.nRDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    392394            this.nRDataGridViewTextBoxColumn.DataPropertyName = "NR"; 
    393             dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    394             this.nRDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4; 
     395            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     396            this.nRDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle15; 
    395397            this.nRDataGridViewTextBoxColumn.HeaderText = "Nr"; 
    396398            this.nRDataGridViewTextBoxColumn.Name = "nRDataGridViewTextBoxColumn"; 
     
    401403            //  
    402404            this.iDREKLAMYDataGridViewTextBoxColumn.DataPropertyName = "ID REKLAMY"; 
    403             dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 
    404             this.iDREKLAMYDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5; 
     405            dataGridViewCellStyle16.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 
     406            this.iDREKLAMYDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle16; 
    405407            this.iDREKLAMYDataGridViewTextBoxColumn.HeaderText = "Symbol"; 
    406408            this.iDREKLAMYDataGridViewTextBoxColumn.Name = "iDREKLAMYDataGridViewTextBoxColumn"; 
     
    418420            this.sZERDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    419421            this.sZERDataGridViewTextBoxColumn.DataPropertyName = "SZER"; 
    420             dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    421             this.sZERDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6; 
     422            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     423            this.sZERDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle17; 
    422424            this.sZERDataGridViewTextBoxColumn.HeaderText = "S"; 
    423425            this.sZERDataGridViewTextBoxColumn.Name = "sZERDataGridViewTextBoxColumn"; 
     
    429431            this.wYSDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    430432            this.wYSDataGridViewTextBoxColumn.DataPropertyName = "WYS"; 
    431             dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    432             this.wYSDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle7; 
     433            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     434            this.wYSDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle18; 
    433435            this.wYSDataGridViewTextBoxColumn.HeaderText = "W"; 
    434436            this.wYSDataGridViewTextBoxColumn.Name = "wYSDataGridViewTextBoxColumn"; 
     
    481483            this.mODTYPDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    482484            this.mODTYPDataGridViewTextBoxColumn.DataPropertyName = "MOD_TYP"; 
    483             dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    484             this.mODTYPDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle8; 
     485            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     486            this.mODTYPDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle19; 
    485487            this.mODTYPDataGridViewTextBoxColumn.HeaderText = "Modu³"; 
    486488            this.mODTYPDataGridViewTextBoxColumn.Name = "mODTYPDataGridViewTextBoxColumn"; 
     
    523525            this.rABATDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    524526            this.rABATDataGridViewTextBoxColumn.DataPropertyName = "RABAT"; 
    525             dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    526             dataGridViewCellStyle9.Format = "p"; 
    527             this.rABATDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle9; 
     527            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     528            dataGridViewCellStyle20.Format = "p"; 
     529            this.rABATDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle20; 
    528530            this.rABATDataGridViewTextBoxColumn.HeaderText = "Rabat"; 
    529531            this.rABATDataGridViewTextBoxColumn.Name = "rABATDataGridViewTextBoxColumn"; 
     
    535537            this.sTRONADataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    536538            this.sTRONADataGridViewTextBoxColumn.DataPropertyName = "STRONA"; 
    537             dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    538             this.sTRONADataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle10; 
     539            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     540            this.sTRONADataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle21; 
    539541            this.sTRONADataGridViewTextBoxColumn.HeaderText = "Strona"; 
    540542            this.sTRONADataGridViewTextBoxColumn.Name = "sTRONADataGridViewTextBoxColumn"; 
     
    546548            this.nazwaGrzbietuDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 
    547549            this.nazwaGrzbietuDataGridViewTextBoxColumn.DataPropertyName = "nazwaGrzbietu"; 
    548             dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
    549             this.nazwaGrzbietuDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle11; 
     550            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 
     551            this.nazwaGrzbietuDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle22; 
    550552            this.nazwaGrzbietuDataGridViewTextBoxColumn.HeaderText = "Grzbiet"; 
    551553            this.nazwaGrzbietuDataGridViewTextBoxColumn.Name = "nazwaGrzbietuDataGridViewTextBoxColumn"; 
     
    648650            // tytulToolStripComboBox 
    649651            //  
     652            this.tytulToolStripComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 
    650653            this.tytulToolStripComboBox.Name = "tytulToolStripComboBox"; 
    651654            this.tytulToolStripComboBox.Size = new System.Drawing.Size(75, 31); 
     655            this.tytulToolStripComboBox.SelectedIndexChanged += new System.EventHandler(this.tytulToolStripComboBox_SelectedIndexChanged); 
    652656            //  
    653657            // toolStripLabel2 
  • branches/ReklamaReorganizacja/BazaReklam/ListaReklamNaWydanieForm.cs

    r649 r658  
    11using System; 
     2using System.Collections.Generic; 
    23using System.ComponentModel; 
    34using System.Data; 
     
    4849            DBBindings.bindujTytuly(tytulToolStripComboBox); 
    4950            DBBindings.bindujTytuly(tytToolStripComboBox2); 
    50             DBBindings.bindujGrzbiety2(grzbietToolStripComboBox); 
     51            //DBBindings.bindujGrzbiety2(grzbietToolStripComboBox); 
    5152            DBBindings.bindujAgencje(agencjaToolStripComboBox); 
    5253            DBBindings.bindujAgentow(agentToolStripComboBox); 
    53             DBBindings.bindujModuly(modToolStripComboBox); 
    54              
    55             ((ComboBox)tytToolStripComboBox2.Control).SelectedValueChanged += tytToolStripComboBox2_SelectedIndexChanged; 
     54            //DBBindings.BindujModuly(modToolStripComboBox); 
    5655        } 
    5756 
     
    125124            { 
    126125                command.CommandText += " AND (GRZBIET = @grzbiet) "; 
    127                 command.Parameters.AddWithValue("@grzbiet", ((BoundItem)grzbietToolStripComboBox.SelectedItem).IDEvalue1); 
    128             } 
    129  
    130           //  ((CheckBox)((ToolStripControlHost)bindingNavigator1.Items["DRCheckBox"]).Control).Checked = true; 
    131  
    132           
     126                command.Parameters.AddWithValue("@grzbiet", ((ComboItem)grzbietToolStripComboBox.SelectedItem).Value); 
     127            } 
    133128 
    134129            SqlDataAdapter adapter = new SqlDataAdapter(); 
     
    138133             
    139134            Cursor = Cursors.Default; 
    140              
    141135        } 
    142136 
     
    164158                DataRowView row = (DataRowView)listaReklamNaWydanie2BindingSource.Current; 
    165159                int idRek = Convert.ToInt32(row["ReklamaId"]); 
    166                // this.reklamaTableAdapter.FillByReklamaId(this.rEKLAMADataSet.REKLAMA, idRek); 
    167160 
    168161                OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek); 
    169162                OrderDetails.getOrderDetails().ShowDialog(); 
    170                 /* 
    171                 OrderDetails od = new OrderDetails(); 
    172                 od.PokazSzczegolyZamowienia(idRek); 
    173                 od.ShowDialog(); */ 
    174163            }      
    175164        } 
    176  
    177         private void tytToolStripComboBox2_SelectedIndexChanged(object sender, EventArgs e) 
    178         { 
    179             if (((ComboBox)tytToolStripComboBox2.Control).SelectedItem != null) 
    180             { 
    181                 ((BindingSource)((ComboBox)modToolStripComboBox.Control).DataSource).Filter = "tytul = '" + tytToolStripComboBox2.Control.Text + "'"; 
    182                 modToolStripComboBox.SelectedIndex = -1; 
    183                 modToolStripComboBox.SelectedIndex = -1; 
    184             } 
    185         } 
    186  
    187165 
    188166        private void wyczyscFiltrToolStripButton_Click(object sender, EventArgs e) 
     
    276254            odToolStripTextBox.Clear(); 
    277255            doToolStripTextBox.Clear(); 
    278             ((BindingSource)((ComboBox)modToolStripComboBox.Control).DataSource).Filter = "";           
     256            if (modToolStripComboBox.ComboBox != null)  
     257                modToolStripComboBox.ComboBox.DataSource = new List<ComboItem>(); 
    279258            modToolStripComboBox.SelectedIndex = -1; 
    280259            modToolStripComboBox.SelectedIndex = -1; 
     
    287266        private void drukujToolStripButton_Click(object sender, EventArgs e) 
    288267        { 
    289             PrintDGV.Print_DataGridView(listaReklamDataGridView,50); 
     268            PrintDGV.Print_DataGridView(listaReklamDataGridView, 50); 
    290269        } 
    291270 
     
    364343            _listaReklamNaWydanie = null; 
    365344        } 
     345 
     346        private void tytulToolStripComboBox_SelectedIndexChanged(object sender, EventArgs e) 
     347        { 
     348 
     349            if (grzbietToolStripComboBox.ComboBox == null || tytulToolStripComboBox.ComboBox == null) return; 
     350             
     351            grzbietToolStripComboBox.ComboBox.DataSource = new List<ComboItem>(); 
     352            grzbietToolStripComboBox.ComboBox.Text = string.Empty; 
     353 
     354            if (tytulToolStripComboBox.ComboBox.SelectedItem == null || ((ComboItem)tytulToolStripComboBox.ComboBox.SelectedItem).Value == 0) 
     355                return; 
     356             
     357            DBBindings.BindujGrzbiety(grzbietToolStripComboBox, ((ComboItem)tytulToolStripComboBox.ComboBox.SelectedItem).Value); 
     358        } 
     359         
     360 
     361        private void tytToolStripComboBox2_SelectedIndexChanged(object sender, EventArgs e) 
     362        { 
     363            if (modToolStripComboBox.ComboBox == null || tytToolStripComboBox2.ComboBox == null) return; 
     364             
     365            modToolStripComboBox.ComboBox.DataSource = new List<ComboItem>(); 
     366            modToolStripComboBox.ComboBox.Text = string.Empty; 
     367 
     368            if (tytToolStripComboBox2.ComboBox.SelectedItem == null || 
     369                ((ComboItem) tytToolStripComboBox2.ComboBox.SelectedItem).Value == 0) 
     370                return; 
     371 
     372            DBBindings.BindujModuly(modToolStripComboBox, 
     373                                    ((ComboItem) tytToolStripComboBox2.ComboBox.SelectedItem).Display); 
     374        } 
    366375    } 
    367376} 
  • branches/ReklamaReorganizacja/BazaReklam/ListaReklamNaWydanieForm.resx

    r593 r658  
    162162        iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 
    163163        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABhBJREFUSEuFVQlQ 
    164         1HUY/ZY9RJAFPABdEEE8EIgFdUzGqEmtNE0NHTA18UKTw8ELDVAQxWOyKRJFEU8SJylrGkNNdMyGyauh 
    165         wMxMkF1wuVwWWI4F3df3+69XZbYzb/Z+7/u97/veT0b//ZDRTgqnZppMcgpVOdp5PHhIMqvZep86qJzM 
    166         dJ6KqJiq+BXRQwZewPWPr47QVLsDVDapcJR1Q+k8ZP2ZgI9uxSLjxmKsL52L2RcmICDfB/IMWSWtogT+ 
    167         d2+G4v8FDpI97aaDb5wYbT2sX4+j+o3IubMG636JwPySsZhyYRheO+OFsFMahH3nzRgMtzwnUBKdIy0F 
    168         s4A9Q/Z8IUG+k4rXXIvC5/o0HL6bhpSy6Zh/OQCRJf6YcXEoJhf74fUzg1jAEyHfeMD/y77wK3SF+xEH 
    169         8EnKyZfGMbnD80Wy6NCa61E4pt+EvXeSEHM9FIuvaTE4xxV+23zhuWUAPDdroMnQYOIPvk8EfL9wRf8C 
    170         R6jzeoKW0I+kpJEs0PPvp2DPJxwPtRbUpGN/xYdYdDUYMddCEXM1FN7ZLuiu64bZYEa7oR1N94yYe2sE 
    171         tF+7Y3hhHww67gyPfEe45veAcpsa9BZ9wuR+z/ZERnupLK9qLY5WbcYH18dgyVUtC4zEostaDNytRmNN 
    172         I3RVOujv6lGlq8L8Ci2CT7ph2Ine8C5Qw40F1IdUUO12BSUq69nsSBboYzvFTno1/FiwNbciBRt/jcK8 
    173         n/wRfUWLaCafUxIETbYaJoMJ1fpq1OjvocZQg+UVYxH4VT/4sT2ex5zQ96gDeh1WQZHDvUh1B7c7i5kD 
    174         bKdIoe0Jl2ci+3YyZl0aAe89zvBkUk+uXJPtBPskBRoNjTDcM6DOUI8GowHue+TotVUFhz1K2OcpEHLJ 
    175         Cw78bLdXAdowHDSNzjL5VIYzUSp9n3ljGZJLF2DSeW/4bBkINAGddZ3obuyG5b4FxjojamtrUV9fj5am 
    176         VqANQNcjtAM7GuaiR54cxMKUEgRaaHeHyZcz+hNtorKMsmVYVDIR488OhHtGP7TVtqGyshI6nQ4GA1de 
    177         V4eGhgYYjUY0NTXBZDKhpaUFzaZmdBmBVMM0KHJ5kz/rwTuhBcWqWph8I8OHaDOVJ5cuxPTi0RhXpIEb 
    178         C7TXdnBT9aiuruHKn5ILUrPZjDZzO9rNHWhrbYe1mQXuzYBsHwvs4CavDgUtU4n42G6bpvV0MeFKJCac 
    179         DsTobz3gnt4fD+qsqNcZYaplQpNZskVU3dpqRndHN7osFjxkix5YrABblG6IAk8i++/DCxcCel9+l8l3 
    180         2AQSadfUM+EIPzUcASf7IuycF6Irg7BAp0V8VRiGFPSUPG9tbUVneyfMlhbM/sMHEbwLM38PQtTNEMz4 
    181         mUn3sMCKMaCVL4HepItMnsbwJYqhd/3yNHilKACDT7hgKM+2mG/xPIThkKEEuiF5bumwwNJlQcTNEdLU 
    182         KHLtbMS7GRluoLixoARP0BDKZ/J4xgAib3KhZKoMKwqEpqAXBvLiPIYXv7bPUrAXT09g6epkgUAo9sme 
    183         kmexQGwYKH4UaCk3WE77mXw6w0WsmpxWUIJbjgs8WMCNl+YxxAKp9sl5ZoGHJh5LM6MDmPVbMCiHSXcx 
    184         shmJ/D7uZRYYBBpNhcy5lSHSVWnbZpHnq+icOs8eTkdUUB9UwYnR64ASAec1yOAmJlW9jSTdO0jWR2Aa 
    185         h6BELipPZM+Xc/VxPP9RdIPD+gDzvcdwYzyJboWU5/FUrtxrB+UBxn47yQZ5rsw2go+9Fn4L8kxnrpib 
    186         GifA5NFUzRl6mEnXMPyfrf7xKeylPF9IlyiTNzJHZRs9YYUgF6Qf8yKlczMlS5hYeB7LtkRy5TbyVMYY 
    187         hrgT/vUQx3GU8nw8R+5SRT2t4+BK9eX1HwZay1WuZmtWMhIDmdwLtFjVLHkul2wRlQty9bPW/FNFiIjL 
    188         wk+K3CD6lCbRaYqS36alyiaJcI68kibSBWkU5ZTLv8185LmwxfFF5M+KiQtcXOQicqcwRHBtYGxjiAhI 
    189         Y4g5n84Q09KP8WRinmfP8z4TpxFCHLkiFUVwSTeVAG+oWCJpzlUvqvovquKJGSZRKBIAAAAASUVORK5C 
     164        1HUY/ZY9RJAFPABdDkE8gVhRx2SMmtRK08TUAVMTLzQPHLzQAAUxPCabIrlEvFCxtKxpDDXRMRsmr4ZC 
     165        MzNBdsHlcllgORZ0X9/vvx5kZDvzZu/3vt/7vu/9ZPTfDxntojBqoEkkpxCVo53Hw0cks5qtD6iVbpCZ 
     166        zlMBFVI5vyJ6xMALuJ776hBNsdtHJRO/GGndVDwXaX/F4OPby5FycxE2Fs/BrAvjEXDYF/IUWRmtoRj+ 
     167        d0+G4v8F9pM9ZdD+N46Nsh7Ub0SefjOy7q7Dhl+nY17RGEy+MBivnfFC6CkNQr/3YQyAW64TKI7OkZaC 
     168        WcCeIetaSJDvosJ11yJxRJ+Eg/eSkFASjnmXAxBRNBTTLg7CpEJ/vH6mPwt4Yvi3Hhj6VW/4n3CF+yEH 
     169        8ElukB+NZXKHrkXS6MC665E4qt+C7LtxiL4egkXXtBiQ5Qr/7X7w/KgfPLdqoEnRYMKPfk8F/L50Rd98 
     170        R6hzu4MW00+kpBEs0P2fp2DPxx8JseZXJmNv6YdYeDUY0ddCEH01BD7pLuio7oDZYEaLoQX1942Yc3sY 
     171        tN+4Y8iJXuh/zBkehx3hergblNvVoLfoUyb379wTGWVTSW75euSVb8UH10dj8VUtC4zAwstaeGeoUVdZ 
     172        B125Dvp7epTryjGvVIvgk24YfLwnfPLVcGMB9QEVVBmuoFhlDZsdwQK9bKfYRa+G5QVbc0oTsPm3SMz9 
     173        eSiirmgRxeSzi4KgSVfDZDChQl+BSv19VBoqsax0DAK/7gN/tsfzqBN65zmgx0EVFFnci0R3cLvTmDnA 
     174        dooE2hFzeQbS78Rj5qVh8Ml0hieTenLlmnQn2McpUGeog+G+AdWGGtQaDXDPlKPHNhUcMpWwz1Vg+CUv 
     175        OPCzXbYCtGkIaCqdZfIpDGeiRPoh9eZSxBfPx8TzPvD9yBuoB9qq29BR1wHLAwuM1UZUVVWhpqYGjfVN 
     176        QDOA9sdoAXbWzkG3XDmIhSkhCLTA7i6TL2P0JdpCJSklS7GwaALGnfWGe0ofNFc1o6ysDDqdDgYDV15d 
     177        jdraWhiNRtTX18NkMqGxsRENpga0G4FEw1QocniTP+/GO6EFLVc1Mvlmhi/RVroRX7wA4YWjMLZAAzcW 
     178        aKlq5abqUVFRyZU/IxekZrMZzeYWtJhb0dzUAmsDC9yfBtkeFtjJTV4bAlqqEvGxwzZNG+lizJUIjD8d 
     179        iFHfecA9uS8eVltRozPCVMWEJrNki6i6qcmMjtYOtFsseMQWPbRYAbYo2RAJnkT235cXbjjoffk9Jt9p 
     180        E4il3VPOhCHs1BAEnOyN0HNeiCoLwnydFivLQzEwv7vkeVNTE9pa2mC2NGLWn76Yzrsw448gRN4ajmm/ 
     181        MGkmC6waDVr9EuhNusjkSQw/omh61z9Xg1cKAjDguAsG8WyL+RbPAxkOKUqgA5LnllYLLO0WTL81TJoa 
     182        RY6djTiDkeIGWjEGFOMJGkiHmXwlox+RD7lQPJWFFgRCk98D3rw4T+DFr+3TFOzFsxNY2ttYIBCKPbJn 
     183        5GkssDwUtHIkaAk3WE57mTyc4SJWTU6rKMYtywUeLODGS/MEYoFUe+Q8s8AjE4+lmdEKzPw9GJTFpLsZ 
     184        6YxYfr/iZRboDxpFJ5hzG0Okq9K2zSLP19A5da49nA6poN6vghOjxz4lAs5rkMJNjCt/G3G6dxCvn46p 
     185        HIISuag8lj1fxtWv4PmPpJsc1vuY7z2GG+NpdCukPF9JN5TZdlDuY+y1k2yQ58hsI/jEa+G3IE915oq5 
     186        qSsEmDyKKjhDDzLpOsbQztU/OYW9lOcL6BKl8kZmqWyjJ6wQ5IL0E16kZG6mZAkTC8+Xsy0RXLmNPJEx 
     187        miHuhH89xHEcpTwfx5G7RFFDGzi4Ev14/QeD1nOVa9ma1YzYQCb3Ai1SNUieyyVbROWCXN3ZmudVhIi4 
     188        LPylyA2iz2ginaZI+R1aoqyXCGfLy2gCXZBGUU45/NvUx54LWxxfRN5ZTFzg4iIXkTuZIYJrE2M7Q0RA 
     189        EkPMeThDTEsfxtOJ6cqerj4TpxFCHLkiFUVwSTeVAG+oWCJpzlUvqvpvT5uJDfaShgcAAAAASUVORK5C 
    190190        YII= 
    191191</value> 
     
    337337    <value>17, 56</value> 
    338338  </metadata> 
     339  <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 
     340    <value>17, 56</value> 
     341  </metadata> 
    339342  <data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 
    340343    <value> 
     
    384387    <value> 
    385388        iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 
    386         YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABA5JREFUSEvtVH1M 
    387         W1UcnbLgMBoStwkxAQKWSEdMwIgUQ+g2CixAIWPa0LTQsHTIh0Yjshq1drhBSwi2ItDRbdCWL+lY5DsS 
    388         ZAnaAB3UMD4qSiQbAwlZ3HSBMd3I8Xdfim4VMdE//Gc3OXnv3XfvOff8zr13x46H7b9WQCgU7pTL5QcV 
    389         CsV+4vIheP1bzkdp4iMMeXl5T0ul0qSMjIzi1NTUMQLS09ORlJQ0FRUVpQ8MDAyhcY+5x2+vRyvclZ2d 
    390         fS43N3c1MzNzvqCgwEXvG1qtFgaDAUajEQ0NDTCbzbBYLNDpdEhMTFwJDw9/h5h3E3ZuqyAWiz8mYuTk 
    391         5KC9vR12ux39/f3o6OiAzWZDY2Mj6uvrOREmYLVaObH8/HxERkZeIjcpJPAEgVXgry0hIeEKs9/T0wOn 
    392         0wmHw4GhoSEMDg5yZGzFRUVFoAyQnJyM+Ph4UCZQq9XQaDSQyWT3goODW0noBXdGrMx/tri4uNm0tDS0 
    393         tbWhpqYGo6Oj6OvrQ2FhIcrLyyGRSDhS9iQyToQ5Wltbw2ZzuWaQlSW7fVShqI2IiNj3QD7UURAdHb3h 
    394         crnQ2dkJvV7PlWt6evoPApZDllwG1fFiKJVKsJJOTk5iYWEBKyvLMNY1ocrUjYraDpp7dCUsLCyRRJ7c 
    395         3AS+oaGh75OT31QqFZgbJjQxMYGlpUVMTV7GyVNV0JSeQf7rKohpRzF3LKfRkRHY2nthH7+GOxvA3C3A 
    396         1HsZsbGCXiKPcpeM29fP8Hi845THOitFU1MTuru7MDJsh766DRMzS1i8uQHHj4Cy8G0cTk/jgrZ91gpL 
    397         5xjmfgbmbwCOReDC90DKIeEKcR4j+G2Gwbaaf0hIyJsxMTGrZWVlOHvGBIu5GV988xOu/wpcuQkMk4D+ 
    398         /DAOCGO5c/GpoRJ1A1fRPw8M/AB8Pgucc95FgujAMvGVEILvz5s58aPdoKRQb3xUUoLK2hZ8eRUYuQZ8 
    399         Rc+uOeCT7m/xPJ8/5u/v3yyTSm6fMPXhtBOou3QPhq/XUdl0Ec/xnh0krhOeAkyMiewJCgrKEYtTf9Fo 
    400         q2GeAVoo7+Yp4PQ48EGlFX5+e1tonI4ca+jEr71XPQC1ZQYVDRepfCmr3t7e9fT/NVaVrY4GOzC7Kfhj 
    401         bPKHlnHoeq+jtGsZFee/g0gkuuXl5XWWxmQS9vH5/LxDItGsVHLkbozgRZePj4+Z+ksJLxMe30qA9XEi 
    402         AoHgDar1+lvqKrx7yoiMw+I7vr6+jfTvJCGCwC6/PYSDhGLmilBE2E94ivDgofNQYyJ7qdZycmMNCAho 
    403         Jesm6tMSku8jYOPYng8g8NzPv786PERYJuxCe4nwKuEV9ztbtee1zd3E/7RqD37uk01ipWCWGdj7tta3 
    404         InnY9/9V4HfchCTtVio9tgAAAABJRU5ErkJggg== 
     389        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABBBJREFUSEvtVH1M 
     390        W1UcnbLgMBoStwkxAQJCpCMmYESKIXQbBRagkDFtaFogjA750GhEVqPWDjdoCcFWBDq6DdpSQDoW+Y4E 
     391        WYI2fAxqGB8VJZKNgaRZ3HSBMd3I8Xdfim4VMdE//Gc3OXnv3XfvOff8zr13x46H7b9WQCAQ7JTJZAez 
     392        s7P3E5cXwePfcj5KEx9hyM/Pf1oikSSmp6eXpKSkjBOQlpaGxMTE6cjISK2/v38QjXvMNX57PVrhrqys 
     393        rHN5eXmrGRkZC4WFhY7c3NwNtVoNnU4HvV6PxsZGGI1GmEwmaDQaJCQkOMPCwt4h5t2EndsqiESij4kY 
     394        OTk5aG9vh81mQ39/Pzo6OmC1WtHU1ISGhgZOhAmYzWZOrKCgABEREZfITTIJPEFgFfhri4+Pv8Ls9/T0 
     395        wG63Y2xsDENDQxgcHOTI2IqLi4tBGSApKQlxcXGgTKBUKqFSqSCVSu8FBga2ktALroxYmf9ssbGxc6mp 
     396        qWhra0NtbS1GR0fR19eHoqIiVFRUQCwWc6TsSWScCHO0traGzeZwzCIzU3r7aHZ2XXh4+L4H8qGOwqio 
     397        qA2Hw4HOzk5otVquXDMzM38QsBwyZVIojpdALpeDlXRqagqLi4twOlegr7eg2tCNyroOmnvUGRoamkAi 
     398        T25uAu+QkJD3yclvCoUCzA0TmpycxPLyEqanLuPkqWqoys6g4HUFRLSjmDuW0+jICKztvbBNXMOdDWD+ 
     399        FmDovYyYGH4vkUe6Ssbt62eCg4OPUx7rrBQWiwXd3V0YGbZBW9OGydllLN3cwNiPgLzobRxOS+WCtn7W 
     400        ClPnOOZ/BhZuAGNLwIXvgeRDAidxHiP4bIbBtppvUFDQm9HR0avl5eU4e8YAk7EZX3zzE67/Cly5CQyT 
     401        gPb8MA4IYrhz8amuCvUDV9G/AAz8AHw+B5yz30W88MAK8ZUSAu/Pmznxod0gp1BvfFRaiqq6Fnx5FRi5 
     402        BnxFz6554JPub/E8jzfu6+vbLJWIb58w9OG0Hai/dA+6r9dRZbmI54KfHSSuE+4CTIyJ7AkICMgRiVJ+ 
     403        UalrYJwFWijv5mng9ATwQZUZPj57W2ichhyr6MSvvVczAKVpFpWNF6l8yauenp4N9P81VpWtjgY7MLsp 
     404        +GNs8oemCWh6r6OsawWV57+DUCi85eHhcZbGZBD28Xi8/ENC4ZxEfORuNP9Fh5eXl5H6ywgvEx7fSoD1 
     405        cSJ8Pv8NqvX6W8pqvHtKj/TDojve3t5N9O8kIZzALr89hIOEEuaKUEzYT3iK8OChc1NjInup1jJyY/bz 
     406        82sl6wbqUxOS7iNg49ie9yMEu55/f3W4ibBM2IX2EuFVwiuud7Zq92ubu4n/adVu/Nwnm8RKwSwzsPdt 
     407        rW9F8rDv/6vA75x/JOSsngmYAAAAAElFTkSuQmCC 
    405408</value> 
    406409  </data> 
     
    424427    <value> 
    425428        iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 
    426         YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABY1JREFUSEuVVWlM 
    427         VFcYHVpbMdLUFiyNkDRto5WiMY22FNJUfxBLWBQtVBEtatuURS0oCiqyqCxRLJsR1EBBVkGQbWDsMDBA 
    428         IVNkKSJ0HDaBmQFmcRgEBKmcfvd10pqoWF5y8u7Me/ec8333vnONeC++jOZ5hnmePf9Rbm7u9vPnYw5F 
    429         R0eHRp49feFMeHjq2TMRBVFnon6NvRArSUhKkiYmJrbRbAvC4gULpKWlVctHNBhSPYBcNwnlxByU08DQ 
    430         DNDzCJDR+HR8ytzq1asDiPw9wisLEklISIhUaPUY/wtQEZlyEhh4SMRjQOcDoEMHCDsG4bB58y9EbEcw 
    431         XpBARETE1obb7dA9/od8aALoHwe69YCURO6SQAf9PnzQp5GIdxJMFyTg4uJifqO49LGaBBQkwNA8+gTl 
    432         shmk/TGJcw16nKgew9a43x5ZHS28sSqo1O98xCmbi3FxX+7bt285iS0izLcxeIuoTS3qOaBVAwQKpxEs 
    433         fIiImofwr9TjJ/4YDpWP4QDhxxItHDOU2JPcgJYGMbKzsydDQkLiTE1NV5DIa8+trLGx0T4jI0N2q6oG 
    434         lbeqUC6W4GLdMA7ydUhumsYJEjtcQQJlD+BNAt8Xa2GbPIhr9b0YVQyitrYWR44c4RP5qmd2WUtLi0tN 
    435         Tc1Ma2vrk4mJCWg1agwr5NAo7qOs5T5cs5W40DCFgAodfEu1+OGmGl43RrG7YBQfx0jRJ72De/fuoays 
    436         HK6urnEk8IGhZTwetWWxQCAYmp2dxfj4OLRaLdRqNQYGBiCVSjHQ/SdSqqTYeX0EoSI9uddgf5EKewpG 
    437         4Jk/gg1J/bhY3o6i7MsQCYoRHBysNTY2/m8TZGZmftPV1YWpqSnodDpoNBqMjIxgeHgYnZ2daGtrg+xO 
    438         C9zTunD8lo4E1NhL7j1J0D1PCacMObYk3UVT6reYLd+O9KwCrF27NpEqWMNVkZKSkspc6/V6jlylUnHk 
    439         Q0ND6O3thUQiwe3fJRDWSmB3aQCBAi12k/MdRO6WrcBWat+a0+2QVGZhumw/qsSN2LRpUwWROxPe5F25 
    440         cuU26ztry+joKEcul8u5FjHQ4qO+vh4tjXXwSGmFd7EKu8j9jutKfJ2jxMarg/gkogkNYhGE1fWoEdfC 
    441         w8Ojg8i9Ce/ysrKylGNjY1xblEolRz44OIj+/n709fWhqakJIpEINaIqlAmq8WF0L764LMe6+H4sPyXD 
    442         50ReKRRBUMEHcUEsFsPPz2+UyE9ykZKcnKxj7llrFAoF55qRs/Z0d3ejubkZlZWVHISCCly7KURIei3O 
    443         5dairJyPzNRLOHE8CI6OjrC3t0dgYCCcnZ0lRB5OeJ8XFBQUGhsbi/z8fPT09HAVMOcymYzbeu3t7Sgp 
    444         KUFpaSkqyCVzmnb1MkJPHofr1i2wsbHBypUrYW1tDQcHB+YeJiYm6UR+gLCC5+/vb5+TkwM+n4+YmBhQ 
    445         RRwpE2HblI2Lioo4gaSkJLi7u8PW1haUqrCysmILCi8vL865j49P//r1668bGRn9TOQbCUt55ubmS729 
    446         vY/SOXCfETGEhYUhKioKdXV1XBWFhYUsDthHxBEz17SQOHbsGHx9fWfc3NxqLCwsWMqmEMIIrtwCGyKd 
    447         5br5kiVLtjg5OaWQkCovLw90AIHaB8oYBAQEcKUTEYsDREZGMuIBEsqneWk0nzk+SNhM+Ijw9r9fMg3Y 
    448         xZLwLYL1smXLPLdt25ZOQnrKJlbNHEN8fDwbP/b09BRbWlqmUxuuGhZyF90/JVgSTAivGjifubGoZUlo 
    449         RlhnZmb2HQnlh4eH62mdeuzs7AoMblnWHCJ8ZXDL3mdH6LxR/bQae/F11jbCBsJeg1O2r5nbzwxu3zBU 
    450         /iLDL/2fCTFn7xBYOrJzeMFuX6piKJ2J/e8WPE36N5Iz1fIHqihRAAAAAElFTkSuQmCC 
     429        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABY1JREFUSEuVVXtQ 
     430        VFUcXsoSR5osMBphpqlGk9BxGi2CadI/GGN4CBqkiIZaTTzUQFFQkYfKYxTiZYI6EMhTEOTN2rLsAsFs 
     431        wEqI0Lq85LELLLsui4Agydfv3HbKGZXiznxzz+695/u+3++c+x0D3osvgwWeYYFnz3+Um5u748KF6MNR 
     432        UVEhEefOxJ4NC0s9dza8IPJs5C8xsTGShKQkWWJiYivNNiMsXbRAWlpazdCIGoOqBxjSTkE5OQ/lDDA4 
     433        C3Q/AuQ0Do39aX7t2rX+RP4O4aVFiSQkJEQoNDpM/AmoiEw5BfQ/JOJxoOMB0K4FBO0DsNu69WcitiEY 
     434        LkogPDzcuaG5DdrHf5MPTgJ9E0CXDpCRyF0SaKffRw55NxLxLoLxogScnJxMbxSXPh4jAQUJMLSMPkG5 
     435        fBZpv0/hfIMOJ2vG4Rz36yOLY4U31gSW+l4IP211MS7u8/37968ksSWEhTYGbwm1STo2D9xWAwGCGQQJ 
     436        HiJc9BB+VTr8UDGOw+XjOEj4vkQD+wwl9iY3QNogRnZ29lRwcHCcsbHxKhJ55bmVNTY22mZkZMhvVYtQ 
     437        dasa5WIJLtYN41CFFslNMzhJYkcqSaDsAbxI4NtiDayTB3CtvgejigHU1tbi6NGjFUS+5pldJpVKnUQi 
     438        0Wxzc/OTyclJaNRjGFYMQa24jzLpfbhkKxHbMA3/Si18SjX47uYYPG+MYk/BKD6MlqFXdgf37t1DWVk5 
     439        XFxc4kjgPX3LeDxqy1I+nz84NzeHiYkJaDQajI2Nob+/HzKZDP1dfyClWoZd10cQItSRezUOFKmwt2AE 
     440        Hvkj2JTUh4vlbSjKvgwhvxhBQUEaQ0PDfzdBZmbmV52dnZienoZWq4VarcbIyAiGh4fR0dGB1tZWyO9I 
     441        4ZbWiRO3tCQwhn3k3oME3fKUcMgYwraku2hK/Rpz5TuQnlWA9evXJ1IF67gqUlJSUplrnU7HkatUKo58 
     442        cHAQPT09kEgkaP5NAkGtBDaX+hHA12APOd9J5K7ZCjhT+9adaYOkKgszZQdQLW7Eli1bKonckfA678qV 
     443        K82s76wto6OjHPnQ0BDXIgZafNTX10PaWAf3lNvwKlZhN7nfeV2JL3OU2Hx1AB+FN6FBLISgph4icS3c 
     444        3d3bidyL8DYvKytLOT4+zrVFqVRy5AMDA+jr60Nvby+ampogFAohElajjF+D96N68NnlIWyI78PK03J8 
     445        SuRVAiH4lRUgLojFYvj6+o4S+SkuUpKTk7XMPWuNQqHgXDNy1p6uri60tLSgqqqKg4BfiWs3BQhOr8X5 
     446        3FqUlVcgM/USTp4IhL29PWxtbREQEABHR0cJkYcR3uUFBgaGxMTEID8/H93d3VwFzLlcLue2XltbG0pK 
     447        SlBaWopKcsmcpl29jJBTJ+DivA1WVlZYvXo1LC0tYWdnx9zDyMgoncgPElbx/Pz8bHNyclBRUYHo6GhQ 
     448        RRwpE2HblI2Lioo4gaSkJLi5ucHa2hqUqrCwsGALCk9PT865t7d338aNG68bGBj8SOSbCct5pqamy728 
     449        vI7ROXCfETGEhoYiMjISdXV1XBWFhYUsDthHxBEz17SQOH78OHx8fGZdXV1FZmZmLGVTCKEEF26B9ZHO 
     450        ct102bJl2xwcHFJISJWXlwc6gEDtA2UM/P39udKJiMUBIiIiGHE/CeXTvDSazxwfImwlfEB4858vmQbs 
     451        Ykn4BsFyxYoVHtu3b08nIR1lE6tmniE+Pp6NH3t4eIjNzc3TqQ1X9Qu5m+4fE8wJRoSX9ZzP3FjUsiQ0 
     452        IWwwMTH5hoTyw8LCdLRO3TY2NgV6tyxrDhO+0Ltl77MjdMGoflqNvfgqaxthE2Gf3inb18ztJ3q3r+kr 
     453        f5Hh//yfCTFnbxFYOrJzeNFu/1NFXzoT+98teJr0LxK51eCKmdQ4AAAAAElFTkSuQmCC 
    451454</value> 
    452455  </data> 
  • branches/ReklamaReorganizacja/BazaReklam/OrderDetails.cs

    r653 r658  
    227227            if (SelectedSection == null) return; 
    228228 
     229            txtHorizontal.Text = 1.ToString(); 
     230            txtVertical.Text = 1.ToString(); 
     231 
    229232            ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox); 
    230233            if (SelectedSection.Modules.Count > 1) 
     
    607610        private void SprawdzBledy() 
    608611        { 
    609             //if (ogl_dzialComboBox.SelectedValue == null) 
    610             //{ 
    611             //    MessageBox.Show("Wybierz dzia³."); 
    612             //    zATWIERDZONO_DO_DRUKUCheckBox.CheckState = CheckState.Unchecked; 
    613             //    return; 
    614             //} 
    615  
    616612            if (SelectedModule == null) 
    617613            { 
     
    16141610            wYSTextBox.Text = SelectedModule.Height.HasValue ? (SelectedModule.Height.Value * 10).ToString("#0") : 1.ToString(); 
    16151611 
    1616             bool readOnly = !EnableModuleCount(SelectedModule); 
     1612            bool readOnly = !AdHelper.EnableModuleCount(SelectedModule); 
    16171613            txtHorizontal.ReadOnly = readOnly; 
    16181614            txtVertical.ReadOnly = readOnly; 
     
    16201616            txtVertical.BackColor = readOnly ? SystemColors.InactiveCaptionText : Color.White; 
    16211617 
    1622             //if (readOnly) 
    1623             //{ 
    1624             //    txtHorizontal.Text = 1.ToString(); 
    1625             //    txtVertical.Text = 1.ToString();                 
    1626             //} 
     1618            if (readOnly) 
     1619            { 
     1620                txtHorizontal.Text = 1.ToString(); 
     1621                txtVertical.Text = 1.ToString(); 
     1622            } 
    16271623 
    16281624            //Enable/Disable dzial rozdzial combos... 
     
    16441640 
    16451641                NavigationColumnRepository navigationColumnRepository = new NavigationColumnRepository(ConnString.getConnString().Value); 
    1646                 ComboBoxHelper.Bind(navigationColumnRepository.FindAllActiveByTitle(SelectedTitle), ogl_dzialComboBox); 
     1642                ComboBoxHelper.Bind(navigationColumnRepository.FindAllActiveByTitle(SelectedTitle), ogl_dzialComboBox, new NavigationColumn(0, "-- nieokreœlony --")); 
    16471643                ogl_dzialComboBox.DisplayMember = "Name"; 
    16481644                ogl_dzialComboBox.ValueMember = "Id"; 
     
    16581654 
    16591655                    ogl_dzialComboBox.SelectedIndex = GetNavigationColumnIndex(Reklama.ogl_dzial); 
    1660                     if (Reklama.ogl_rozdzial > 0) 
     1656                    if (!Reklama.Isogl_rozdzialNull() && Reklama.ogl_rozdzial > 0) 
    16611657                        ogl_rozdzialComboBox.SelectedIndex = GetNavigationSubColumnIndex(Reklama.ogl_rozdzial); 
    16621658 
     
    16771673        } 
    16781674 
    1679         private static bool EnableModuleCount(Module module) 
    1680         { 
    1681             switch (module.Section.Title.ShortName) 
    1682             { 
    1683                 case "GS": 
    1684                     return EnableGsModuleCount(module); 
    1685                 case "adMot": 
    1686                     return EnableAdMotoModuleCount(module); 
    1687                 default: 
    1688                     return EnableAmtModuleCount(module); 
    1689             } 
    1690         } 
    1691  
    1692         //TODO: get this info from db, IsSplitable...? 
    1693         private static bool EnableAmtModuleCount(Module module) 
    1694         { 
    1695             switch (module.Name) 
    1696             { 
    1697                 case "AWEB": 
    1698                 case "AWEF": 
    1699                 case "ALAF": 
    1700                 case "AZOF": 
    1701                     return true; 
    1702             } 
    1703  
    1704             return false; 
    1705         } 
    1706  
    1707         //TODO: get this info from db, IsSplitable...? 
    1708         private static bool EnableGsModuleCount(Module module) 
    1709         { 
    1710             switch (module.Name) 
    1711             { 
    1712                 case "GOK1M": 
    1713                 //case "GOK2": 
    1714                 case "GOK3M": 
    1715                 //case "GOK4": 
    1716                 case "GWEW_P": 
    1717                 case "GWEW": 
    1718                     //case "GART_S": 
    1719                     return true; 
    1720             } 
    1721  
    1722             return false; 
    1723         } 
    1724  
    1725         //TODO: get this info from db, IsSplitable...? 
    1726         private static bool EnableAdMotoModuleCount(Module module) 
    1727         { 
    1728             switch (module.Name) 
    1729             { 
    1730                 case "ad-Text": 
    1731                 case "Truck-Text": 
    1732                     return true; 
    1733             } 
    1734  
    1735             return false; 
    1736         } 
    1737  
    17381675        private void txtHorizontal_TextChanged(object sender, EventArgs e) 
    17391676        { 
    17401677            Debug.WriteLine(string.Format("Event: {0}", "txtHorizontal_TextChanged")); 
    17411678 
    1742             if (Validate()) 
     1679            if (Validate() && SelectedModule!=null) 
    17431680            { 
    17441681                txtTotalModuleAmount.Text = 
    17451682                    ReCaluculateModuleAmount(txtHorizontal.Text, txtVertical.Text).ToString(); 
    17461683 
    1747  
    1748                 AdSize adSize = AdHelper.GetAdSize(int.Parse(txtHorizontal.Text), int.Parse(txtVertical.Text), SelectedModule); 
    1749  
    1750                 sZERTextBox.Text = adSize.Width.ToString(); 
    1751                 wYSTextBox.Text = adSize.Height.ToString(); 
    1752  
     1684                int horizontal, vertical; 
     1685                if (int.TryParse(txtHorizontal.Text, out horizontal) && int.TryParse(txtVertical.Text, out vertical)) 
     1686                { 
     1687                    AdSize adSize = AdHelper.GetAdSize(horizontal, vertical, SelectedModule); 
     1688 
     1689                    sZERTextBox.Text = adSize.Width.ToString(); 
     1690                    wYSTextBox.Text = adSize.Height.ToString(); 
     1691                } 
    17531692            } 
    17541693        } 
     
    17581697            Debug.WriteLine(string.Format("Event: {0}", "txtVertical_TextChanged")); 
    17591698 
    1760             if (Validate()) 
     1699            if (Validate() && SelectedModule != null) 
    17611700            { 
    17621701                txtTotalModuleAmount.Text = 
    17631702                    ReCaluculateModuleAmount(txtHorizontal.Text, txtVertical.Text).ToString(); 
    17641703 
    1765                 AdSize adSize = AdHelper.GetAdSize(int.Parse(txtHorizontal.Text), int.Parse(txtVertical.Text), SelectedModule); 
    1766  
    1767                 sZERTextBox.Text = adSize.Width.ToString(); 
    1768                 wYSTextBox.Text = adSize.Height.ToString(); 
     1704                int horizontal, vertical; 
     1705                if (int.TryParse(txtHorizontal.Text, out horizontal) && int.TryParse(txtVertical.Text, out vertical)) 
     1706                { 
     1707                    AdSize adSize = AdHelper.GetAdSize(horizontal, vertical, SelectedModule); 
     1708 
     1709                    sZERTextBox.Text = adSize.Width.ToString(); 
     1710                    wYSTextBox.Text = adSize.Height.ToString(); 
     1711                } 
    17691712            } 
    17701713        } 
     
    18711814                ComboBoxHelper.Bind( 
    18721815                    navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn), 
    1873                     ogl_rozdzialComboBox); 
     1816                    ogl_rozdzialComboBox, 
     1817                    new NavigationSubColumn(0, "-- nieokreœlony --")); 
    18741818 
    18751819                ogl_rozdzialComboBox.DisplayMember = "Name"; 
  • branches/ReklamaReorganizacja/BazaReklam/app.config

    r657 r658  
    1111      providerName="System.Data.SqlClient" /> 
    1212    <add name="BAZA_REKLAM" connectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM;Persist Security Info=True" 
    13       providerName="System.Data.SqlClient" /> 
    14     <add name="BAZA_REKLAM_LOCAL" connectionString="Data Source=10.0.0.72;Initial Catalog=BAZA_REKLAM;Persist Security Info=True" 
    1513      providerName="System.Data.SqlClient" /> 
    1614  </connectionStrings>