Zbiór zmian 778 dla branches/Emisje
- Data:
- 2009-07-24 16:34:06 (17 years ago)
- Lokalizacja:
- branches/Emisje/BazaReklam
- Pliki:
-
- 2 dodane
- 3 zmodyfikowane
-
Baza Reklam.csproj (zmodyfikowane) (2 diffs)
-
Classes/Model/Bargain.cs (dodane)
-
Classes/Repositories/BargainRepository.cs (dodane)
-
OrderDetails.Designer.cs (zmodyfikowane) (1 diff)
-
OrderDetails.cs (zmodyfikowane) (9 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
branches/Emisje/BazaReklam/Baza Reklam.csproj
r777 r778 134 134 <Compile Include="Classes\Model\AdLocation.cs" /> 135 135 <Compile Include="Classes\Model\Agent.cs" /> 136 <Compile Include="Classes\Model\Bargain.cs" /> 136 137 <Compile Include="Classes\Model\Country.cs" /> 137 138 <Compile Include="Classes\Model\Dzial.cs" /> … … 153 154 <Compile Include="Classes\Repositories\AdLocationRepository.cs" /> 154 155 <Compile Include="Classes\Repositories\AgentRepository.cs" /> 156 <Compile Include="Classes\Repositories\BargainRepository.cs" /> 155 157 <Compile Include="Classes\Repositories\CountryRepository.cs" /> 156 158 <Compile Include="Classes\Repositories\IRepository.cs" /> -
branches/Emisje/BazaReklam/OrderDetails.Designer.cs
r776 r778 1238 1238 // promocjaComboBox 1239 1239 // 1240 this.promocjaComboBox.DataSource = this.pROMOCJEBindingSource;1241 this.promocjaComboBox.DisplayMember = "Nazwa";1242 1240 this.promocjaComboBox.Location = new System.Drawing.Point(286, 185); 1243 1241 this.promocjaComboBox.Name = "promocjaComboBox"; 1244 1242 this.promocjaComboBox.Size = new System.Drawing.Size(124, 21); 1245 1243 this.promocjaComboBox.TabIndex = 14; 1246 this.promocjaComboBox.ValueMember = "id";1247 1244 // 1248 1245 // button3 -
branches/Emisje/BazaReklam/OrderDetails.cs
r777 r778 96 96 } 97 97 98 private Bargain SelectedBargain 99 { 100 get 101 { 102 if (promocjaComboBox.SelectedItem == null) return null; 103 return (Bargain)promocjaComboBox.SelectedItem; 104 } 105 } 106 98 107 protected REKLAMADataSet.REKLAMARow Reklama 99 108 { … … 127 136 cbLocation.ValueMember = "Id"; 128 137 cbLocation.SelectedIndex = 0; 138 139 BargainRepository bargainRepository = new BargainRepository(ConnString.getConnString().Value); 140 ComboBoxHelper.Bind(bargainRepository.FindAllActive(), promocjaComboBox); 141 promocjaComboBox.DisplayMember = "Name"; 142 promocjaComboBox.ValueMember = "Id"; 143 promocjaComboBox.SelectedIndex = -1; 129 144 130 145 ComboBoxHelper.Bind(_titles, tYTULComboBox); … … 345 360 } 346 361 347 if ( string.IsNullOrEmpty(promocjaComboBox.Text))362 if (SelectedBargain == null) 348 363 { 349 364 DataRowView row = (DataRowView)rEKLAMABindingSource.Current; … … 351 366 } 352 367 else 353 Reklama.PROMOCJA = Convert.ToInt32(((DataRowView)promocjaComboBox.SelectedItem).Row[0]);368 Reklama.PROMOCJA = SelectedBargain.Id; 354 369 355 370 if (nowyRekord) … … 638 653 } 639 654 640 ////lokalizacja641 //if (sTRONATextBox.Text == "")642 //{643 // MessageBox.Show("Podaj lokalizacjê.");644 // zATWIERDZONO_DO_DRUKUCheckBox.CheckState = CheckState.Unchecked;645 // return;646 //}647 648 655 if (rEKLAMAUKAZESIEWNRBindingSource.List.Count != 0) return; 649 656 … … 836 843 bylyZmiany = false; 837 844 845 promocjaComboBox.SelectedIndex = -1; 846 838 847 numeryReklam.Clear(); 839 848 … … 954 963 { 955 964 index++; 956 if (item is DataRowView && Convert.ToInt32(((DataRowView)item).Row[0]) == value)965 if (item is Bargain && Convert.ToInt32(((Bargain)item).Id) == value) 957 966 return index; 958 967 } … … 1724 1733 1725 1734 if (Validate()) 1726 {1727 1735 RecalculateAdSize(); 1728 1729 //txtTotalModuleAmount.Text =1730 // ReCaluculateModuleAmount(txtHorizontal.Text, txtVertical.Text).ToString();1731 1732 //int horizontal, vertical;1733 //if (int.TryParse(txtHorizontal.Text, out horizontal) && int.TryParse(txtVertical.Text, out vertical))1734 //{1735 // AdSize adSize = AdHelper.GetAdSize(horizontal, vertical, SelectedModule);1736 1737 // sZERTextBox.Text = adSize.Width.ToString();1738 // wYSTextBox.Text = adSize.Height.ToString();1739 //}1740 }1741 1736 } 1742 1737 … … 1746 1741 1747 1742 if (Validate()) 1748 {1749 1750 1743 RecalculateAdSize(); 1751 1752 //txtTotalModuleAmount.Text =1753 // ReCaluculateModuleAmount(txtHorizontal.Text, txtVertical.Text).ToString();1754 1755 //int horizontal, vertical;1756 //if (int.TryParse(txtHorizontal.Text, out horizontal) && int.TryParse(txtVertical.Text, out vertical))1757 //{1758 // AdSize adSize = AdHelper.GetAdSize(horizontal, vertical, SelectedModule);1759 1760 // sZERTextBox.Text = adSize.Width.ToString();1761 // wYSTextBox.Text = adSize.Height.ToString();1762 //}1763 }1764 1744 } 1765 1745
