public DepartmentTreeHelper() { UserInfo user = (UserInfo)HttpContext.Current.Session["user"]; DataSet ds = UserInfoManage.getTree(user.companyId.ToString()); if (ds == null || ds.Tables[0].Rows.Count == 0) { return; } Dt = ds.Tables[0]; InitTree(ds.Tables[0]); }
private string getTree() { DataSet ds = UserInfoManage.getTree(GetUserInfo().companyId.ToString()); if (ds == null) { return("F"); } DepartmentTreeHelper tree = new DepartmentTreeHelper(ds.Tables[0]); string json = tree.GetJson(); return(json); }
private void InitUserTree() { DataSet ds = UserInfoManage.getTree(GetUserInfo().companyId.ToString()); string json = ""; UserTreeHelper users; if (ds != null && ds.Tables[0].Rows.Count > 0) { users = new UserTreeHelper(ds.Tables[0], true); json = users.GetJson(); } Response.Write(json); }
private string getDepartmentTree() { UserInfo user = (UserInfo)Session["user"]; DataSet ds = UserInfoManage.getTree(user.companyId.ToString()); if (ds == null) { return("F"); } DepartmentTreeHelper tree = new DepartmentTreeHelper(ds.Tables[0]); string json = tree.GetJson(); return(json); }
private string InitUserTree() { DataSet ds = UserInfoManage.getTree(GetUserInfo().companyId.ToString()); string json = ""; UserTreeHelper users; if (ds != null && ds.Tables[0].Rows.Count > 0) { users = new UserTreeHelper(ds.Tables[0]); json = users.GetJson(); } return(json); }