- Data:
- 2009-04-27 16:58:32 (17 years ago)
- Lokalizacja:
- branches/ReklamaReorganizacja
- Pliki:
-
- 9 zmodyfikowane
- 9 skopiowane
-
BazaReklam/AddClient.Designer.cs (zmodyfikowane) (11 diffs)
-
BazaReklam/AddClient.cs (zmodyfikowane) (7 diffs)
-
BazaReklam/AddClient.resx (zmodyfikowane) (2 diffs)
-
BazaReklam/Baza Reklam.csproj (zmodyfikowane) (2 diffs)
-
BazaReklam/Classes/Model/Agent.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Model/Agent.cs)
-
BazaReklam/Classes/Model/Country.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Model/Country.cs)
-
BazaReklam/Classes/Model/State.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Model/State.cs)
-
BazaReklam/Classes/Repositories/AgentRepository.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Repositories/AgentRepository.cs)
-
BazaReklam/Classes/Repositories/CountryRepository.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Repositories/CountryRepository.cs)
-
BazaReklam/Classes/Repositories/IRepository.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Repositories/IRepository.cs)
-
BazaReklam/Classes/Repositories/Repository.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Repositories/Repository.cs)
-
BazaReklam/Classes/Repositories/StateRepository.cs (skopiowane) (skopiowane from trunk/BazaReklam/Classes/Repositories/StateRepository.cs)
-
BazaReklam/ClientsForm.Designer.cs (zmodyfikowane) (2 diffs)
-
BazaReklam/ClientsForm.cs (zmodyfikowane) (7 diffs)
-
BazaReklam/Docs/versioninfo.html (zmodyfikowane) (1 diff)
-
BazaReklam/Properties/AssemblyInfo.cs (zmodyfikowane) (1 diff)
-
BazaReklamSetup/BazaReklamSetup.vdproj (zmodyfikowane) (2 diffs)
-
SQL/Triggers/KLIENCI_DELETE.txt (skopiowane) (skopiowane from trunk/SQL/Triggers/KLIENCI_DELETE.txt)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
branches/ReklamaReorganizacja/BazaReklam/AddClient.Designer.cs
r613 r616 90 90 this.krsLabel = new System.Windows.Forms.Label(); 91 91 this.cbUserName = new System.Windows.Forms.ComboBox(); 92 this.agenciBindingSource = new System.Windows.Forms.BindingSource(this.components);93 92 this.cbActive = new System.Windows.Forms.CheckBox(); 94 93 this.txtKrs = new System.Windows.Forms.TextBox(); 95 94 this.regonLabel = new System.Windows.Forms.Label(); 96 95 this.txtRegon = new System.Windows.Forms.TextBox(); 96 this.agenciBindingSource = new System.Windows.Forms.BindingSource(this.components); 97 97 this.btnSave = new System.Windows.Forms.Button(); 98 98 this.btnCancel = new System.Windows.Forms.Button(); … … 177 177 this.cbState.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.clientsBindingSource, "State", true)); 178 178 this.cbState.FormattingEnabled = true; 179 this.cbState.Items.AddRange(new object[] {180 "dolnol¹skie ",181 "kujawsko-pomorskie",182 "lubelskie ",183 "lubuskie",184 "³ódzkie",185 "ma³opolskie",186 "mazowieckie",187 "opolskie",188 "podkarpackie",189 "podlaskie",190 "pomorskie",191 "l¹skie",192 "wiêtokrzyskie",193 "warmiñsko-mazurskie",194 "wielkopolskie",195 "zachodniopomorskie"});196 179 this.cbState.Location = new System.Drawing.Point(148, 109); 197 180 this.cbState.Name = "cbState"; … … 214 197 this.cbCountry.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 215 198 this.cbCountry.FormattingEnabled = true; 216 this.cbCountry.Items.AddRange(new object[] {217 "Abchazja",218 "Afganistan",219 "Albania",220 "Algieria",221 "Andora",222 "Angola",223 "Antigua i Barbuda",224 "Arabia Saudyjska",225 "Argentyna",226 "Armenia",227 "Australia",228 "Austria",229 "Azerbejd¿an",230 "Bahamy",231 "Bahrajn",232 "Bangladesz",233 "Barbados",234 "Belgia",235 "Belize",236 "Benin",237 "Bhutan",238 "Bia³oru",239 "Birma",240 "Boliwia",241 "Bonia i Hercegowina",242 "Botswana",243 "Brazylia",244 "Brunei",245 "Bu³garia",246 "Burkina Faso",247 "Burundi",248 "Chile",249 "Chiny",250 "Chorwacja",251 "Cypr",252 "Cypr Pó³nocny",253 "Czad",254 "Czarnogóra",255 "Czechy",256 "Dania",257 "Demokratyczna Republika Konga",258 "Dominika",259 "Dominikana",260 "D¿ibuti",261 "Egipt",262 "Ekwador",263 "Erytrea",264 "Estonia",265 "Etiopia",266 "Fid¿i",267 "Filipiny",268 "Finlandia",269 "Francja",270 "Gabon",271 "Gambia",272 "Ghana",273 "Górski Karabach",274 "Grecja",275 "Grenada",276 "Gruzja",277 "Gujana",278 "Gwatemala",279 "Gwinea",280 "Gwinea Bissau",281 "Gwinea Równikowa",282 "Haiti",283 "Hiszpania",284 "Holandia",285 "Honduras",286 "Indie",287 "Indonezja",288 "Irak",289 "Iran",290 "Irlandia",291 "Irlandia Pó³nocna",292 "Islandia",293 "Izrael",294 "Jamajka",295 "Japonia",296 "Jemen",297 "Jordania",298 "Kambod¿a",299 "Kamerun",300 "Kanada",301 "Katar",302 "Kazachstan",303 "Kenia",304 "Kirgistan",305 "Kiribati",306 "Kolumbia",307 "Komory",308 "Kongo",309 "Korea Po³udniowa",310 "Korea Pó³nocna",311 "Kostaryka",312 "Kuba",313 "Kuwejt",314 "Laos",315 "Lesotho",316 "Liban",317 "Liberia",318 "Libia",319 "Liechtenstein",320 "Litwa",321 "Luksemburg",322 "£otwa",323 "Macedonia",324 "Madagaskar",325 "Malawi",326 "Malediwy",327 "Malezja",328 "Mali",329 "Malta",330 "Maroko",331 "Mauretania",332 "Mauritius",333 "Meksyk",334 "Mikronezja",335 "Mo³dawia",336 "Monako",337 "Mongolia",338 "Mozambik",339 "Naddniestrze",340 "Namibia",341 "Nauru",342 "Nepal",343 "Niemcy",344 "Niger",345 "Nigeria",346 "Nikaragua",347 "Norwegia",348 "Nowa Zelandia",349 "Oman",350 "Osetia Po³udniowa",351 "Pakistan",352 "Palau",353 "Palestyna",354 "Panama",355 "Papua-Nowa Gwinea",356 "Paragwaj",357 "Peru",358 "Polska",359 "Portugalia",360 "Portoryko",361 "Republika Po³udniowej Afryki",362 "Republika rodkowoafrykañska",363 "Republika Zielonego Przyl¹dka",364 "Rosja",365 "Rumunia",366 "Rwanda",367 "Sahara Zachodnia",368 "Saint Kitts i Nevis",369 "Saint Lucia",370 "Saint Vincent i Grenadyny",371 "Salwador",372 "Samoa",373 "San Marino",374 "Senegal",375 "Serbia",376 "Seszele",377 "Sierra Leone",378 "Singapur",379 "S³owacja",380 "S³owenia",381 "Somalia",382 "Somaliland",383 "Sri Lanka",384 "Stany Zjednoczone",385 "Suazi",386 "Sudan",387 "Surinam",388 "Syria",389 "Szwajcaria",390 "Szwecja",391 "Tad¿ykistan",392 "Tajlandia",393 "Tajwan",394 "Tanzania",395 "Timor Wschodni",396 "Togo",397 "Tonga",398 "Trynidad i Tobago",399 "Tunezja",400 "Turcja",401 "Turkmenistan",402 "Tuvalu",403 "Uganda",404 "Ukraina",405 "Urugwaj",406 "Uzbekistan",407 "Vanuatu",408 "Watykan",409 "Wenezuela",410 "Wêgry",411 "Wielka Brytania",412 "Wietnam",413 "W³ochy",414 "Wybrze¿e Koci S³oniowej",415 "Wyspy Marshalla",416 "Wyspy Salomona",417 "Wyspy wiêtego Tomasza i Ksi¹¿êca",418 "Zambia",419 "Zimbabwe",420 "Zjednoczone Emiraty Arabskie"});421 199 this.cbCountry.Location = new System.Drawing.Point(148, 148); 422 200 this.cbCountry.Name = "cbCountry"; … … 888 666 // cbAgentExpo 889 667 // 890 this.cbAgentExpo.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.clientsBindingSource, "AgentExpo", true)); 891 this.cbAgentExpo.DataSource = this.agenciExpoBindingSource; 892 this.cbAgentExpo.DisplayMember = "Symbol"; 668 this.cbAgentExpo.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.clientsBindingSource, "AgentExpo", true)); 893 669 this.cbAgentExpo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 894 670 this.cbAgentExpo.FormattingEnabled = true; … … 897 673 this.cbAgentExpo.Size = new System.Drawing.Size(118, 21); 898 674 this.cbAgentExpo.TabIndex = 26; 899 this.cbAgentExpo.ValueMember = "Symbol";900 675 // 901 676 // agenciExpoBindingSource … … 920 695 // cbUserName 921 696 // 922 this.cbUserName.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.clientsBindingSource, "UserName", true)); 923 this.cbUserName.DataSource = this.agenciBindingSource; 924 this.cbUserName.DisplayMember = "Symbol"; 697 this.cbUserName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.clientsBindingSource, "UserName", true)); 925 698 this.cbUserName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 926 699 this.cbUserName.FormattingEnabled = true; … … 929 702 this.cbUserName.Size = new System.Drawing.Size(117, 21); 930 703 this.cbUserName.TabIndex = 25; 931 this.cbUserName.ValueMember = "Symbol";932 //933 // agenciBindingSource934 //935 this.agenciBindingSource.DataMember = "AGENCI";936 this.agenciBindingSource.DataSource = this.sLOWNIKDataSet;937 704 // 938 705 // cbActive … … 972 739 this.txtRegon.Size = new System.Drawing.Size(232, 20); 973 740 this.txtRegon.TabIndex = 21; 741 // 742 // agenciBindingSource 743 // 744 this.agenciBindingSource.DataMember = "AGENCI"; 745 this.agenciBindingSource.DataSource = this.sLOWNIKDataSet; 974 746 // 975 747 // btnSave … … 1034 806 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 1035 807 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 808 this.CausesValidation = false; 1036 809 this.ClientSize = new System.Drawing.Size(649, 533); 810 this.ControlBox = false; 1037 811 this.Controls.Add(this.label1); 1038 812 this.Controls.Add(this.txtNote); … … 1043 817 this.Controls.Add(this.gbContact); 1044 818 this.Controls.Add(this.gbAddress); 819 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 1045 820 this.MaximizeBox = false; 1046 821 this.MinimizeBox = false; … … 1050 825 this.Text = "Dodaj/modyfikuj klienta"; 1051 826 this.Load += new System.EventHandler(this.AddClient_Load); 1052 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AddClient_FormClosing);1053 827 this.gbAddress.ResumeLayout(false); 1054 828 this.gbAddress.PerformLayout(); -
branches/ReklamaReorganizacja/BazaReklam/AddClient.cs
r613 r616 6 6 using System.Windows.Forms; 7 7 using Baza_Reklam.Classes.Helpers; 8 using Baza_Reklam.Classes.Model; 9 using Baza_Reklam.Classes.Repositories; 8 10 9 11 namespace Baza_Reklam … … 13 15 private readonly int _clientId; 14 16 private REKLAMADataSet.KLIENCIRow _client; 15 16 protected REKLAMADataSet.KLIENCIRow Client 17 private bool _reload; 18 19 public REKLAMADataSet.KLIENCIRow Client 17 20 { 18 21 get { return _client; } 19 22 } 20 23 21 public AddClient(BindingSource bindingSource) 24 public bool Reload 25 { 26 get { return _reload; } 27 set { _reload = value; } 28 } 29 30 public AddClient() 22 31 { 23 32 InitializeComponent(); 24 rEKLAMADataSet = (REKLAMADataSet)bindingSource.DataSource; 25 clientsBindingSource = bindingSource; 33 Init(); 26 34 } 27 35 … … 32 40 clientsBindingSource = bindingSource; 33 41 _clientId = clientId; 34 } 35 36 private void AddClient_Load(object sender, EventArgs e) 37 { 38 bool update = false; 42 39 43 // rebind controls to use passed binding source 40 44 ReBindControls(this, clientsBindingSource); 45 46 Init(); 47 } 48 49 private void Init() 50 { 41 51 LoadTitleList(); 42 43 agenciTableAdapter.Connection.ConnectionString = ConnString.getConnString().Value;44 52 clientsAdapter.Connection.ConnectionString = ConnString.getConnString().Value; 45 53 clientTitlesAdapter.Connection.ConnectionString = ConnString.getConnString().Value; 46 //TODO: try to display only active agents... 47 agenciTableAdapter.Fill(sLOWNIKDataSet.AGENCI); 48 //agenciTableAdapter.FillByAktywny(sLOWNIKDataSet.AGENCI); 49 54 55 BindComboBox(CountryRepository.FindAll(), cbCountry); 56 cbCountry.DisplayMember = "Name"; 57 cbCountry.ValueMember = "Name"; 58 59 BindComboBox(StateRepository.FindAll(), cbState); 60 cbState.DisplayMember = "Name"; 61 cbState.ValueMember = "Name"; 62 63 BindComboBox(new AgentRepository().FindAllActive(), cbUserName); 64 cbUserName.DisplayMember = "LoginName"; 65 cbUserName.ValueMember = "LoginName"; 66 67 BindComboBox(new AgentRepository().FindAllActive(), cbAgentExpo); 68 cbAgentExpo.DisplayMember = "LoginName"; 69 cbAgentExpo.ValueMember = "LoginName"; 70 } 71 72 private void AddClient_Load(object sender, EventArgs e) 73 { 74 Reload = false; 75 bool update = false; 50 76 if (_clientId == 0) // add new client 51 77 { … … 69 95 } 70 96 71 Set UserNameAndAgentExpo(_client);97 SetStateUserNameAndAgentExpo(_client, update); 72 98 73 99 SetFormCaption(update); … … 89 115 } 90 116 91 private void SetUserNameAndAgentExpo(REKLAMADataSet.KLIENCIRow client) 92 { 93 cbUserName.SelectedIndex = cbUserName.FindString(client.UserName); 94 cbAgentExpo.SelectedIndex = cbAgentExpo.FindString(client.AgentExpo); 95 96 //TODO: try to display only active agents... 97 //if (cbUserName.SelectedIndex == -1) 98 //{ 99 // int index = cbUserName.Items.Add(client.UserName); 100 // cbUserName.SelectedIndex = index; 101 //} 102 103 //if (cbAgentExpo.SelectedIndex == -1) 104 //{ 105 // int index = cbAgentExpo.Items.Add(client.AgentExpo); 106 // cbAgentExpo.SelectedIndex = index; 107 //} 108 109 //if (User.Instance().St_kierownik) 110 //{ 111 // cbUserName.Enabled = User.Instance().UserAgencyList.Contains(DbUtils.idAgencji(client.UserName)); 112 // cbAgentExpo.Enabled = User.Instance().UserAgencyList.Contains(DbUtils.idAgencji(client.AgentExpo)); 113 //} 114 //else 115 //{ 116 // cbUserName.Enabled = client.UserName.Trim().ToLower() == User.Instance().Symbol_agenta.Trim().ToLower(); 117 // cbAgentExpo.Enabled = client.AgentExpo.Trim().ToLower() == User.Instance().Symbol_agenta.Trim().ToLower(); 118 //} 117 private void SetStateUserNameAndAgentExpo(REKLAMADataSet.KLIENCIRow client, bool update) 118 { 119 if (update) 120 { 121 if (!client.IsStateNull()) 122 { 123 int stateIndex = cbState.FindString(client.State); 124 if (stateIndex < 0) 125 { 126 cbState.Items.Insert(0, new State(client.State)); 127 cbState.SelectedIndex = 0; 128 } 129 } 130 131 int userNameIndex = cbUserName.FindString(client.UserName); 132 if (userNameIndex < 0) 133 cbUserName.Items.Insert(0, new Agent(client.UserName.Trim().ToLower())); 134 135 int agentExpoIndex = cbAgentExpo.FindString(client.AgentExpo); 136 if (agentExpoIndex < 0) 137 cbAgentExpo.Items.Insert(0, new Agent(client.AgentExpo.Trim().ToLower())); 138 } 139 140 cbUserName.SelectedIndex = cbUserName.FindString(client.UserName.Trim().ToLower()); 141 cbAgentExpo.SelectedIndex = cbAgentExpo.FindString(client.AgentExpo.Trim().ToLower()); 119 142 120 143 cbUserName.Enabled = (DbUtils.idAgencji(client.UserName) == User.Instance().IdAgencji); … … 165 188 clientsAdapter.Update(rEKLAMADataSet.KLIENCI); 166 189 Cursor = Cursors.Default; 190 Reload = true; 167 191 Close(); 168 192 return; 169 193 } 170 194 Reload = false; 171 195 MessageBox.Show("Proszê wprowadziæ wszystkie wymagane dane."); 172 196 } … … 247 271 } 248 272 249 private void AddClient_FormClosing(object sender, FormClosingEventArgs e) 250 { 251 rEKLAMADataSet.KLIENCI.RejectChanges(); 273 void BindComboBox<T>(IEnumerable<T> list, ComboBox comboBox) 274 { 275 comboBox.Items.Clear(); 276 foreach (T item in list) 277 { 278 comboBox.Items.Add(item); 279 } 252 280 } 253 281 } -
branches/ReklamaReorganizacja/BazaReklam/AddClient.resx
r601 r616 130 130 <value>153, 17</value> 131 131 </metadata> 132 <metadata name="clientsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 133 <value>153, 17</value> 134 </metadata> 132 135 <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 133 136 <value>17, 17</value> 137 </metadata> 138 <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 139 <value>17, 17</value> 140 </metadata> 141 <metadata name="clientTitlesBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 142 <value>1051, 17</value> 134 143 </metadata> 135 144 <metadata name="clientTitlesBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> … … 198 207 <value>429, 17</value> 199 208 </metadata> 209 <metadata name="sLOWNIKDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 210 <value>429, 17</value> 211 </metadata> 200 212 <metadata name="agenciBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 201 213 <value>567, 17</value> -
branches/ReklamaReorganizacja/BazaReklam/Baza Reklam.csproj
r613 r616 116 116 <Compile Include="Classes\Interfaces\IInvoiceProvider.cs" /> 117 117 <Compile Include="Classes\Interfaces\IForm.cs" /> 118 <Compile Include="Classes\Model\Agent.cs" /> 119 <Compile Include="Classes\Model\Country.cs" /> 118 120 <Compile Include="Classes\Model\Invoice.cs" /> 119 121 <Compile Include="Classes\InvoiceProvider.cs" /> … … 122 124 <Compile Include="Classes\Global.cs" /> 123 125 <Compile Include="Classes\Logger.cs" /> 126 <Compile Include="Classes\Model\State.cs" /> 124 127 <Compile Include="Classes\Model\UserAgency.cs" /> 125 128 <Compile Include="Classes\PrintDGV.cs" /> 126 129 <Compile Include="Classes\Produkcja.cs" /> 127 130 <Compile Include="Classes\Helpers\ReklamaHelper.cs" /> 131 <Compile Include="Classes\Repositories\AgentRepository.cs" /> 132 <Compile Include="Classes\Repositories\CountryRepository.cs" /> 133 <Compile Include="Classes\Repositories\IRepository.cs" /> 134 <Compile Include="Classes\Repositories\Repository.cs" /> 135 <Compile Include="Classes\Repositories\StateRepository.cs" /> 128 136 <Compile Include="Classes\Repositories\UserAgencyRepository.cs" /> 129 137 <Compile Include="Classes\User.cs" /> -
branches/ReklamaReorganizacja/BazaReklam/ClientsForm.Designer.cs
r601 r616 4056 4056 // 4057 4057 this.dodajToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 4058 this.dodajToolStripButton.Enabled = false;4059 4058 this.dodajToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("dodajToolStripButton.Image"))); 4060 4059 this.dodajToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; … … 4067 4066 // 4068 4067 this.btnEditClient.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 4069 this.btnEditClient.Enabled = false;4070 4068 this.btnEditClient.Image = ((System.Drawing.Image)(resources.GetObject("btnEditClient.Image"))); 4071 4069 this.btnEditClient.ImageTransparentColor = System.Drawing.Color.Magenta; -
branches/ReklamaReorganizacja/BazaReklam/ClientsForm.cs
r613 r616 204 204 if (tabs.SelectedTab.Name != "daneKlientaTab") 205 205 { 206 dodajToolStripButton.Enabled = false;207 206 zapiszDaneToolStripButton.Enabled = false; 208 207 usunToolStripButton.Enabled = false; 209 btnEditClient.Enabled = false;210 208 } 211 209 else 212 210 { 213 dodajToolStripButton.Enabled = true;214 211 zapiszDaneToolStripButton.Enabled = true; 215 212 usunToolStripButton.Enabled = true; 216 btnEditClient.Enabled = kLIENCIBindingSource.Current != null;217 213 } 218 214 … … 405 401 { 406 402 if (kLIENCIBindingSource.Current == null) return; 403 404 const string caption = "Klient - usuwanie klienta"; 405 406 DialogResult dialogResult = MessageBox.Show("Czy na pewno checsz usun¹æ klienta?", 407 caption, 408 MessageBoxButtons.YesNo, 409 MessageBoxIcon.Question); 410 411 if (dialogResult != DialogResult.Yes) return; 412 407 413 408 414 DataRowView row = (DataRowView) kLIENCIBindingSource.Current; … … 413 419 || kL_KLIENCITableAdapter.GetDataByCustomerId(custId).Count != 0) 414 420 { 415 if (MessageBox.Show("S¹ inne dane zwi¹zane z klientem! Usun¹æ klienta?", "", MessageBoxButtons.YesNo, 416 MessageBoxIcon.Question) == DialogResult.Yes) 421 422 dialogResult = MessageBox.Show("Istniej¹ dane (reklamy, osoby do kontaktu lub klasyfikacja klienta) zwi¹zane z klientem! Usun¹æ klienta?", 423 caption, 424 MessageBoxButtons.YesNo, 425 MessageBoxIcon.Question); 426 427 if (dialogResult == DialogResult.Yes) 417 428 { 418 429 kLIENCIBindingSource.RemoveCurrent(); 419 430 kLIENCIBindingSource.EndEdit(); 420 431 kLIENCITableAdapter.Update(rEKLAMADataSet.KLIENCI); 421 MessageBox.Show("Dane usuniêto");422 432 } 423 433 } … … 427 437 kLIENCIBindingSource.EndEdit(); 428 438 kLIENCITableAdapter.Update(rEKLAMADataSet.KLIENCI); 429 MessageBox.Show("Dane usuniêto");430 439 } 431 440 … … 994 1003 panel1.Visible = false; 995 1004 ukryjToolStripButton.ToolTipText = "Poka¿ szczegó³y"; 996 dodajToolStripButton.Enabled = false;997 btnEditClient.Enabled = false;998 1005 usunToolStripButton.Enabled = false; 999 1006 zapiszDaneToolStripButton.Enabled = false; … … 1003 1010 panel1.Visible = true; 1004 1011 ukryjToolStripButton.ToolTipText = "Ukryj szczegó³y"; 1005 dodajToolStripButton.Enabled = true;1006 btnEditClient.Enabled = kLIENCIBindingSource.Current != null;1007 1012 usunToolStripButton.Enabled = true; 1008 1013 zapiszDaneToolStripButton.Enabled = true; … … 1017 1022 private void dodajToolStripButton_Click(object sender, EventArgs e) 1018 1023 { 1019 AddClient addClient = new AddClient( kLIENCIBindingSource);1024 AddClient addClient = new AddClient(); 1020 1025 addClient.ShowDialog(); 1021 return; 1022 1023 //if (!ValidateChildren()) 1024 //{ 1025 // MessageBox.Show("Proszê uzupe³niæ dane klienta.", "Walidacja danych [dodajToolStripButton_Click]"); 1026 // return; 1027 //} 1028 1029 //dodajKlienta = true; 1030 1031 //kLIENCIBindingSource.EndEdit(); 1032 1033 //// pyta o zACHOWANIE zmian przed zalozeniem kolejnego rekordu 1034 //REKLAMADataSet.KLIENCIDataTable changes = 1035 // rEKLAMADataSet.KLIENCI.GetChanges(DataRowState.Added | DataRowState.Modified) as REKLAMADataSet.KLIENCIDataTable; 1036 1037 //if (changes != null) 1038 //{ 1039 // if (MessageBox.Show("Czy zapisaæ zmiany?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) 1040 // { 1041 // foreach (DataRow r in changes) 1042 // { 1043 // r["Last_Modify"] = DateTime.Now; 1044 // r["Modify_User"] = User.Instance().Login; 1045 // } 1046 1047 // kLIENCITableAdapter.Update(rEKLAMADataSet.KLIENCI); 1048 // } 1049 // else 1050 // { 1051 // rEKLAMADataSet.KLIENCI.RejectChanges(); 1052 // daneKlientaTab.Select(); 1053 // } 1054 //} 1055 1056 ////dodaje nowy rekord 1057 //DataView datatable = (DataView)kLIENCIBindingSource.List; 1058 //DataRowView row = datatable.AddNew(); 1059 //row["Last_Modify"] = DateTime.Now; 1060 //row["data"] = DateTime.Now; 1061 //// nie dziala, bo trigger w bazie zmienia 1062 //row["Modify_User"] = User.Instance().Login; 1063 //row["UserName"] = User.Instance().Login; 1064 //row["AgentExpo"] = User.Instance().Login; 1065 1066 //kLIENCIBindingSource.MoveLast(); 1067 //kLIENCIBindingSource.EndEdit(); 1068 //tabs.SelectedIndex = 0; 1069 //countryComboBox.SelectedIndex = -1; 1070 1071 //groupBox1.Enabled = kLIENCIBindingSource.List.Count == 0 ? false : true; 1072 //groupBox2.Enabled = kLIENCIBindingSource.List.Count == 0 ? false : true; 1073 //groupBox3.Enabled = kLIENCIBindingSource.List.Count == 0 ? false : true; 1074 //groupBox4.Enabled = kLIENCIBindingSource.List.Count == 0 ? false : true; 1075 //groupBox5.Enabled = kLIENCIBindingSource.List.Count == 0 ? false : true; 1076 //tabControl1.Enabled = kLIENCIBindingSource.List.Count == 0 ? false : true; 1077 //firstNameTextBox.Focus(); 1026 1027 if (addClient.Reload) 1028 pokazKlienta(addClient.Client.CustomerID); 1078 1029 } 1079 1030 -
branches/ReklamaReorganizacja/BazaReklam/Docs/versioninfo.html
r613 r616 6 6 <body> 7 7 <h1>Baza reklam - Informacje o wersji</h1> 8 <div> 9 <a id="1.1.7" /> 10 <h2>Wersja 1.1.7 (2009-04-28)</h2> 11 <p>Opis zmian wprowadzonych do wersji 1.1.7</p> 12 <ul> 13 <li>Zgłoszenie #160: Bieżące poprawki na podstawie logu błędów: 14 <ul> 15 <li>- naprawiono błąd występujący przy usuwaniu klienta</li> 16 <li>- poprawiono dodawanie nowego klienta oraz walidację danych</li> 17 </ul> 18 </li> 19 </ul> 20 </div> 8 21 <div> 9 22 <a id="1.1.6" /> -
branches/ReklamaReorganizacja/BazaReklam/Properties/AssemblyInfo.cs
r613 r616 30 30 // 31 31 [assembly: AssemblyVersion("1.0.0.0")] 32 [assembly: AssemblyFileVersion("1.1. 6")]32 [assembly: AssemblyFileVersion("1.1.7")] -
branches/ReklamaReorganizacja/BazaReklamSetup/BazaReklamSetup.vdproj
r613 r616 725 725 "Name" = "8:Microsoft Visual Studio" 726 726 "ProductName" = "8:Baza Reklam" 727 "ProductCode" = "8:{ E94CA729-B311-4DE5-BF21-DF116210CC02}"728 "PackageCode" = "8:{ 724D56E2-C502-4EF3-9B3E-C5044DE7D117}"727 "ProductCode" = "8:{BA6013D0-CAE4-43E4-9F97-7307F220E75E}" 728 "PackageCode" = "8:{E4AC78AD-7024-43AD-B570-FB80AF2E64DC}" 729 729 "UpgradeCode" = "8:{4E2DBBA4-3139-4790-8DDB-7AADFC963A7D}" 730 730 "RestartWWWService" = "11:FALSE" … … 732 732 "DetectNewerInstalledVersion" = "11:TRUE" 733 733 "InstallAllUsers" = "11:TRUE" 734 "ProductVersion" = "8:1.1. 6"734 "ProductVersion" = "8:1.1.7" 735 735 "Manufacturer" = "8:AACT" 736 736 "ARPHELPTELEPHONE" = "8:"
