Ejemplo n.º 1
0
        public void PrintBill(ObjBill objBill, List <ObjBillDetail> objBillDetail)
        {
            Bill_vi report = new Bill_vi();

            foreach (DevExpress.XtraReports.Parameters.Parameter p in report.Parameters)
            {
                p.Visible = false;
            }
            report.InitData(objBill.SOHD, objBill.NGHD, objBill.TenKH, objBill.DchiKH, objBill.MANV, objBill.TenNV, objBill.TRIGIA, objBillDetail);
            documentViewer1.DocumentSource = report;
            report.CreateDocument();
        }
Ejemplo n.º 2
0
 private void PrintInvoice()
 {
     System.Windows.Forms.Form f = System.Windows.Forms.Application.OpenForms["_frmSalesManage"];
     checklang = ((_frmSalesManage)f).lbNameKh.Text;
     if (checklang == "Họ Tên:")
     {
         Bill_vi bill_vi = new Bill_vi();
         documentViewer1.DocumentSource = bill_vi;
         bill_vi.CreateDocument();
     }
     else
     {
         Bill_en bill_en = new Bill_en();
         documentViewer1.DocumentSource = bill_en;
         bill_en.CreateDocument();
     }
 }