private void searchPeriod_Click(object sender, EventArgs e) { try { BL.Customer.statementOFAcount soa = new BL.Customer.statementOFAcount(); this.dataGridView1.DataSource = soa.GetStatementPeriod(CustomerNo, Convert.ToDateTime(DateTime1.Value), Convert.ToDateTime(DateTime2.Value)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void statementOfAcount_Load(object sender, EventArgs e) { try { BL.Customer.statementOFAcount soa = new BL.Customer.statementOFAcount(); this.dataGridView1.DataSource = soa.GetStatement(CustomerNo); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BtnPrintSatatentByDate_Click(object sender, EventArgs e) { BL.Reports.SearchStatement SearchState = new BL.Reports.SearchStatement(); //Report.statOdAccByDate rpt = new Report.statOdAccByDate(); //Report.ReportForm frm = new Report.ReportForm(); //DataSet ds = new DataSet(); //ds.Tables.Add(SearchState.GetStatementPeriod(this.CustomerNo, this.DateTime1.Value.Date, this.DateTime2.Value.Date)); ////ds.Tables[0].Merge(SearchState.GetStatementPeriod(this.CustomerNo, this.DateTime1.Value.Date, this.DateTime2.Value.Date)); //rpt.SetDataSource(ds.Tables[0]); //frm.crystalReportViewer1.ReportSource = rpt; //frm.ShowDialog(); //BL.Reports.SearchStatement SearchState = new BL.Reports.SearchStatement(); BL.Customer.statementOFAcount soa = new BL.Customer.statementOFAcount(); Report.SStatement rpt = new Report.SStatement(); Report.ReportForm frm = new Report.ReportForm(); //DataSet ds = new DataSet(); //ds.Tables.Add(SearchState.GetStatementPeriod(this.CustomerNo, this.DateTime1.Value.Date, this.DateTime2.Value.Date)); //ds.Tables[0].Merge(SearchState.GetStatementPeriod(this.CustomerNo, this.DateTime1.Value.Date, this.DateTime2.Value.Date)); //rpt.SetDataSource(soa.getOrderOfCustomerP(this.CustomerNo,this.DateTime1.Value,DateTime2.Value)); rpt.SetDataSource(SearchState.GetStatementPeriod(this.CustomerNo, this.DateTime1.Value, DateTime2.Value)); frm.crystalReportViewer1.ReportSource = rpt; frm.ShowDialog(); }