コード例 #1
0
ファイル: BLPURRETINV.cs プロジェクト: rehman922/VIRETAIL
        public static void DoPrint(string retinvid)
        {
            var rpt = new PurchaseRpt {Company = Utils.Companyname, Header = "Purchase Return Invoice",DueDays = false,Docno = retinvid};
            var ds = ClsGetData.RptPurchaseInv(retinvid);
            rpt.DataSource = ds;
            var  printTool = new ReportPrintTool(rpt);
            printTool.ShowPreview();

        }
コード例 #2
0
ファイル: BLPURINV.cs プロジェクト: rehman922/VIRETAIL
 public static void DoPrint(string purid,decimal totalsale,decimal totalcost,decimal profit)
 {
     var dm = new PurInvDataManager();
     decimal pp = 0;
     if(totalcost > 0)
         pp = ((totalsale - totalcost) / totalsale) * 100;
     else
     {
         if (profit > 0)
             pp = 100;
     }
     var rpt = new PurchaseRpt { Company = Utils.Companyname, Header = "Purchase Invocie", Docno = purid, TotalSale = totalsale, TotalCost = totalcost, Profit = profit, ProfitPer = pp };
     var ds = dm.RptPurchaseInv(purid, Utils.Company);
     rpt.DataSource = ds;
     var printTool = new ReportPrintTool(rpt);
     printTool.ShowPreview();
 }