Ejemplo n.º 1
0
        private DataSet QueryData(bool isDownLoad = false)
        {
            //判断是否已经设置了微留言基本信息
            this.page = MXRequest.GetQueryInt("page", 1);
            var result = gbll.GetOrderList(shopid, isDownLoad ? this.totalCount : this.pageSize, isDownLoad ? 1 : this.page, beginDate, endDate, payAmountMin,
                                           payAmountMax, orderNumber, customerName, customerTel, out this.totalCount);

            this.total.Value = totalCount.ToString();

            var sbll = new BLL.wx_diancai_dingdan_manage();

            if (result != null && result.Tables.Count > 0 && result.Tables[0].Rows.Count > 0)
            {
                DataRow dr;

                int count = result.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = result.Tables[0].Rows[i];

                    var orderId = Convert.ToInt32(dr["id"]);
                    var detail  = sbll.GetOrderCaipinDetail(orderId);
                    dr["Detail"]  = detail;
                    dr["OrderNo"] = i + 1;
                }

                result.AcceptChanges();
            }

            return(result);
        }