//获取数据 public ActionResult GetDataList(string sw) { ITC_Userinfo busr = new ITC_Userinfo(); var pageIndex = Common.GetPageIndex(); var pageSize = Common.GetPageSize(); var total = 0; List <ITC_Organization_M> list_mo = uifo.GetList(sw, pageIndex, pageSize, out total); var list = from f in list_mo select new { f.Orga_ID, f.Organization_address, Organization_Ceo = busr.GetUserName(f.Organization_Ceo), Organization_createdtime = f.Organization_createdtime.ToString("g"), f.Organization_DeptCode, f.Organization_Fax, f.Organization_FullName, f.Organization_Mobil, f.Organization_Name, f.Organization_Oprt, f.Organization_Order, Organization_PanelName = uifo.GetOrgaName(f.Organization_ParentID), f.Organization_Remark, Organization_Status = Common.GetStatus(f.Organization_Status), f.Organization_Tel, f.Organization_Zip, }; var page = new PageViewModel { rows = list, total = total }; return(Json(page, JsonRequestBehavior.DenyGet)); }
/// <summary> /// 初始化组织缓存数据 /// </summary> public static List <ITC_Organization_M> InitCache() { ITC_Organization bll = new ITC_Organization(); List <ITC_Organization_M> list = bll.GetList("Organization_Status=0"); CacheHelper.Set(CacheKeys.Orgas.ToString(), list); return(list); }