private SendGoodOrders <Dictionary <string, object> > GetDataList(SendGoodOrderQuery query) { this.setting = SettingsManager.GetMasterSettings(); SendGoodOrders <Dictionary <string, object> > sendGoodOrders = new SendGoodOrders <Dictionary <string, object> >(); if (query != null) { DbQueryResult storeSendGoodOrders = StoresHelper.GetStoreSendGoodOrders(query); List <Dictionary <string, object> > list = DataHelper.DataTableToDictionary(storeSendGoodOrders.Data); foreach (Dictionary <string, object> item in list) { OrderInfo orderInfo = OrderHelper.GetOrderInfo(item["OrderId"].ToString()); Dictionary <string, object> dictionary = item; DateTime dateTime = orderInfo.ShippingDate; dictionary.Add("ShippingDateStr", dateTime.ToString("yyyy-MM-dd HH:mm:ss")); Dictionary <string, object> dictionary2 = item; dateTime = orderInfo.OrderDate; dictionary2.Add("OrderDateStr", dateTime.ToString("yyyy-MM-dd HH:mm:ss")); item.Add("OrderTotalStr", orderInfo.GetPayTotal()); item.Add("OrderProfitStr", orderInfo.GetProfit()); } decimal orderSummaryTotal = default(decimal); decimal orderSummaryProfit = default(decimal); StoresHelper.GetStoreSendGoodTotalAmount(query, out orderSummaryTotal, out orderSummaryProfit); sendGoodOrders.OrderSummaryTotal = orderSummaryTotal; sendGoodOrders.OrderSummaryProfit = orderSummaryProfit; sendGoodOrders.rows = list; sendGoodOrders.total = storeSendGoodOrders.TotalRecords; } return(sendGoodOrders); }
private void GetList(HttpContext context) { SendGoodOrderQuery query = this.getQuery(context); SendGoodOrders <Dictionary <string, object> > dataList = this.GetDataList(query); string s = base.SerializeObjectToJson(dataList); context.Response.Write(s); context.Response.End(); }