protected void RGGoodsOrder_NeedDataSource(object source, GridNeedDataSourceEventArgs e) { var pageIndex = RGGoodsOrder.CurrentPageIndex + 1; var pageSize = RGGoodsOrder.PageSize; int totalCount = 0; IList <GoodsOrderInfo> goodsOrderList = new List <GoodsOrderInfo>(); var authWarehouseList = WMSSao.GetWarehouseAuthDic(CurrentSession.Personnel.Get().PersonnelId); if (authWarehouseList != null && authWarehouseList.WarehouseDics != null && authWarehouseList.WarehouseDics.Count > 0) { var authWarehouseIds = authWarehouseList.WarehouseDics.Select(act => act.Key).ToList(); goodsOrderList = _goodsOrder.GetOrderList(authWarehouseIds, StartTime, EndTime, SearchGoods, SearchKey, new List <OrderState> { OrderState.RequirePurchase }, pageIndex, pageSize, out totalCount); } else { RAM.Alert("当前登录人没有授权仓库!"); } TextBoxDate.Text = CountRepeat(goodsOrderList); var expression = new GridSortExpression { FieldName = "OrderTime", SortOrder = GridSortOrder.Ascending }; RGGoodsOrder.MasterTableView.SortExpressions.AddSortExpression(expression); RGGoodsOrder.DataSource = goodsOrderList; RGGoodsOrder.VirtualItemCount = totalCount; if (goodsOrderList.Count > 0) { DicOrderClew = _operationLogManager.GetOperationLogList(goodsOrderList.Select(act => act.OrderId).ToList()); } }
protected void Page_Load(object sender, EventArgs e) { ApplyId = Request.QueryString["ID"]; HF_ApplyId.Value = ApplyId; var info = _refundsMoneySerivce.GetRefundsMoneyByID(new Guid(ApplyId)); if (info != null && info.ID != Guid.Empty) { var list = _operationLogManager.GetOperationLogList(new Guid(ApplyId)); RP_Clew.DataSource = list; RP_Clew.DataBind(); } }
protected void RgRefund_NeedDataSource(object source, GridNeedDataSourceEventArgs e) { DateTime startTime = StartTime == DateTime.MinValue ? DateTime.Now.AddMonths(-1) : StartTime; DateTime endTime = EndTime == DateTime.MinValue ? DateTime.Now : Convert.ToDateTime(EndTime.AddDays(1).ToString("yyyy-MM-dd 00:00:00")); var checkRefundList = _refundDal.GetCheckRefundInfo(SearchKey, startTime, endTime, int.Parse(SearchCheckState), new Guid(SelectedFilialeId)); //排除门店采购退回商品检查 modify by liangcanren at 2015-03-26 checkRefundList = checkRefundList.Where(act => act.SaleFilialeId != Guid.Empty && !string.IsNullOrEmpty(act.OrderNo)).ToList(); RGRefund.DataSource = checkRefundList; if (checkRefundList.Count > 0) { var pageIndex = RGRefund.CurrentPageIndex + 1; var pageSize = RGRefund.PageSize; var orderIdList = checkRefundList.Select(w => w.OrderId).ToList(); orderIdList = pageIndex == 1 ? orderIdList.Take(pageSize).ToList() : orderIdList.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); DicOrderClew = _operationLogManager.GetOperationLogList(orderIdList); } }
/// <summary> /// 绑定数据源 /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void RgShopRefundNeedDataSource(object source, GridNeedDataSourceEventArgs e) { DateTime startTime = StartTime == DateTime.MinValue ? DateTime.Now.AddMonths(-1) : StartTime; DateTime endTime = EndTime == DateTime.MinValue ? DateTime.Now : EndTime; var checkRefundList = _refundDal.GetShopCheckRefundList(SearchKey, startTime, endTime, int.Parse(SearchCheckState), new List <Guid>()); RgShopRefund.DataSource = checkRefundList; if (checkRefundList.Count > 0) { var pageIndex = RgShopRefund.CurrentPageIndex + 1; var pageSize = RgShopRefund.PageSize; var orderIdList = checkRefundList.Select(w => w.OrderId).ToList(); orderIdList = pageIndex == 1 ? orderIdList.Take(pageSize).ToList() : orderIdList.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); DicOrderClew = _operationLogManager.GetOperationLogList(orderIdList); } }
protected void Rgmgo_NeedDataSource(object source, GridNeedDataSourceEventArgs e) { IList <GoodsOrderInfo> goodsOrderList = new List <GoodsOrderInfo>(); long recordCount = 0; var pageIndex = RGMGO.CurrentPageIndex + 1; var pageSize = RGMGO.PageSize; if (IsPostBack) { if (!string.IsNullOrEmpty(RCB_Warehouse.SelectedValue)) { var time = RDP_EndTime.SelectedDate ?? DateTime.MinValue; var endTime = Convert.ToDateTime(time.AddDays(1).ToString("yyyy-MM-dd 00:00:00")); goodsOrderList = _goodsOrder.GetOrderList(StartTime, endTime, NonceOrderState, RTB_Search.Text, MemberIdOrConsignee, RTB_Mobil.Text.Trim(), RTB_RealName.Text.Trim(), new Guid(RCB_Warehouse.SelectedValue), RTB_ExpressNo.Text.Trim(), SaleFilialeId, SalePlatformId, GlobalConfig.KeepYear, pageIndex, pageSize, out recordCount); } else { RAM.Alert("请选择仓库!"); return; } } RGMGO.DataSource = goodsOrderList; RGMGO.VirtualItemCount = (int)recordCount; if (goodsOrderList.Count <= 0) { return; } var orderIdList = goodsOrderList.Select(w => w.OrderId).ToList(); if (orderIdList.Count > pageSize) { orderIdList = pageIndex == 1 ? orderIdList.Take(pageSize).ToList() : orderIdList.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); } DicOrderClew = _operationLogManager.GetOperationLogList(orderIdList); }