Exemplo n.º 1
0
    protected void dgdRoleList_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
    {
        string a;
        int    roleType;

        if ((a = base.Request["tp"]) != null)
        {
            if (a == "3")
            {
                roleType = 2;
                goto IL_3C;
            }
            if (a == "4")
            {
                roleType = 1;
                goto IL_3C;
            }
        }
        roleType = 3;
IL_3C:
        if (this.dgdRoleList.PageCount == 1)
        {
            this.dgdRoleList.CurrentPageIndex = 1;
        }
        if (this.dgdRoleList.CurrentPageIndex > this.dgdRoleList.PageCount && this.dgdRoleList.PageCount > 2)
        {
            this.dgdRoleList.CurrentPageIndex = this.dgdRoleList.PageCount - 1;
        }
        else
        {
            this.dgdRoleList.CurrentPageIndex = e.NewPageIndex;
        }
        this.dgdRoleList.DataSource = FlowRoleAction.QueryAllRole(roleType);
        this.dgdRoleList.DataBind();
    }
Exemplo n.º 2
0
    private void dgdRole_Bind()
    {
        DataTable dataSource = FlowRoleAction.QueryAllRole(this.RoleType);

        this.dgdRole.DataSource = dataSource;
        this.dgdRole.DataBind();
    }
Exemplo n.º 3
0
    private void dgdRoleList_Bind()
    {
        int roleType = System.Convert.ToInt32(this.ddlRoleType.SelectedValue);

        this.dgdRoleList.DataSource = FlowRoleAction.QueryAllRole(roleType);
        this.dgdRoleList.DataBind();
    }
Exemplo n.º 4
0
    private void TVRole_Create()
    {
        this.TVRole.Nodes.Clear();
        DataTable dataTable = FlowRoleAction.QueryAllRole();

        for (int i = 1; i < 4; i++)
        {
            TreeNode treeNode = new TreeNode();
            string   text     = "";
            switch (i)
            {
            case 1:
                text = "项目相关";
                break;

            case 2:
                text = "群组";
                break;

            case 3:
                text = "部门相关";
                break;
            }
            treeNode.Text  = text;
            treeNode.Value = i.ToString();
            this.TVRole.Nodes.Add(treeNode);
            DataRow[] array = dataTable.Select("RoleType=" + i.ToString());
            if (array.Length > 0)
            {
                for (int j = 0; j < array.Length; j++)
                {
                    DataRow  dataRow   = array[j];
                    TreeNode treeNode2 = new TreeNode();
                    treeNode2.Text  = dataRow["RoleName"].ToString();
                    treeNode2.Value = i.ToString() + j;
                    if (i == 1)
                    {
                        treeNode2.Value = "RoleProjectList.aspx?ri=" + dataRow["RoleID"].ToString();
                    }
                    else if (i == 2)
                    {
                        treeNode2.Value = "RoleUser.aspx?ri=" + dataRow["RoleID"].ToString();
                    }
                    else
                    {
                        treeNode2.Value = "RoleCorpUser.aspx?ri=" + dataRow["RoleID"].ToString();
                    }

                    treeNode.ChildNodes.Add(treeNode2);
                }
            }
        }
    }
Exemplo n.º 5
0
 private void dgdRoleList_Bind(int roleType)
 {
     base.Response.Cache.SetNoStore();
     this.dgdRoleList.DataSource = FlowRoleAction.QueryAllRole(roleType);
     this.dgdRoleList.DataBind();
 }