public ActionResult GetReturnExchangeList() { if (!AppData.IsManagerLogin) { return(Json(new { success = false, msg = "您未登录后台或会话已过期" })); } if (PrivilegeBLL.HasNotPrivilege(AppData.SessionUserID, 13)) { return(Json(new { success = false, msg = "您没有执行该操作的权限" })); } Validation validation = new Validation(); int page = validation.GetInt("page", defaultValue: 1); int pageSize = validation.GetInt("pageSize", defaultValue: 10); string orderCode = validation.Get("orderCode"); string userName = validation.Get("userName"); DateTime dtFrom = validation.GetDateTime("dtFrom"); DateTime dtTo = validation.GetDateTime("dtTo"); DateTime?addTimeFrom = dtFrom == DateTime.MinValue ? null : (DateTime?)dtFrom; DateTime?addTimeTo = dtFrom == DateTime.MinValue ? null : (DateTime?)dtTo; ExchangeBLL exchangeBLL = new ExchangeBLL(); int total; var data = exchangeBLL.GetExchange(page, pageSize, out total, orderCode: orderCode, userName: userName, addTimeFrom: addTimeFrom, addTimeTo: addTimeTo); return(Json(new { success = true, data = data, total = total })); }
public ActionResult GetExchange(int page, int pageSize) { UserObj user = AppData.SessionUser; if (user == null) { return(Json(new { success = false, msg = "您还未登录" })); } ExchangeBLL exchangeBLL = new ExchangeBLL(); int total; var data = exchangeBLL.GetExchange(page, pageSize, out total, user.UserID); return(Json(new { success = true, total = total, data = data })); }