public ActionResult GetRussiaCityPagerDateList(string search, int offset, int limit, string order, string sort) { var btdata = new BootstrapTableData <SysRussiaCity>(); var where = string.Empty; if (!string.IsNullOrEmpty(search)) { where = string.Format(@" and [CityName] Like '%{0}%'", search); } btdata.total = RussiaCityService.Current.GetPagerCount(where); btdata.rows = RussiaCityService.Current.GetPagerDataList(where, offset, limit, order, sort); return(Json(btdata, JsonRequestBehavior.AllowGet)); }
public ActionResult GetLogisticsPagerList(string search, int offset, int limit, string order, string sort) { var btdata = new BootstrapTableData <SysLogisticsInfo>(); var where = string.Empty; if (!string.IsNullOrEmpty(search)) { where = string.Format(@" and [LogisticsSingle] Like '%{0}%'", search); } btdata.total = LogisticsService.Current.GetLogisticsPagerCount(where); btdata.rows = LogisticsService.Current.GetLogisticsPagerData(where, offset, limit, order, sort); return(Json(btdata, JsonRequestBehavior.AllowGet)); }
public ActionResult GetUserPagerList(string search, int offset, int limit, string order, string sort) { var provider = new UserLoginProvider(); var btdata = new BootstrapTableData <SysUser>(); var where = string.Empty; if (!string.IsNullOrEmpty(search)) { where = string.Format(@" and [CityName] Like '%{0}%'", search); } btdata.total = provider.GetPagerCount(where); btdata.rows = provider.GetPagerDataList(where, offset, limit, order, sort); return(Json(btdata, JsonRequestBehavior.AllowGet)); }
public ActionResult GetAgentPagerList(string search, int offset, int limit, string order, string sort) { var count = 0; var btdata = new BootstrapTableData <SysAgentInfo>(); var where = string.Empty; if (!string.IsNullOrEmpty(search)) { where = string.Format(@" and [CityName] Like '%{0}%'", search); } btdata.rows = UserService.GetAgentPagerData(where, offset, limit, order, sort, out count); btdata.total = count; return(Json(btdata, JsonRequestBehavior.AllowGet)); }
public ActionResult GetOrderViewPagerData(string type, string orderstatus, string search, int offset, int limit, string order, string sort) { var where = string.Empty; var userprovider = new UserLoginProvider(); var _user = userprovider.GetUser(User.Identity.Name); if (_user != null) { if (_user.RuleType.Equals(RuleTypeEnum.Agents.ToString())) { var cityid = UserService.GetAgentInfoByUserId(_user.Id).AgentCityId; where += " and [RussiaCityId]=" + cityid; } else if (_user.RuleType.Equals(RuleTypeEnum.Customer.ToString())) { where += " and [UserId]=" + _user.Id; } } var btdata = new BootstrapTableData <OrderView>(); var provider = new OrderInfoProvider(); if (!string.IsNullOrEmpty(search)) { where += string.Format(@" and [OrderNo] Like '%{0}%'", search); } if (!string.IsNullOrEmpty(orderstatus)) { int status = Convert.ToInt32(orderstatus); if (status > 2 && status <= 6) { where += string.Format(@" and [PayStatus]={0}", status - 3); } else { where += string.Format(@" and [Status]={0}", orderstatus); } } btdata.total = provider.GetOrderViewPagerCount(where); btdata.rows = provider.GetOrderViewPagerList(where, offset, limit, order, sort); return(Json(btdata, JsonRequestBehavior.AllowGet)); }