public void ShowScope() { Sys_DepartmentBLL depbll = new Sys_DepartmentBLL(); Sys_Notice sn = snBll.Get(p => p.NoticeID == hid_Id.Value); string val = sn.Notice_Scope; if (val != null) { hid_DepId.Value = val; string str = ""; string[] spl = val.Split(','); foreach (string item in spl) { Sys_Department depmode = depbll.Get(p => p.Department_Code == item); if (depmode != null) { str += depmode.Department_Name + ","; } } if (!str.IsNullOrEmpty()) { str = str.Substring(0, str.Length - 1); } UCDepartmentTreeText1.Text = str; } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Request.ContentEncoding = Encoding.GetEncoding("UTF-8"); StringBuilder sb = new StringBuilder(); string parentId = string.Empty; if (!string.IsNullOrEmpty(context.Request.QueryString["id"])) { parentId = context.Request.QueryString["id"]; } if (!string.IsNullOrEmpty(parentId)) { Sys_UserInfo entity = bll.Get(p => p.UserInfoID == parentId); if (entity != null) { string post = ""; string postN = ""; string name = entity.UserInfo_FullName; string ment = entity.UserInfo_DepCode; Sys_DepartmentBLL mentsbll = new Sys_DepartmentBLL(); Sys_Department ments = mentsbll.Get(p => p.Department_Code == ment); post = entity.UserInfo_Post; Sys_Post po = pobll.Get(p => p.PostID == post); if (po != null) { postN = po.Post_Name; } string mentss = ments.Department_Name; var Data = new { name = name, mentss = mentss, post = post, postN = postN }; string jsonPerson = JsonConvert.SerializeObject(Data); context.Response.Write(jsonPerson); } } else { context.Response.Write("{\"data\":\"error\"}"); } }
/// <summary> /// / /// </summary> public void show() { Sys_DepartmentBLL depbll = new Sys_DepartmentBLL(); if (!string.IsNullOrEmpty(id)) { Sys_PostBLL bllPost = new Sys_PostBLL(); modelGwxx = bllPost.Get(p => p.PostID == id); if (modelGwxx != null) { this.txtGwName.Text = modelGwxx.Post_Name; this.txtpx.Text = modelGwxx.Post_Sort.ToString(); depmodel = depbll.Get(p => p.Department_Code == modelGwxx.Post_DepCode); if (depmodel != null) { this.txt_depName.Text = depmodel.Department_Name; } } } else { if (!string.IsNullOrEmpty(hid_DepCode)) { depmodel = depbll.Get(p => p.Department_Code == hid_DepCode); if (depmodel != null) { this.txt_depName.Text = depmodel.Department_Name; } } else { depmodel = depbll.Get(p => p.Department_Code == "001"); if (depmodel != null) { this.txt_depName.Text = depmodel.Department_Name; } } } }