private void BindProducts() { ManagerInfo currentManager = ManagerHelper.GetCurrentManager(); this.LoadParameters(); DeliveryMemberQuery entity = new DeliveryMemberQuery { UserName = this.txtUserName.Text, StartDate = this.startDate, EndDate = this.endDate, PageSize = this.pager.PageSize, PageIndex = this.pager.PageIndex, SortOrder = SortAction.Desc, SortBy = "AddTime", StoreId = currentManager.ClientUserId }; Globals.EntityCoding(entity, true); DbQueryResult memberList = StoreHelper.GetDeliveryMemberList(entity); this.grdDeliveryMembers.DataSource = memberList.Data; this.grdDeliveryMembers.DataBind(); this.txtUserName.Text = entity.UserName; this.pager1.TotalRecords = (this.pager.TotalRecords = memberList.TotalRecords); }
/// <summary> /// 门店商品列表 /// </summary> /// <param name="query"></param> /// <returns></returns> public DbQueryResult GetDeliveryMemberList(DeliveryMemberQuery query) { StringBuilder builder = new StringBuilder(); builder.Append(" 1=1 "); if (query.StartDate.HasValue) { builder.AppendFormat(" AND AddTime >='{0}'", DataHelper.GetSafeDateTimeFormat(query.StartDate.Value)); } if (query.EndDate.HasValue) { builder.AppendFormat(" AND AddTime <='{0}'", DataHelper.GetSafeDateTimeFormat(query.EndDate.Value)); } if (!string.IsNullOrEmpty(query.UserName)) { builder.AppendFormat(" AND UserName = '******' ", query.UserName); } if (query.StoreId > 0) { builder.AppendFormat(" AND StoreId = '{0}' ", query.StoreId); } string selectFields = "*"; return(DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "Store_DeliveryMember", "DeliveryUserId", builder.ToString(), selectFields)); }
public static DbQueryResult GetDeliveryMemberList(DeliveryMemberQuery query) { return(new StoreDao().GetDeliveryMemberList(query)); }