예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptDatHangNhaCungCap rpt = new rptDatHangNhaCungCap();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rptDatHangNhaCungCap rpt = new rptDatHangNhaCungCap();
     rpt.Site = this.Site;
     return rpt;
 }
예제 #3
0
 private void toolStripStatusLabel3_Click(object sender, EventArgs e)
 {
     ArrayList arr = new ArrayList();
     foreach (DataGridViewRow item in dgvInsertOrder.Rows)
     {
         Entities.BCKhachHangDatHang temp = new Entities.BCKhachHangDatHang();
         temp.MaDonDatHang = txtSodonhang.Text;
         temp.MaKH = txtManhacungcap.Text;
         temp.Ten = lblTennhacungcap.Text;
         temp.MaHang = item.Cells[1].Value.ToString();
         temp.TenHang = item.Cells[2].Value.ToString();
         temp.SoLuong = Convert.ToDouble(item.Cells[3].Value.ToString());
         temp.Gia = Convert.ToDouble(item.Cells[4].Value.ToString());
         temp.ChietKhau = Convert.ToDouble(item.Cells[7].Value.ToString());
         temp.Thue = Convert.ToDouble(item.Cells[8].Value.ToString());
         temp.TongTienCK = Convert.ToDouble(item.Cells[9].Value.ToString());
         temp.TongTien = Convert.ToDouble(item.Cells[11].Value.ToString());
         arr.Add(temp);
     }
     if (arr.Count > 0)
     {
         Entities.BCKhachHangDatHang[] rpt = new Entities.BCKhachHangDatHang[arr.Count];
         int i = 0;
         foreach (object item in arr)
         {
             rpt[i] = (Entities.BCKhachHangDatHang)item;
             i++;
         }
         if (check_loaidathang.Checked)
         {
             Report.rptDatHangNhaCungCap khdh = new Report.rptDatHangNhaCungCap();
             khdh.SetDataSource(rpt);
             khdh.SetParameterValue("TongTien", txtTienhang.Text);
             khdh.SetParameterValue("TongTienCK", txtChietkhau.Text);
             khdh.SetParameterValue("TienThue", txtGiatrigiatang.Text);
             khdh.SetParameterValue("TongTienCK", txtChietkhau.Text);
             khdh.SetParameterValue("TongTienDonHang", txtTongtien.Text);
             khdh.SetParameterValue("NgayTao", makNgaydonhang.Text);
             khdh.SetParameterValue("TenBaoCao", "Báo Cáo Đặt Hàng Nhà Cung Cấp");
             frmBaoCaorpt frm = new frmBaoCaorpt(khdh);
             frm.ShowDialog();
         }
         else
         {
             Report.rptKhachHangDatHang khdh = new Report.rptKhachHangDatHang();
             khdh.SetDataSource(rpt);
             khdh.SetParameterValue("TongTien", txtTienhang.Text);
             khdh.SetParameterValue("TongTienCK", txtChietkhau.Text);
             khdh.SetParameterValue("TienThue", txtGiatrigiatang.Text);
             khdh.SetParameterValue("TongTienCK", txtChietkhau.Text);
             khdh.SetParameterValue("TongTienDonHang", txtTongtien.Text);
             khdh.SetParameterValue("NgayTao", makNgaydonhang.Text);
             khdh.SetParameterValue("TenBaoCao", "Báo Cáo Khách Hàng Đặt Hàng");
             frmBaoCaorpt frm = new frmBaoCaorpt(khdh);
             frm.ShowDialog();
         }
     }
 }