private void BindProducts() { this.LoadParameters(); DeliveryOrderQuery entity = new DeliveryOrderQuery { OrderId = this.OrderId, DeliveryUserId = this.DDLDeliveryMember.SelectedValue.ToInt(), StartDate = this.startDate, EndDate = this.endDate, PageSize = this.pager.PageSize, PageIndex = this.pager.PageIndex, SortOrder = SortAction.Desc, SortBy = "DO.AddTime", StoreId = StoreId, State = this.DDLDeliveryState.SelectedValue.ToInt(), }; Globals.EntityCoding(entity, true); DbQueryResult orderList = StoreHelper.GetDeliveryOrderList(entity); this.grdDeliveryOrders.DataSource = orderList.Data; this.grdDeliveryOrders.DataBind(); this.pager1.TotalRecords = (this.pager.TotalRecords = orderList.TotalRecords); }
public DbQueryResult GetDeliveryOrderList(DeliveryOrderQuery query) { StringBuilder builder = new StringBuilder(); builder.Append(" 1=1 "); if (query.StartDate.HasValue) { builder.AppendFormat(" AND DO.AddTime >='{0}'", DataHelper.GetSafeDateTimeFormat(query.StartDate.Value)); } if (query.EndDate.HasValue) { builder.AppendFormat(" AND DO.AddTime <='{0}'", DataHelper.GetSafeDateTimeFormat(query.EndDate.Value)); } if (!string.IsNullOrEmpty(query.OrderId)) { builder.AppendFormat(" AND DO.OrderId = '{0}' ", query.OrderId); } if (query.DeliveryUserId > 0) { builder.AppendFormat(" AND DO.DeliveryUserId = '{0}' ", query.DeliveryUserId); } if (query.State > -1) { builder.AppendFormat(" AND DO.[State] = '{0}' ", query.State); } if (query.StoreId > 0) { builder.AppendFormat(" AND DO.[StoreId] = {0} ", query.StoreId); } string selectFields = "DO.*,DM.UserName,DM.Phone"; return(DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "Store_DeliveryOrder DO left join Store_DeliveryMember DM on do.DeliveryUserId = DM.DeliveryUserId", "DeliveryOrderId", builder.ToString(), selectFields)); }
public bool VerifyDelivery(int deliveryNumber) { //Old "sp_Delivery_Verify" var query = new DeliveryOrderQuery() { DocNum = deliveryNumber, Username = _identity.Name }; return(_repo.VerifyDelivery(query)); }
public bool VerifyDelivery(DeliveryOrderQuery query) { return(_sqlMapperFactory.InventoryMasterMapper.VerifyDelivery(query)); }
public Delivery GetDelivery(DeliveryOrderQuery deliveryNumber) { return(_sqlMapperFactory.InventoryMasterMapper.GetDelivery(deliveryNumber)); }
public static DbQueryResult GetDeliveryOrderList(DeliveryOrderQuery query) { return(new StoreDao().GetDeliveryOrderList(query)); }
public bool ReturnDelivery(DeliveryOrderQuery query) { return(_sqlMapper.Update(query.IsInternal ? "ReturnDeliveryIR" : "ReturnDelivery", query) > 0); }
public bool VerifyDelivery(DeliveryOrderQuery query) { return(_sqlMapper.Update(query.IsInternal ?"UpdateVerifiedOrderIR": "UpdateVerifiedOrder", query) > 0); }
public Delivery GetDelivery(DeliveryOrderQuery deliveryNumber) { return(_sqlMapper.QueryForObject <Delivery>(deliveryNumber.IsInternal ? SELECT_INTERNAL_DELIVERY_BY_DELIVERY_NUMBER : SELECT_DELIVERY_BY_DELIVERY_NUMBER, deliveryNumber)); }