//获取数据 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> /// <param name="code"></param> /// <returns></returns> public static string GetNameByDB(string id) { ITC_Organization bll = new ITC_Organization(); return(bll.GetOrgaName(id)); }