- Data:
- 2009-01-11 15:23:18 (17 years ago)
- Lokalizacja:
- trunk/BazaReklam
- Pliki:
-
- 2 zmodyfikowane
-
FakturowaniePoznanKatowice.Designer.cs (zmodyfikowane) (4 diffs)
-
FakturowaniePoznanKatowice.cs (zmodyfikowane) (11 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/BazaReklam/FakturowaniePoznanKatowice.Designer.cs
r106 r144 31 31 this.components = new System.ComponentModel.Container(); 32 32 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FakturowaniePoznanKatowice)); 33 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle 1= new System.Windows.Forms.DataGridViewCellStyle();33 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); 34 34 this.fakturaButton = new System.Windows.Forms.Button(); 35 35 this.korektaButton = new System.Windows.Forms.Button(); … … 158 158 this.fAKTURYDataGridView.AllowUserToAddRows = false; 159 159 this.fAKTURYDataGridView.AllowUserToDeleteRows = false; 160 dataGridViewCellStyle 1.BackColor = System.Drawing.Color.MintCream;161 this.fAKTURYDataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle 1;160 dataGridViewCellStyle2.BackColor = System.Drawing.Color.MintCream; 161 this.fAKTURYDataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; 162 162 this.fAKTURYDataGridView.AutoGenerateColumns = false; 163 163 this.fAKTURYDataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; … … 278 278 this.agencjaListBox.Items.AddRange(new object[] { 279 279 "POZ", 280 "KAT", 281 "D2D"}); 280 "KAT"}); 282 281 this.agencjaListBox.Location = new System.Drawing.Point(23, 22); 283 282 this.agencjaListBox.Name = "agencjaListBox"; … … 314 313 this.Controls.Add(this.groupBox3); 315 314 this.Name = "FakturowaniePoznanKatowice"; 315 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 316 316 this.Text = "Fakturowanie - Poznañ - Katowice"; 317 317 this.Load += new System.EventHandler(this.FakturowaniePoznanKatowice_Load); -
trunk/BazaReklam/FakturowaniePoznanKatowice.cs
r106 r144 21 21 REKLAMADataSet.KLIENCIRow klientKatowice; 22 22 23 int idZamowieniaPoznan; 24 int idZamowieniaKatowice; 25 23 26 public FakturowaniePoznanKatowice() 24 27 { … … 42 45 43 46 nrTygodniaUpDown.Value = weekNum; 47 48 49 if (ConnString.getConnString().Value.Contains("TEST")) 50 { 51 idZamowieniaKatowice = 149; 52 idZamowieniaPoznan = 148; 53 } 54 else 55 { 56 //baza produkcyjna 57 idZamowieniaPoznan = 272; 58 idZamowieniaKatowice = 273; 59 } 44 60 } 45 61 … … 235 251 naglowekKorekty.DATA_WYSTAWIENIA = DateTime.Today; 236 252 237 naglowekKorekty.idZamowienia = 148; 253 if (faktura.ID_SPRZEDAWCY == 6) 254 { 255 naglowekKorekty.idZamowienia = idZamowieniaPoznan; 256 } 257 else 258 { 259 naglowekKorekty.idZamowienia = idZamowieniaKatowice; 260 } 261 238 262 naglowekKorekty.ID_SPRZEDAWCY = faktura.ID_SPRZEDAWCY; 239 240 263 naglowekKorekty.MIEJSCOWOSC_WYSTAWIENIA = faktura.MIEJSCOWOSC_WYSTAWIENIA; 241 264 naglowekKorekty.SPRZEDAWCA_ADRES = faktura.SPRZEDAWCA_ADRES; … … 248 271 naglowekKorekty.NABYWCA_ADRES = faktura.NABYWCA_ADRES; 249 272 naglowekKorekty.NABYWCA_NIP = faktura.NABYWCA_NIP; 250 naglowekKorekty.TERMIN_ZAPLATY = DateTime.Today.AddDays( 30);273 naglowekKorekty.TERMIN_ZAPLATY = DateTime.Today.AddDays(14); 251 274 naglowekKorekty.opis = "rezygnacja z emisji reklamy"; 252 275 … … 281 304 } 282 305 283 naglowekFaktury.idZamowienia = 148; 306 if (agencja.Id_agencji == 6) 307 { 308 naglowekFaktury.idZamowienia = idZamowieniaPoznan; 309 } 310 else 311 { 312 naglowekFaktury.idZamowienia = idZamowieniaKatowice; 313 } 314 284 315 naglowekFaktury.ID_SPRZEDAWCY = agencja.Id_agencji; 285 316 … … 300 331 naglowekFaktury.SPOSOB_ZAPLATY = "Przelew"; 301 332 302 naglowekFaktury.TERMIN_ZAPLATY = naglowekFaktury.DATA_SPRZEDAZY.AddDays( 30);333 naglowekFaktury.TERMIN_ZAPLATY = naglowekFaktury.DATA_SPRZEDAZY.AddDays(14); 303 334 naglowekFaktury.ZAPLACONO = false; 304 335 … … 316 347 REKLAMADataSet.FAKTURA_DETAILSDataTable pozycjeFakturDlaKlientow = 317 348 this.fakturA_DETAILSTableAdapter.GetDataByNrTygodniaWRoku( 318 dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value, naglowekFaktury.ID_SPRZEDAWCY );349 dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value, naglowekFaktury.ID_SPRZEDAWCY, dtpZmianaDaty.Value.Month); 319 350 320 351 REKLAMADataSet.FAKTURYDataTable naglowkiFakturDlaKlientow = 321 352 this.fAKTURYTableAdapter.GetDataByNrTygodniaWRoku( 322 dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value, naglowekFaktury.ID_SPRZEDAWCY );353 dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value, naglowekFaktury.ID_SPRZEDAWCY,dtpZmianaDaty.Value.Month); 323 354 324 355 if (pozycjeFakturDlaKlientow.Rows.Count == 0 || naglowkiFakturDlaKlientow.Rows.Count == 0) … … 374 405 375 406 REKLAMADataSet.FAKTURA_DETAILSDataTable pozycjeFakturDlaKlientow = 376 this.fakturA_DETAILSTableAdapter.GetDataByNrTygodniaRokZKorekta( 377 naglowekFaktury.ID_SPRZEDAWCY,dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value);407 this.fakturA_DETAILSTableAdapter.GetDataByNrTygodniaRokZKorekta(dtpZmianaDaty.Value.Month, 408 dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value,naglowekFaktury.ID_SPRZEDAWCY); 378 409 379 410 REKLAMADataSet.FAKTURYDataTable naglowkiFakturDlaKlientow = 380 this.fAKTURYTableAdapter.GetDataByNrTygodniaWRokuZKorekta( 381 naglowekFaktury.ID_SPRZEDAWCY,dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value);411 this.fAKTURYTableAdapter.GetDataByNrTygodniaWRokuZKorekta(dtpZmianaDaty.Value.Month, 412 dtpZmianaDaty.Value.Year, nrTygodniaUpDown.Value,naglowekFaktury.ID_SPRZEDAWCY); 382 413 383 414 if (pozycjeFakturDlaKlientow.Rows.Count == 0 || naglowkiFakturDlaKlientow.Rows.Count == 0) … … 434 465 REKLAMADataSet.WplatyRow wplata = this.rEKLAMADataSet.Wplaty.NewWplatyRow(); 435 466 wplata.idFaktury = naglowekFaktury.ID_FAKTURY; 436 wplata.idZamowienia = 148; 437 this.rEKLAMADataSet.Wplaty.AddWplatyRow(wplata); 467 468 if (naglowekFaktury.ID_SPRZEDAWCY == 6) 469 { 470 wplata.idZamowienia = idZamowieniaPoznan; 471 } 472 else 473 { 474 wplata.idZamowienia = idZamowieniaKatowice; 475 } 438 476 } 439 477 … … 475 513 REKLAMADataSet.FAKTURYRow faktura = (REKLAMADataSet.FAKTURYRow) 476 514 ((DataRowView)fAKTURYBindingSource.Current).Row; 515 516 string kod = faktura.NUMER_ROZ; 477 517 478 518 if (faktura.KOREKTA) … … 493 533 } 494 534 535 this.fAKTURYTableAdapter.FillByKodAgenta(this.rEKLAMADataSet.FAKTURY, kod); 536 495 537 this.Cursor = Cursors.Default; 496 538 }
