public ActionResult Default(int?loginID) { BLL.Organize.Worker worker = new BLL.Organize.Worker(); ViewData["Login"] = worker.LoginCheck(User.Identity.Name.Split('|')[2]); BLL.Office.Office office = new BLL.Office.Office(); IList <TDictionary> listDic = office.GetAllInfoType(); foreach (TDictionary dic in listDic) { if (!string.IsNullOrEmpty(Request.QueryString["orgId"])) { this.ViewData[dic.编码] = office.GetOfficeByType(dic.编码, int.Parse(Request.QueryString["OrgId"])); //办公新闻 } else { //IStorehouse storehouse = ctx["Storehouse"] as IStorehouse; //List<B_ORGANIZATION> listUnit = storehouse.GetUnit((int)loginID); this.ViewData[dic.编码] = office.GetOfficeByTypeAndLogin(dic.编码, (int)loginID); } } return(View()); }
/// <summary> /// 获取所有办公类型 /// </summary> /// <returns></returns> public ActionResult OfficeType() { BLL.Office.Office office = new BLL.Office.Office(); var result = office.GetAllInfoType(); return(Json(result)); }