コード例 #1
0
ファイル: ReportPrint.cs プロジェクト: zanderphh/candao-pos
        /// <summary>
        /// 打印客用单
        /// </summary>
        public static void PrintPayBill3(String billno, String printuser)
        {
            //
            JArray jrOrder = null;
            JArray jrList  = null;
            JArray jrJS    = null;

            try
            {
                if (!RestClient.getOrderInfo(printuser, billno, 3, out jrOrder, out jrList, out jrJS))
                {
                    return;
                }
            }
            catch { }
            DataTable dtOrder = null;
            DataTable dtList  = null;
            DataTable dtJs    = null;

            dtOrder = Models.Bill_Order.getOrder(jrOrder);
            //dtList = Models.Bill_Order.getOrder_List(jrList);
            dtList = PrintDataHelper.GetOrderListDb(jrList);
            dtJs   = Models.Bill_Order.getOrder_Js(jrJS);
            rptReport.Clear();
            string file = Application.StartupPath + @"\Reports\rptBill3.frx";

            rptReport.Load(file);//加载报表模板文件
            DataSet ds = new DataSet();

            ds.Tables.Add(dtOrder);
            ds.Tables.Add(dtList);
            ds.Tables.Add(dtJs);
            InitializeReport(ds, ref rptReport, dtList.TableName);
            PrintRpt(rptReport, 1);
        }
コード例 #2
0
ファイル: ReportPrint.cs プロジェクト: zanderphh/candao-pos
        /// <summary>
        /// 打印预结单2
        /// </summary>
        public static void PrintPayBill(String billno, String printuser, DataTable yhList, ReportAmount ra)
        {
            //
            ramount = ra;
            JArray jrOrder = null;
            JArray jrList  = null;
            JArray jrJS    = null;

            try
            {
                if (!RestClient.getOrderInfo(Globals.UserInfo.UserName, Globals.CurrOrderInfo.orderid, 1, out jrOrder, out jrList, out jrJS))
                {
                    return;
                }
            }
            catch { }
            DataTable dtOrder = null;
            DataTable dtList  = null;
            DataTable dtJs    = null;
            DataTable yh      = new DataTable();

            yh      = yhList.Copy();
            dtOrder = Bill_Order.getOrder(jrOrder);
            //dtList = Bill_Order.getOrder_List(jrList);
            dtList = PrintDataHelper.GetOrderListDb(jrList);
            dtJs   = Bill_Order.getOrder_Js(jrJS);
            DataTable dtSettlementDetail = Bill_Order.GetSettlementDetailTable(GetPresettlementDetailList((JObject)jrOrder[0], ra));

            rptReport.Clear();
            string file = Application.StartupPath + @"\Reports\rptBill.frx";

            rptReport.Load(file);//加载报表模板文件
            DataSet ds = new DataSet();

            ds.Tables.Add(dtOrder);
            ds.Tables.Add(dtList);
            ds.Tables.Add(dtJs);
            ds.Tables.Add(yh);
            ds.Tables.Add(dtSettlementDetail);
            InitializeReport(ds, ref rptReport, dtList.TableName);
            PrintRpt(rptReport, 1);
        }