Пример #1
0
 private void bunifuFlatButton2_Click(object sender, EventArgs e)
 {
     if ((dgv_ct.DataSource as DataTable).Rows.Count > 0)
     {
         DateTime date = DateTime.Now;
         inBaoCao inHD = new inBaoCao("BÁO CÁO DOANH THU",
                                      (Application.OpenForms[1] as frmGui).NV.TenNV1,
                                      date,
                                      tb_price.Text);
         GridControl control = new GridControl();
         control.DataSource = (dgv_ct.DataSource as DataTable);
         inHD.GridControl   = control;
         ReportPrintTool printTool = new ReportPrintTool(inHD);
         bool            kq        = bus.them(new DTO.BaoCaoDTO()
         {
             MaNV1     = (Application.OpenForms[1] as frmGui).NV.MaNV1,
             Loai1     = "Doanh thu",
             ThoiGian1 = date
         });
         printTool.ShowPreviewDialog();
         (dgv_ct.DataSource as DataTable).Rows.Clear();
     }
     else
     {
         MessageBox.Show("Chưa có thông tin");
     }
 }
Пример #2
0
 private void bunifuButton2_Click(object sender, EventArgs e)
 {
     if ((dgv_ct.DataSource as DataTable).Rows.Count > 0)
     {
         DateTime date = DateTime.Now;
         inBaoCao inHD = new inBaoCao("BÁO CÁO KHO",
                                      (Application.OpenForms[1] as frmGui).NV.TenNV1,
                                      date,
                                      "");
         GridControl control = new GridControl();
         control.DataSource = (dgv_ct.DataSource as DataTable);
         inHD.GridControl   = control;
         ReportPrintTool printTool = new ReportPrintTool(inHD);
         printTool.ShowPreviewDialog();
     }
     else
     {
         MessageBox.Show("Chưa có thông tin");
     }
 }