Zbiór zmian 372 dla trunk

Pokaż
Ignoruj:
Data:
2009-02-18 13:02:39 (17 years ago)
Autor:
marek
Opis:

fixes #94 - poprawiono punkt 2

Lokalizacja:
trunk/BazaReklam
Pliki:
5 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/BazaReklam/FactureViewer.Designer.cs

    r92 r372  
    4747            this.label3 = new System.Windows.Forms.Label(); 
    4848            this.typComboBox = new System.Windows.Forms.ComboBox(); 
    49             this.zapiszButton = new System.Windows.Forms.Button(); 
     49            this.btnRefresh = new System.Windows.Forms.Button(); 
    5050            this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer(); 
    5151            this.fAKTURYTableAdapter = new Baza_Reklam.REKLAMADataSetTableAdapters.FAKTURYTableAdapter(); 
     
    168168            this.groupBox1.Controls.Add(this.label3); 
    169169            this.groupBox1.Controls.Add(this.typComboBox); 
    170             this.groupBox1.Controls.Add(this.zapiszButton); 
     170            this.groupBox1.Controls.Add(this.btnRefresh); 
    171171            this.groupBox1.Location = new System.Drawing.Point(499, 3); 
    172172            this.groupBox1.Name = "groupBox1"; 
     
    258258            this.typComboBox.TabIndex = 10; 
    259259            //  
    260             // zapiszButton 
    261             //  
    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 = "Odœwie¿"; 
    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 = "Odœwie¿"; 
     267            this.btnRefresh.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; 
     268            this.btnRefresh.UseVisualStyleBackColor = true; 
    269269            //  
    270270            // reportViewer1 
     
    340340        private System.Windows.Forms.Label label1; 
    341341        private System.Windows.Forms.ComboBox jezykComboBox; 
    342         private System.Windows.Forms.Button zapiszButton; 
     342        private System.Windows.Forms.Button btnRefresh; 
    343343        private System.Windows.Forms.TextBox opisTextBox; 
    344344        private Microsoft.Reporting.WinForms.ReportViewer reportViewer1; 
  • trunk/BazaReklam/FactureViewer.cs

    r295 r372  
    1818    { 
    1919        private int idFaktury; 
    20         private int idKorekty; 
    21         private int idPoprzedniejKorekty; 
     20        private readonly int idKorekty; 
     21        private readonly int idPoprzedniejKorekty; 
    2222 
    2323        /// <summary> 
     
    3333            idFaktury = idFakt; 
    3434 
    35             this.proforma = rodzaj; 
    36  
    37             zapiszButton.Click += new EventHandler(zapiszButton_Click); 
     35            proforma = rodzaj; 
     36 
     37            btnRefresh.Click += zapiszButton_Click; 
    3838 
    3939            fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; 
     
    5353 
    5454            //ustawianie danych dla raportu 
    55             if (this.proforma) 
     55            if (proforma) 
    5656            { 
    5757                typComboBox.Enabled = false; 
     
    9595 
    9696 
    97         private bool IsFakturaPoznanOrKatowice(string roz, int nabywca) 
     97        private static bool IsFakturaPoznanOrKatowice(string roz, int nabywca) 
    9898        { 
    9999            return roz.ToUpper() == "KAT" || roz.ToUpper() == "POZ" || nabywca == 678 || nabywca == 18845; 
     
    123123            proforma = r; 
    124124 
    125             zapiszButton.Click += zapiszButton2_Click; 
     125            btnRefresh.Click += Refresh_Click; 
    126126 
    127127            fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; 
     
    190190            } 
    191191 
     192            if (!faktura.Issuma_zaplatNull() && faktura.suma_zaplat > 0) 
     193                zaplaconoCheckBox.Checked = true; 
     194 
    192195            paramList.Add(new ReportParameter("zaplacono", zaplaconoCheckBox.Checked.ToString(), true)); 
    193196 
     
    215218            this.idPoprzedniejKorekty = idPoprzedniejKorekty; 
    216219 
    217             zapiszButton.Click += zapiszKorektaButton_Click; 
     220            btnRefresh.Click += zapiszKorektaButton_Click; 
    218221 
    219222            fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; 
     
    275278            idFaktury = idFakt; 
    276279 
    277             this.zapiszButton.Click += new EventHandler(zapiszPoznanButton_Click); 
     280            this.btnRefresh.Click += new EventHandler(zapiszPoznanButton_Click); 
    278281 
    279282            fakturaTableAdapter1.Connection.ConnectionString = ConnString.getConnString().Value; 
     
    356359        } 
    357360 
    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) 
    362392        { 
    363393            Cursor = Cursors.WaitCursor; 
     
    368398            fAKTURYTableAdapter.FillByIdFaktury(rEKLAMADataSet.FAKTURY, idKorekty); 
    369399 
    370             //ustawienie parametrów, nowych datasoure dla raportu 
    371             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" faktury 
    393             fAKTURYBindingSource.EndEdit(); 
    394             fAKTURYTableAdapter.Update(rEKLAMADataSet.FAKTURY); 
    395             fAKTURYTableAdapter.FillByIdFaktury(rEKLAMADataSet.FAKTURY, idKorekty); 
    396  
    397400            reportViewer1.LocalReport.DataSources.Clear(); 
    398401 
     
    427430        } 
    428431 
    429         private void zapiszButton2_Click(object sender, EventArgs e) 
     432        private void Refresh_Click(object sender, EventArgs e) 
    430433        { 
    431434            Cursor = Cursors.WaitCursor; 
     
    450453                paramList.Add(new ReportParameter("proforma", "False", true)); 
    451454            } 
     455 
    452456            paramList.Add(new ReportParameter("zaplacono", zaplaconoCheckBox.Checked.ToString(), true)); 
    453457 
     
    591595        private void Export(LocalReport report) 
    592596        { 
    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>"; 
    603606            Warning[] warnings; 
    604607            m_streams = new List<Stream>(); 
     
    626629            printDoc.PrinterSettings = printerSettings; 
    627630            printDoc.PrinterSettings.Duplex = Duplex.Vertical; 
    628             printDoc.PrintPage += new PrintPageEventHandler(PrintPage); 
     631            printDoc.PrintPage += PrintPage; 
    629632            printDoc.Print(); 
    630633        } 
     
    643646        } 
    644647 
    645         public void Dispose() 
     648        private void Dispose() 
    646649        { 
    647650            if (m_streams != null) 
  • trunk/BazaReklam/FactureViewer.resx

    r92 r372  
    124124    <value>162, 17</value> 
    125125  </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> 
    132126  <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 
    133127    <value>17, 17</value> 
  • trunk/BazaReklam/Raporty/fakturaKatowicePoznan.rdlc

    r366 r372  
    41224122                <Left>12.69841cm</Left> 
    41234123                <Height>0.63492cm</Height> 
    4124                 <Value>=Iif((IsNothing(Fields!suma_zaplat.Value) OR Fields!suma_zaplat.Value=0) AND Parameters!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> 
    41254125              </Textbox> 
    41264126              <Textbox Name="TERMIN_ZAPLATY"> 
  • trunk/BazaReklam/Raporty/fakturaReversed2.rdlc

    r295 r372  
    41224122                <Left>12.69841cm</Left> 
    41234123                <Height>0.63492cm</Height> 
    4124                 <Value>=Iif((IsNothing(Fields!suma_zaplat.Value) OR Fields!suma_zaplat.Value=0) AND Parameters!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> 
    41254125              </Textbox> 
    41264126              <Textbox Name="TERMIN_ZAPLATY">