public virtual JsonFlexiGridData QueryWebApplicationList(SearchWebApplication view) { return webApplicationDao.QueryWebApplicationList(view); }
public JsonResult QueryWebApplicationList(FormCollection form) { //JsonFlexiGridData data = new JsonFlexiGridData(); //SearchWebApplication view = new SearchWebApplication(form); //data = BoFactory.GetVersionTrackBo.QueryWebApplicationList(view); //return Json(data); JsonFlexiGridData data = new JsonFlexiGridData(); JsonFlexiGridData ndata = new JsonFlexiGridData(); SearchWebApplication view = new SearchWebApplication(form); string uid = CurrentUser.UserUId; try { data = BoFactory.GetVersionTrackBo.QueryWebApplicationList(view); } catch (Exception ex) { Log4NetHelper.Error(ex); } if (!BoFactory.GetVersionTrackBo.IsSystemManager(uid)) { //非超级管理员,实行过滤 foreach (FlexiGridRow r in data.rows) { //加入用户创建的app var createId = r.cell[6];//创建者uid if (createId == uid) { ndata.rows.Add(r); continue; } //加入用户所属单位的app Dictionary<string, string> unitInfo = BoFactory.GetSMC_UserListBo.GetUnitByUL_UID(CurrentUser.UserUId); string unit = null; if (unitInfo.Count > 0) { unit = unitInfo.ElementAt(0).Value.ToString(); } if (unit == r.cell[11]) { ndata.rows.Add(r); continue; } } return Json(ndata); } else { return Json(data); } }