Пример #1
0
    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]);
    }
Пример #2
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);
    }
Пример #3
0
    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);
    }
Пример #4
0
    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);
    }
Пример #5
0
    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);
    }