- Data:
- 2009-05-27 17:49:28 (17 years ago)
- Lokalizacja:
- branches/ReklamaReorganizacja/BazaReklam
- Pliki:
-
- 8 zmodyfikowane
-
Classes/DBBindings.cs (zmodyfikowane) (7 diffs)
-
Classes/Helpers/AdHelper.cs (zmodyfikowane) (3 diffs)
-
Classes/Helpers/ComboBoxHelper.cs (zmodyfikowane) (1 diff)
-
ListaReklamNaWydanieForm.Designer.cs (zmodyfikowane) (14 diffs)
-
ListaReklamNaWydanieForm.cs (zmodyfikowane) (8 diffs)
-
ListaReklamNaWydanieForm.resx (zmodyfikowane) (4 diffs)
-
OrderDetails.cs (zmodyfikowane) (9 diffs)
-
app.config (zmodyfikowane) (1 diff)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
branches/ReklamaReorganizacja/BazaReklam/Classes/DBBindings.cs
r539 r658 1 1 using System; 2 2 using System.Collections; 3 using System.Collections.Generic; 3 4 using System.Data; 4 5 using System.Data.SqlClient; … … 33 34 public static void bindujTytuly(ToolStripComboBox toolStripComboBox) 34 35 { 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"; 51 58 } 52 59 … … 74 81 public static void bindujTypyReklam(ToolStripComboBox toolStripComboBox) 75 82 { 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 88 83 SqlCommand command = new SqlCommand(); 89 84 command.Connection = new SqlConnection(ConnString.getConnString().Value); … … 105 100 106 101 107 public static void bindujGrzbiety(ToolStripComboBox toolStripComboBox)102 public static void BindujGrzbiety(ToolStripComboBox toolStripComboBox) 108 103 { 109 104 SLOWNIKDataSetTableAdapters.GRZBIETYTableAdapter ta = … … 138 133 } 139 134 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 140 160 public static void bindujAgencje(ToolStripComboBox toolStripComboBox) 141 161 { 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 154 162 SqlCommand command = new SqlCommand(); 155 163 command.Connection = new SqlConnection(ConnString.getConnString().Value); … … 191 199 } 192 200 } 201 command.Connection.Close(); 202 193 203 toolStripComboBox.ComboBox.DataSource = kontakTypList; 194 204 toolStripComboBox.ComboBox.DisplayMember = "Display"; 195 205 toolStripComboBox.ComboBox.ValueMember = "Value"; 196 command.Connection.Close();197 206 } 198 207 … … 232 241 } 233 242 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"; 266 267 } 267 268 -
branches/ReklamaReorganizacja/BazaReklam/Classes/Helpers/AdHelper.cs
r649 r658 56 56 public static AdSize GetAdSize(int horizontal, int vertical, Module module) 57 57 { 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 58 67 int width = 0; 59 68 int height = 0; … … 81 90 } 82 91 83 AdSize adSize = new AdSize();92 84 93 adSize.Width = width; 85 94 adSize.Height = height; … … 87 96 } 88 97 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 89 157 } 90 158 } -
branches/ReklamaReorganizacja/BazaReklam/Classes/Helpers/ComboBoxHelper.cs
r643 r658 15 15 } 16 16 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 17 24 //public static int GetItemIndex<T>(T type, int value, ComboBox comboBox) 18 25 //{ -
branches/ReklamaReorganizacja/BazaReklam/ListaReklamNaWydanieForm.Designer.cs
r561 r658 31 31 this.components = new System.ComponentModel.Container(); 32 32 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 dataGridViewCellStyle 2= new System.Windows.Forms.DataGridViewCellStyle();35 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 3= new System.Windows.Forms.DataGridViewCellStyle();36 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 4= new System.Windows.Forms.DataGridViewCellStyle();37 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 5= new System.Windows.Forms.DataGridViewCellStyle();38 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 6= new System.Windows.Forms.DataGridViewCellStyle();39 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 7= new System.Windows.Forms.DataGridViewCellStyle();40 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 8= new System.Windows.Forms.DataGridViewCellStyle();41 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 9= new System.Windows.Forms.DataGridViewCellStyle();42 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 10= new System.Windows.Forms.DataGridViewCellStyle();43 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 11= 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(); 44 44 this.dataGridView1 = new System.Windows.Forms.DataGridView(); 45 45 this.rezerwacjeToolStrip = new System.Windows.Forms.ToolStrip(); … … 183 183 // tytToolStripComboBox2 184 184 // 185 this.tytToolStripComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 185 186 this.tytToolStripComboBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 186 187 this.tytToolStripComboBox2.Name = "tytToolStripComboBox2"; 187 188 this.tytToolStripComboBox2.Size = new System.Drawing.Size(75, 31); 189 this.tytToolStripComboBox2.SelectedIndexChanged += new System.EventHandler(this.tytToolStripComboBox2_SelectedIndexChanged); 188 190 // 189 191 // toolStripLabel8 … … 312 314 this.listaReklamDataGridView.AllowUserToAddRows = false; 313 315 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; 316 318 this.listaReklamDataGridView.AutoGenerateColumns = false; 317 319 this.listaReklamDataGridView.BackgroundColor = System.Drawing.Color.White; … … 369 371 // 370 372 this.TYP.DataPropertyName = "TYP"; 371 dataGridViewCellStyle 2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;372 this.TYP.DefaultCellStyle = dataGridViewCellStyle 2;373 dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 374 this.TYP.DefaultCellStyle = dataGridViewCellStyle13; 373 375 this.TYP.HeaderText = "Typ"; 374 376 this.TYP.Name = "TYP"; … … 380 382 this.tYTU£DataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 381 383 this.tYTU£DataGridViewTextBoxColumn.DataPropertyName = "TYTU£"; 382 dataGridViewCellStyle 3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;383 this.tYTU£DataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 3;384 dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 385 this.tYTU£DataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle14; 384 386 this.tYTU£DataGridViewTextBoxColumn.HeaderText = "Tytu³"; 385 387 this.tYTU£DataGridViewTextBoxColumn.Name = "tYTU£DataGridViewTextBoxColumn"; … … 391 393 this.nRDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 392 394 this.nRDataGridViewTextBoxColumn.DataPropertyName = "NR"; 393 dataGridViewCellStyle 4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;394 this.nRDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 4;395 dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 396 this.nRDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle15; 395 397 this.nRDataGridViewTextBoxColumn.HeaderText = "Nr"; 396 398 this.nRDataGridViewTextBoxColumn.Name = "nRDataGridViewTextBoxColumn"; … … 401 403 // 402 404 this.iDREKLAMYDataGridViewTextBoxColumn.DataPropertyName = "ID REKLAMY"; 403 dataGridViewCellStyle 5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));404 this.iDREKLAMYDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 5;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; 405 407 this.iDREKLAMYDataGridViewTextBoxColumn.HeaderText = "Symbol"; 406 408 this.iDREKLAMYDataGridViewTextBoxColumn.Name = "iDREKLAMYDataGridViewTextBoxColumn"; … … 418 420 this.sZERDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 419 421 this.sZERDataGridViewTextBoxColumn.DataPropertyName = "SZER"; 420 dataGridViewCellStyle 6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;421 this.sZERDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 6;422 dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 423 this.sZERDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle17; 422 424 this.sZERDataGridViewTextBoxColumn.HeaderText = "S"; 423 425 this.sZERDataGridViewTextBoxColumn.Name = "sZERDataGridViewTextBoxColumn"; … … 429 431 this.wYSDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 430 432 this.wYSDataGridViewTextBoxColumn.DataPropertyName = "WYS"; 431 dataGridViewCellStyle 7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;432 this.wYSDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 7;433 dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 434 this.wYSDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle18; 433 435 this.wYSDataGridViewTextBoxColumn.HeaderText = "W"; 434 436 this.wYSDataGridViewTextBoxColumn.Name = "wYSDataGridViewTextBoxColumn"; … … 481 483 this.mODTYPDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 482 484 this.mODTYPDataGridViewTextBoxColumn.DataPropertyName = "MOD_TYP"; 483 dataGridViewCellStyle 8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;484 this.mODTYPDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 8;485 dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 486 this.mODTYPDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle19; 485 487 this.mODTYPDataGridViewTextBoxColumn.HeaderText = "Modu³"; 486 488 this.mODTYPDataGridViewTextBoxColumn.Name = "mODTYPDataGridViewTextBoxColumn"; … … 523 525 this.rABATDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 524 526 this.rABATDataGridViewTextBoxColumn.DataPropertyName = "RABAT"; 525 dataGridViewCellStyle 9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;526 dataGridViewCellStyle 9.Format = "p";527 this.rABATDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 9;527 dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 528 dataGridViewCellStyle20.Format = "p"; 529 this.rABATDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle20; 528 530 this.rABATDataGridViewTextBoxColumn.HeaderText = "Rabat"; 529 531 this.rABATDataGridViewTextBoxColumn.Name = "rABATDataGridViewTextBoxColumn"; … … 535 537 this.sTRONADataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 536 538 this.sTRONADataGridViewTextBoxColumn.DataPropertyName = "STRONA"; 537 dataGridViewCellStyle 10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;538 this.sTRONADataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 10;539 dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 540 this.sTRONADataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle21; 539 541 this.sTRONADataGridViewTextBoxColumn.HeaderText = "Strona"; 540 542 this.sTRONADataGridViewTextBoxColumn.Name = "sTRONADataGridViewTextBoxColumn"; … … 546 548 this.nazwaGrzbietuDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 547 549 this.nazwaGrzbietuDataGridViewTextBoxColumn.DataPropertyName = "nazwaGrzbietu"; 548 dataGridViewCellStyle 11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;549 this.nazwaGrzbietuDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle 11;550 dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 551 this.nazwaGrzbietuDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle22; 550 552 this.nazwaGrzbietuDataGridViewTextBoxColumn.HeaderText = "Grzbiet"; 551 553 this.nazwaGrzbietuDataGridViewTextBoxColumn.Name = "nazwaGrzbietuDataGridViewTextBoxColumn"; … … 648 650 // tytulToolStripComboBox 649 651 // 652 this.tytulToolStripComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 650 653 this.tytulToolStripComboBox.Name = "tytulToolStripComboBox"; 651 654 this.tytulToolStripComboBox.Size = new System.Drawing.Size(75, 31); 655 this.tytulToolStripComboBox.SelectedIndexChanged += new System.EventHandler(this.tytulToolStripComboBox_SelectedIndexChanged); 652 656 // 653 657 // toolStripLabel2 -
branches/ReklamaReorganizacja/BazaReklam/ListaReklamNaWydanieForm.cs
r649 r658 1 1 using System; 2 using System.Collections.Generic; 2 3 using System.ComponentModel; 3 4 using System.Data; … … 48 49 DBBindings.bindujTytuly(tytulToolStripComboBox); 49 50 DBBindings.bindujTytuly(tytToolStripComboBox2); 50 DBBindings.bindujGrzbiety2(grzbietToolStripComboBox);51 //DBBindings.bindujGrzbiety2(grzbietToolStripComboBox); 51 52 DBBindings.bindujAgencje(agencjaToolStripComboBox); 52 53 DBBindings.bindujAgentow(agentToolStripComboBox); 53 DBBindings.bindujModuly(modToolStripComboBox); 54 55 ((ComboBox)tytToolStripComboBox2.Control).SelectedValueChanged += tytToolStripComboBox2_SelectedIndexChanged; 54 //DBBindings.BindujModuly(modToolStripComboBox); 56 55 } 57 56 … … 125 124 { 126 125 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 } 133 128 134 129 SqlDataAdapter adapter = new SqlDataAdapter(); … … 138 133 139 134 Cursor = Cursors.Default; 140 141 135 } 142 136 … … 164 158 DataRowView row = (DataRowView)listaReklamNaWydanie2BindingSource.Current; 165 159 int idRek = Convert.ToInt32(row["ReklamaId"]); 166 // this.reklamaTableAdapter.FillByReklamaId(this.rEKLAMADataSet.REKLAMA, idRek);167 160 168 161 OrderDetails.getOrderDetails().PokazSzczegolyZamowienia(idRek); 169 162 OrderDetails.getOrderDetails().ShowDialog(); 170 /*171 OrderDetails od = new OrderDetails();172 od.PokazSzczegolyZamowienia(idRek);173 od.ShowDialog(); */174 163 } 175 164 } 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 187 165 188 166 private void wyczyscFiltrToolStripButton_Click(object sender, EventArgs e) … … 276 254 odToolStripTextBox.Clear(); 277 255 doToolStripTextBox.Clear(); 278 ((BindingSource)((ComboBox)modToolStripComboBox.Control).DataSource).Filter = ""; 256 if (modToolStripComboBox.ComboBox != null) 257 modToolStripComboBox.ComboBox.DataSource = new List<ComboItem>(); 279 258 modToolStripComboBox.SelectedIndex = -1; 280 259 modToolStripComboBox.SelectedIndex = -1; … … 287 266 private void drukujToolStripButton_Click(object sender, EventArgs e) 288 267 { 289 PrintDGV.Print_DataGridView(listaReklamDataGridView, 50);268 PrintDGV.Print_DataGridView(listaReklamDataGridView, 50); 290 269 } 291 270 … … 364 343 _listaReklamNaWydanie = null; 365 344 } 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 } 366 375 } 367 376 } -
branches/ReklamaReorganizacja/BazaReklam/ListaReklamNaWydanieForm.resx
r593 r658 162 162 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 163 163 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABhBJREFUSEuFV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AAAASUVORK5C 190 190 YII= 191 191 </value> … … 337 337 <value>17, 56</value> 338 338 </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> 339 342 <data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 340 343 <value> … … 384 387 <value> 385 388 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 386 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAB A5JREFUSEvtVH1M387 W1UcnbLgMBoStwkxAQ KWSEdMwIgUQ+g2CixAIWPa0LTQsHTIh0Yjshq1drhBSwi2ItDRbdCWL+lY5DsS388 ZAnaAB3UMD4qSiQbAwlZ3HSBMd3I8Xdfim4VMdE//Gc3OXnv3XfvOff8zr13x46H7b9WQCgU7pTL5QcV389 CsV+4vIheP1bzkdp4iMMeXl5T0ul0qSMjIzi1NTUMQLS09ORlJQ0FRUVpQ8MDAyhcY+5x2+vRyvclZ2d390 fS43N3c1MzNzvqCgwEXvG1qtFgaDAUajEQ0NDTCbzbBYLNDpdEhMTFwJDw9/h5h3E3ZuqyAWiz8mYuTk391 5KC9vR12ux39/f3o6OiAzWZDY2Mj6uvrOREmYLVaObH8/HxERkZeIjcpJPAEgVXgry0hIeEKs9/T0wOn392 0wmHw4GhoSEMDg5yZGzFRUVFoAyQnJyM+Ph4UCZQq9XQaDSQyWT3goODW0noBXdGrMx/tri4uNm0tDS0393 tbWhpqYGo6Oj6OvrQ2FhIcrLyyGRSDhS9iQyToQ5Wltbw2ZzuWaQlSW7fVShqI2IiNj3QD7UURAdHb3h394 crnQ2dkJvV7PlWt6evoPApZDllwG1fFiKJVKsJJOTk5iY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vX6W8pqvHtKj/TDojve3t5N9O8kIZzALr89hIOEEuaKUEzYT3iK8OChc1NjInup1jJyY/bz 406 82sl6wbqUxOS7iNg49ie9yMEu55/f3W4ibBM2IX2EuFVwiuud7Zq92ubu4n/adVu/Nwnm8RKwSwzsPdt 407 rW9F8rDv/6vA75x/JOSsngmYAAAAAElFTkSuQmCC 405 408 </value> 406 409 </data> … … 424 427 <value> 425 428 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 426 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABY1JREFUSEuVV WlM427 VF cYHVpbMdLUFiyNkDRto5WiMY22FNJUfxBLWBQtVBEtatuURS0oCiqyqCxRLJsR1EBBVkGQbWDsMDBA428 IVNkKSJ0HDaBmQFmcRgEBKmcfvd10pqoWF5y8u7Me/ec8333vnONeC++jOZ5hnmePf9Rbm7u9vPnYw5F429 R0eHRp49feFMeHjq2TMRBVFnon6NvRArSUhKkiYmJrbRbAvC4gULpKWlVctHNBhSPYBcNwnlxByU08DQ430 DNDzCJDR+HR8ytzq1asDiPw9wisLEklISIhUaPUY/wtQEZlyEhh4SMRjQOcDoEMHCDsG4bB58y9EbEcw431 XpBARETE1obb7dA9/od8aALoHwe69YCURO6SQAf9PnzQp5GIdxJMFyTg4uJifqO49LGaBBQkwNA8+gTl432 shmk/TGJcw16nKgew9a43x5ZHS28sSqo1O98xCmbi3FxX+7bt285iS0izLcxeIuoTS3qOaBVAwQKpxEs433 fIiImofwr9TjJ/4YDpWP4QDhxxItHDOU2JPcgJYGMbKzsydDQkLiTE1NV5DIa8+trLGx0T4jI0N2q6oG434 lbeqUC6W4GLdMA7ydUhumsYJEjtcQQJlD+BNAt8Xa2GbPIhr9b0YVQyitrYWR44c4RP5qmd2WUtLi0tN435 Tc1Ma2vrk4mJCWg1agwr5NAo7qOs5T5cs5W40DCFgAodf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xFYOrJzeNFu/1NFXzoT+98teJr0LxK51eCKmdQ4AAAAAElFTkSuQmCC 451 454 </value> 452 455 </data> -
branches/ReklamaReorganizacja/BazaReklam/OrderDetails.cs
r653 r658 227 227 if (SelectedSection == null) return; 228 228 229 txtHorizontal.Text = 1.ToString(); 230 txtVertical.Text = 1.ToString(); 231 229 232 ComboBoxHelper.Bind(SelectedSection.Modules, mOD_TYPComboBox); 230 233 if (SelectedSection.Modules.Count > 1) … … 607 610 private void SprawdzBledy() 608 611 { 609 //if (ogl_dzialComboBox.SelectedValue == null)610 //{611 // MessageBox.Show("Wybierz dzia³.");612 // zATWIERDZONO_DO_DRUKUCheckBox.CheckState = CheckState.Unchecked;613 // return;614 //}615 616 612 if (SelectedModule == null) 617 613 { … … 1614 1610 wYSTextBox.Text = SelectedModule.Height.HasValue ? (SelectedModule.Height.Value * 10).ToString("#0") : 1.ToString(); 1615 1611 1616 bool readOnly = ! EnableModuleCount(SelectedModule);1612 bool readOnly = !AdHelper.EnableModuleCount(SelectedModule); 1617 1613 txtHorizontal.ReadOnly = readOnly; 1618 1614 txtVertical.ReadOnly = readOnly; … … 1620 1616 txtVertical.BackColor = readOnly ? SystemColors.InactiveCaptionText : Color.White; 1621 1617 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 } 1627 1623 1628 1624 //Enable/Disable dzial rozdzial combos... … … 1644 1640 1645 1641 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, "-- nieokrelony --")); 1647 1643 ogl_dzialComboBox.DisplayMember = "Name"; 1648 1644 ogl_dzialComboBox.ValueMember = "Id"; … … 1658 1654 1659 1655 ogl_dzialComboBox.SelectedIndex = GetNavigationColumnIndex(Reklama.ogl_dzial); 1660 if ( Reklama.ogl_rozdzial > 0)1656 if (!Reklama.Isogl_rozdzialNull() && Reklama.ogl_rozdzial > 0) 1661 1657 ogl_rozdzialComboBox.SelectedIndex = GetNavigationSubColumnIndex(Reklama.ogl_rozdzial); 1662 1658 … … 1677 1673 } 1678 1674 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 1738 1675 private void txtHorizontal_TextChanged(object sender, EventArgs e) 1739 1676 { 1740 1677 Debug.WriteLine(string.Format("Event: {0}", "txtHorizontal_TextChanged")); 1741 1678 1742 if (Validate() )1679 if (Validate() && SelectedModule!=null) 1743 1680 { 1744 1681 txtTotalModuleAmount.Text = 1745 1682 ReCaluculateModuleAmount(txtHorizontal.Text, txtVertical.Text).ToString(); 1746 1683 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 } 1753 1692 } 1754 1693 } … … 1758 1697 Debug.WriteLine(string.Format("Event: {0}", "txtVertical_TextChanged")); 1759 1698 1760 if (Validate() )1699 if (Validate() && SelectedModule != null) 1761 1700 { 1762 1701 txtTotalModuleAmount.Text = 1763 1702 ReCaluculateModuleAmount(txtHorizontal.Text, txtVertical.Text).ToString(); 1764 1703 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 } 1769 1712 } 1770 1713 } … … 1871 1814 ComboBoxHelper.Bind( 1872 1815 navigationColumnRepository.FindActiveNavigationSubColumnsByNavigationColumn(SelectedNavigationColumn), 1873 ogl_rozdzialComboBox); 1816 ogl_rozdzialComboBox, 1817 new NavigationSubColumn(0, "-- nieokrelony --")); 1874 1818 1875 1819 ogl_rozdzialComboBox.DisplayMember = "Name"; -
branches/ReklamaReorganizacja/BazaReklam/app.config
r657 r658 11 11 providerName="System.Data.SqlClient" /> 12 12 <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"15 13 providerName="System.Data.SqlClient" /> 16 14 </connectionStrings>
