public void DoSlipPrint(string sinvno,string customer, decimal subtotal = 0, decimal discount = 0, decimal retamt = 0, decimal netamoount = 0,bool screenprint=false) { var ds = new BLReports().GetRptSalesInv(sinvno,false); var rpt = new RptSalesInvoice(); rpt.DataSource = ds; rpt.Company = Utils.Companyname; rpt.patshare = discount.ToString("n2"); rpt.NetAmount = netamoount.ToString("n2"); rpt.ScreenPrint = screenprint; rpt.Customername = customer; rpt.Print(); //var sp = new SlipPrinting(); //sp._InvoiceNo = sinvno; //sp._tot = subtotal.ToString(); //sp._disc = discount.ToString(); //sp._ReturnAmt = retamt.ToString(); //sp._NetAmount = netamoount.ToString(); //sp.ds = ds; //sp.print(); }
public void DoPrint(string sinvno,string customern = "") { //DoSlipPrint(sinvno); //var rpt = new Reports.RptSalesInvoice(); //var ds = new Reports.BLReports().GetRptSalesInv(sinvno); //rpt.Company = VIRETAILDAL.COMMON.Utils.Companyname; //rpt.DataSource = ds; //var printTool = new ReportPrintTool(rpt); //printTool.ShowPreview(); var ds = new BLReports().GetRptSalesInv(sinvno); var rpt = new RptSalesInvoice(); rpt.Customername = customern; rpt.DataSource = ds; rpt.Company = Utils.Companyname; if (!string.IsNullOrEmpty(ds[0]["SDISC"].ToString())) { rpt.patshare = decimal.Parse(ds[0]["SDISC"].ToString()).ToString("n2"); } rpt.NetAmount = decimal.Parse(ds[0]["NETAMT"].ToString()).ToString("n2"); //netamoount.ToString("n2"); rpt.Print(); }