Exemplo n.º 1
0
        public static System.Data.DataTable LoadReportDetailList(string orderId, out int recordCount, ref object footer)
        {
            recordCount = 0;
            var     dal = new Pharos.Logic.DAL.OrderDAL();
            var     dt = dal.LoadReportDetailList(orderId, CommonService.CompanyId);
            decimal total = 0, nums = 0;

            foreach (System.Data.DataRow dr in dt.Rows)
            {
                total += Convert.ToDecimal(dr["Subtotal"]);
                nums  += Convert.ToDecimal(dr["IndentNum"]);
            }
            footer = new List <object>()
            {
                new { Subtotal = total, IndentNum = nums, Price = "合计:" }
            };
            return(dt);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 用于修改回显列表
        /// </summary>
        /// <param name="orderId">订单ID</param>
        /// <param name="recordCount">返回记录数</param>
        /// <returns>list</returns>
        public static System.Data.DataTable LoadDetailList(string orderId, out int recordCount, ref object footer)
        {
            recordCount = 0;
            var     dal = new Pharos.Logic.DAL.OrderDAL();
            var     dt = dal.LoadDetailList(orderId, CommonService.CompanyId);
            decimal total = 0, nums = 0;

            foreach (System.Data.DataRow dr in dt.Rows)
            {
                dr["Detail"] = System.Web.HttpUtility.HtmlDecode(dr["Detail"].ToString());
                total       += Convert.ToDecimal(dr["Subtotal"]);
                nums        += Convert.ToDecimal(dr["IndentNum"]);
                if (!(dr["AssistBarcode"] is DBNull))
                {
                    dr["Barcode"] = dr["AssistBarcode"];
                }
            }
            footer = new List <object>()
            {
                new { Subtotal = total, IndentNum = nums, Price = "合计:" }
            };
            return(dt);
        }