private void BindPrjTree() { string showType = string.Empty;//HttpContext.Current.Session["PmSet"].ToString(); if (!string.IsNullOrEmpty(base.Request["stime"])) { showType = "1"; } else { showType = HttpContext.Current.Session["PmSet"].ToString(); } string text = this.txtPjr.Text.Trim(); string pname = text; string value = string.Empty; if (this.dropYear.SelectedValue == "zzjg") { cn.justwin.Domain.EasyUI.Department department = new cn.justwin.Domain.EasyUI.Department(); IList <cn.justwin.Domain.EasyUI.Department> department2 = department.GetDepartment(10); value = JsonHelper.JsonSerializer <cn.justwin.Domain.EasyUI.Department[]>(department2.ToArray <cn.justwin.Domain.EasyUI.Department>()); } else { int year = Convert.ToInt32(this.dropYear.SelectedValue); IList <Project> onelevelPrj = ProjectTree2.GetOnelevelPrj(year, base.UserCode, showType, this.prjStatList, text, pname); value = JsonHelper.JsonSerializer <Project[]>(onelevelPrj.ToArray <Project>()); } this.hfldProjectJson.Value = value; }
protected void Page_Load(object sender, System.EventArgs e) { if (!base.IsPostBack) { cn.justwin.Domain.EasyUI.Department department = new cn.justwin.Domain.EasyUI.Department(); JsonSerializer jsonSerializer = new JsonSerializer(); this.hfldDepartJson.Value = jsonSerializer.Serialize <cn.justwin.Domain.EasyUI.Department[]>(department.GetDepartment(10).ToArray <cn.justwin.Domain.EasyUI.Department>()); } }