public JsonResult getData(int idStream, int indexPage, string sortQuery, int pageSize) { WF_STEPBusiness = Get <WF_STEPBusiness>(); var searchModel = SessionManager.GetValue("wfstepSearchModel") as WF_STEP_SEARCHBO; if (!string.IsNullOrEmpty(sortQuery)) { if (searchModel == null) { searchModel = new WF_STEP_SEARCHBO(); } searchModel.sortQuery = sortQuery; if (pageSize > 0) { searchModel.pageSize = pageSize; } SessionManager.SetValue("wfstepSearchModel", searchModel); } var data = WF_STEPBusiness.GetDaTaByPage(idStream, searchModel, indexPage, pageSize); foreach (var item in data.ListItem) { if (!string.IsNullOrEmpty(item.ICON)) { item.ICON = Path.Combine(HostUpload, item.ICON); } } return(Json(data)); }
/// <summary> /// Danh sách bước chuyển trạng thái theo luồng xử lý /// </summary> /// <returns></returns> public ActionResult Index(int id) { var model = new IndexVM(); WF_STEPBusiness = Get <WF_STEPBusiness>(); var WF_STREAMBusiness = Get <WF_STREAMBusiness>(); var searchmodel = new WF_STEP_SEARCHBO(); SessionManager.SetValue("wfstepSearchModel", null); model.LuongXuLy = WF_STREAMBusiness.Find(id); model.LstStep = WF_STEPBusiness.GetDaTaByPage(id, null); foreach (var item in model.LstStep.ListItem) { if (!string.IsNullOrEmpty(item.ICON)) { item.ICON = Path.Combine(HostUpload, item.ICON); } } model.GoData = WF_STEPBusiness.GetDataByStream(id); return(View(model)); }
public JsonResult searchData(FormCollection form) { WF_STEPBusiness = Get <WF_STEPBusiness>(); var searchModel = SessionManager.GetValue("wfstepSearchModel") as WF_STEP_SEARCHBO; if (searchModel == null) { searchModel = new WF_STEP_SEARCHBO(); searchModel.pageSize = 20; } var idStream = form["QR_WF_ID"].ToIntOrZero(); searchModel.QR_STATE_BEGIN = form["QR_STATE_BEGIN"].ToIntOrZero(); searchModel.QR_STATE_END = form["QR_STATE_END"].ToIntOrZero(); searchModel.QR_IS_RETURN = form["QR_IS_RETURN"].ToBoolByOnOff(); searchModel.QR_NAME = form["QR_NAME"].ToString(); searchModel.QR_GHICHU = form["QR_GHICHU"].ToString(); SessionManager.SetValue("wfstepSearchModel", searchModel); var data = WF_STEPBusiness.GetDaTaByPage(idStream, searchModel, 1, searchModel.pageSize); return(Json(data)); }