- Data:
- 2009-02-18 13:02:39 (17 years ago)
- Lokalizacja:
- trunk/BazaReklam
- Pliki:
-
- 5 zmodyfikowane
-
FactureViewer.Designer.cs (zmodyfikowane) (4 diffs)
-
FactureViewer.cs (zmodyfikowane) (15 diffs)
-
FactureViewer.resx (zmodyfikowane) (1 diff)
-
Raporty/fakturaKatowicePoznan.rdlc (zmodyfikowane) (1 diff)
-
Raporty/fakturaReversed2.rdlc (zmodyfikowane) (1 diff)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/BazaReklam/FactureViewer.Designer.cs
r92 r372 47 47 this.label3 = new System.Windows.Forms.Label(); 48 48 this.typComboBox = new System.Windows.Forms.ComboBox(); 49 this. zapiszButton= new System.Windows.Forms.Button();49 this.btnRefresh = new System.Windows.Forms.Button(); 50 50 this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer(); 51 51 this.fAKTURYTableAdapter = new Baza_Reklam.REKLAMADataSetTableAdapters.FAKTURYTableAdapter(); … … 168 168 this.groupBox1.Controls.Add(this.label3); 169 169 this.groupBox1.Controls.Add(this.typComboBox); 170 this.groupBox1.Controls.Add(this. zapiszButton);170 this.groupBox1.Controls.Add(this.btnRefresh); 171 171 this.groupBox1.Location = new System.Drawing.Point(499, 3); 172 172 this.groupBox1.Name = "groupBox1"; … … 258 258 this.typComboBox.TabIndex = 10; 259 259 // 260 // zapiszButton261 // 262 this. zapiszButton.Location = new System.Drawing.Point(146, 24);263 this. zapiszButton.Name = "zapiszButton";264 this. zapiszButton.Size = new System.Drawing.Size(77, 29);265 this. zapiszButton.TabIndex = 5;266 this. zapiszButton.Text = "Odwie¿";267 this. zapiszButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;268 this. zapiszButton.UseVisualStyleBackColor = true;260 // btnRefresh 261 // 262 this.btnRefresh.Location = new System.Drawing.Point(146, 24); 263 this.btnRefresh.Name = "btnRefresh"; 264 this.btnRefresh.Size = new System.Drawing.Size(77, 29); 265 this.btnRefresh.TabIndex = 5; 266 this.btnRefresh.Text = "Odwie¿"; 267 this.btnRefresh.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; 268 this.btnRefresh.UseVisualStyleBackColor = true; 269 269 // 270 270 // reportViewer1 … … 340 340 private System.Windows.Forms.Label label1; 341 341 private System.Windows.Forms.ComboBox jezykComboBox; 342 private System.Windows.Forms.Button zapiszButton;342 private System.Windows.Forms.Button btnRefresh; 343 343 private System.Windows.Forms.TextBox opisTextBox; 344 344 private Microsoft.Reporting.WinForms.ReportViewer reportViewer1; -
trunk/BazaReklam/FactureViewer.cs
r295 r372 18 18 { 19 19 private int idFaktury; 20 private int idKorekty;21 private int idPoprzedniejKorekty;20 private readonly int idKorekty; 21 private readonly int idPoprzedniejKorekty; 22 22 23 23 /// <summary> … … 33 33 idFaktury = idFakt; 34 34 35 this.proforma = rodzaj;36 37 zapiszButton.Click += new EventHandler(zapiszButton_Click);35 proforma = rodzaj; 36 37 btnRefresh.Click += zapiszButton_Click; 38 38 39 39 fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; … … 53 53 54 54 //ustawianie danych dla raportu 55 if ( this.proforma)55 if (proforma) 56 56 { 57 57 typComboBox.Enabled = false; … … 95 95 96 96 97 private bool IsFakturaPoznanOrKatowice(string roz, int nabywca)97 private static bool IsFakturaPoznanOrKatowice(string roz, int nabywca) 98 98 { 99 99 return roz.ToUpper() == "KAT" || roz.ToUpper() == "POZ" || nabywca == 678 || nabywca == 18845; … … 123 123 proforma = r; 124 124 125 zapiszButton.Click += zapiszButton2_Click;125 btnRefresh.Click += Refresh_Click; 126 126 127 127 fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; … … 190 190 } 191 191 192 if (!faktura.Issuma_zaplatNull() && faktura.suma_zaplat > 0) 193 zaplaconoCheckBox.Checked = true; 194 192 195 paramList.Add(new ReportParameter("zaplacono", zaplaconoCheckBox.Checked.ToString(), true)); 193 196 … … 215 218 this.idPoprzedniejKorekty = idPoprzedniejKorekty; 216 219 217 zapiszButton.Click += zapiszKorektaButton_Click;220 btnRefresh.Click += zapiszKorektaButton_Click; 218 221 219 222 fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; … … 275 278 idFaktury = idFakt; 276 279 277 this. zapiszButton.Click += new EventHandler(zapiszPoznanButton_Click);280 this.btnRefresh.Click += new EventHandler(zapiszPoznanButton_Click); 278 281 279 282 fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; … … 356 359 } 357 360 358 /// <summary> 359 /// WERSJA DLA POZNANIA 360 /// </summary> 361 private void zapiszPoznanButton_Click(object sender, EventArgs e) 361 ///// <summary> 362 ///// WERSJA DLA POZNANIA 363 ///// </summary> 364 //private void zapiszPoznanButton_Click(object sender, EventArgs e) 365 //{ 366 // Cursor = Cursors.WaitCursor; 367 368 // //zapisanie zmian w polu "opis" faktury 369 // fAKTURYBindingSource.EndEdit(); 370 // fAKTURYTableAdapter.Update(rEKLAMADataSet.FAKTURY); 371 // fAKTURYTableAdapter.FillByIdFaktury(rEKLAMADataSet.FAKTURY, idKorekty); 372 373 // //ustawienie parametrów, nowych datasoure dla raportu 374 // List<ReportParameter> paramList = new List<ReportParameter>(); 375 376 // paramList.Add(new ReportParameter("jezyk", jezykComboBox.SelectedItem.ToString(), true)); 377 // paramList.Add(new ReportParameter("podpis", podpisCheckBox.Checked.ToString(), true)); 378 // reportViewer1.LocalReport.SetParameters(paramList); 379 // reportViewer1.LocalReport.DataSources.Clear(); 380 // reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Faktura", fakturaTableAdapter1.GetDataByIdFaktury(idFaktury))); 381 // reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Korekta", fakturaTableAdapter1.GetDataByIdFaktury(idKorekty))); 382 // reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("FakturaDetails", fakturA_DETAILSTableAdapter1.GetDataByIdFaktury(idFaktury))); 383 // reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("tlumaczenia", ds.Tables[0])); 384 385 // reportViewer1.RefreshReport(); 386 // //MessageBox.Show(reportViewer1.LocalReport.ReportEmbeddedResource); 387 // Cursor = Cursors.Default; 388 389 //} 390 391 private void zapiszKorektaButton_Click(object sender, EventArgs e) 362 392 { 363 393 Cursor = Cursors.WaitCursor; … … 368 398 fAKTURYTableAdapter.FillByIdFaktury(rEKLAMADataSet.FAKTURY, idKorekty); 369 399 370 //ustawienie parametrów, nowych datasoure dla raportu371 List<ReportParameter> paramList = new List<ReportParameter>();372 373 paramList.Add(new ReportParameter("jezyk", jezykComboBox.SelectedItem.ToString(), true));374 paramList.Add(new ReportParameter("podpis", podpisCheckBox.Checked.ToString(), true));375 reportViewer1.LocalReport.SetParameters(paramList);376 reportViewer1.LocalReport.DataSources.Clear();377 reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Faktura", fakturaTableAdapter1.GetDataByIdFaktury(idFaktury)));378 reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Korekta", fakturaTableAdapter1.GetDataByIdFaktury(idKorekty)));379 reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("FakturaDetails", fakturA_DETAILSTableAdapter1.GetDataByIdFaktury(idFaktury)));380 reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("tlumaczenia", ds.Tables[0]));381 382 reportViewer1.RefreshReport();383 //MessageBox.Show(reportViewer1.LocalReport.ReportEmbeddedResource);384 Cursor = Cursors.Default;385 386 }387 388 private void zapiszKorektaButton_Click(object sender, EventArgs e)389 {390 Cursor = Cursors.WaitCursor;391 392 //zapisanie zmian w polu "opis" faktury393 fAKTURYBindingSource.EndEdit();394 fAKTURYTableAdapter.Update(rEKLAMADataSet.FAKTURY);395 fAKTURYTableAdapter.FillByIdFaktury(rEKLAMADataSet.FAKTURY, idKorekty);396 397 400 reportViewer1.LocalReport.DataSources.Clear(); 398 401 … … 427 430 } 428 431 429 private void zapiszButton2_Click(object sender, EventArgs e)432 private void Refresh_Click(object sender, EventArgs e) 430 433 { 431 434 Cursor = Cursors.WaitCursor; … … 450 453 paramList.Add(new ReportParameter("proforma", "False", true)); 451 454 } 455 452 456 paramList.Add(new ReportParameter("zaplacono", zaplaconoCheckBox.Checked.ToString(), true)); 453 457 … … 591 595 private void Export(LocalReport report) 592 596 { 593 string deviceInfo = 594 "<DeviceInfo>" + 595 " <OutputFormat>EMF</OutputFormat>" + 596 " <PageWidth>19cm</PageWidth>" + 597 " <PageHeight>25cm</PageHeight>" + 598 " <MarginTop>1cm</MarginTop>" + 599 " <MarginLeft>1cm</MarginLeft>" + 600 " <MarginRight>1cm</MarginRight>" + 601 " <MarginBottom>0cm</MarginBottom>" + 602 "</DeviceInfo>"; 597 const string deviceInfo = "<DeviceInfo>" + 598 " <OutputFormat>EMF</OutputFormat>" + 599 " <PageWidth>19cm</PageWidth>" + 600 " <PageHeight>25cm</PageHeight>" + 601 " <MarginTop>1cm</MarginTop>" + 602 " <MarginLeft>1cm</MarginLeft>" + 603 " <MarginRight>1cm</MarginRight>" + 604 " <MarginBottom>0cm</MarginBottom>" + 605 "</DeviceInfo>"; 603 606 Warning[] warnings; 604 607 m_streams = new List<Stream>(); … … 626 629 printDoc.PrinterSettings = printerSettings; 627 630 printDoc.PrinterSettings.Duplex = Duplex.Vertical; 628 printDoc.PrintPage += new PrintPageEventHandler(PrintPage);631 printDoc.PrintPage += PrintPage; 629 632 printDoc.Print(); 630 633 } … … 643 646 } 644 647 645 p ublicvoid Dispose()648 private void Dispose() 646 649 { 647 650 if (m_streams != null) -
trunk/BazaReklam/FactureViewer.resx
r92 r372 124 124 <value>162, 17</value> 125 125 </metadata> 126 <metadata name="fAKTURYBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">127 <value>162, 17</value>128 </metadata>129 <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">130 <value>17, 17</value>131 </metadata>132 126 <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 133 127 <value>17, 17</value> -
trunk/BazaReklam/Raporty/fakturaKatowicePoznan.rdlc
r366 r372 4122 4122 <Left>12.69841cm</Left> 4123 4123 <Height>0.63492cm</Height> 4124 <Value>=I if((IsNothing(Fields!suma_zaplat.Value) OR Fields!suma_zaplat.Value=0) ANDParameters!zaplacono.Value=false,"",First(Fields!FAKTURY_DRUK_INTERNATIONALzaplacono_label.Value, "tlumaczenia"))</Value>4124 <Value>=IIf(Parameters!zaplacono.Value=false,"",First(Fields!FAKTURY_DRUK_INTERNATIONALzaplacono_label.Value, "tlumaczenia"))</Value> 4125 4125 </Textbox> 4126 4126 <Textbox Name="TERMIN_ZAPLATY"> -
trunk/BazaReklam/Raporty/fakturaReversed2.rdlc
r295 r372 4122 4122 <Left>12.69841cm</Left> 4123 4123 <Height>0.63492cm</Height> 4124 <Value>=I if((IsNothing(Fields!suma_zaplat.Value) OR Fields!suma_zaplat.Value=0) ANDParameters!zaplacono.Value=false,"",First(Fields!FAKTURY_DRUK_INTERNATIONALzaplacono_label.Value, "tlumaczenia"))</Value>4124 <Value>=IIf(Parameters!zaplacono.Value=false,"",First(Fields!FAKTURY_DRUK_INTERNATIONALzaplacono_label.Value, "tlumaczenia"))</Value> 4125 4125 </Textbox> 4126 4126 <Textbox Name="TERMIN_ZAPLATY">
