protected void Page_Load(object sender, EventArgs e)
    {
        oRoleAction = new DL_WEB.DAL.Master.RoleAction();
        RoleID      = Request.Params.GetValues("RoleID") != null?Convert.ToInt32(Request.Params.GetValues("RoleID")[0]) : 0;

        if (RoleID != 0)
        {
            RadTree1.DataFieldID       = "ActionID";
            RadTree1.DataFieldParentID = "ParentID";
            RadTree1.DataSource        = oRoleAction.LoadRoleActionsByRoleID(RoleID);
            RadTree1.DataBind();
        }
        else
        {
            Response.Redirect("Roles.aspx");
        }
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        FFN = Request["FFN"];
        FFC = Request["FFC"];
        string       BaseID = Request["BaseID"];
        IBaseBOLTree BOLClass;

        BOLClass = Tools.GetBOLClassTree(BaseID);
        DataTable dt = BOLClass.GetDataSource(null, "Code", 10000, 1);
        DataView  dv = dt.DefaultView;

        if (BaseID == "UserNewsArchiveGroups")
        {
            dv.RowFilter = " UserCode =" + Convert.ToInt32(Session["UserCode"]);
        }

        RadTree1.DataTextField     = "Name";
        RadTree1.DataFieldID       = "Code";
        RadTree1.DataFieldParentID = "MasterCode";
        RadTree1.DataValueField    = "Code";

        RadTree1.DataSource = dv.Table;
        RadTree1.DataBind();
    }