Пример #1
0
 private void CreateddlCategory()
 {
     Johnny.CMS.BLL.Access.PermissionCategory category = new Johnny.CMS.BLL.Access.PermissionCategory();
     ddlCategory.DataSource = category.GetList();
     ddlCategory.DataTextField = "PermissionCategoryName";
     ddlCategory.DataValueField = "PermissionCategoryId";
     ddlCategory.DataBind();
 }
Пример #2
0
 private void CreateddlCategory()
 {
     Johnny.CMS.BLL.Access.PermissionCategory category = new Johnny.CMS.BLL.Access.PermissionCategory();
     ddlCategory.DataSource     = category.GetList();
     ddlCategory.DataTextField  = "PermissionCategoryName";
     ddlCategory.DataValueField = "PermissionCategoryId";
     ddlCategory.DataBind();
 }
Пример #3
0
        public override void getData()
        {
            Johnny.CMS.BLL.Access.PermissionCategory category = new Johnny.CMS.BLL.Access.PermissionCategory();
            categoryList = category.GetList();

            Johnny.CMS.BLL.Access.Permission permission = new Johnny.CMS.BLL.Access.Permission();
            myManageGridView.DataSource = permission.GetList();
            myManageGridView.DataBind();
        }
Пример #4
0
        public override void getData()
        {
            Johnny.CMS.BLL.Access.PermissionCategory category = new Johnny.CMS.BLL.Access.PermissionCategory();
            categoryList = category.GetList();

            Johnny.CMS.BLL.Access.Permission permission = new Johnny.CMS.BLL.Access.Permission();
            myManageGridView.DataSource = permission.GetList();
            myManageGridView.DataBind();
        }
Пример #5
0
        //动态绑定权限列表
        private void CreatePermisssionList()
        {
            Johnny.CMS.BLL.Access.PermissionCategory        category      = new Johnny.CMS.BLL.Access.PermissionCategory();
            IList <Johnny.CMS.OM.Access.PermissionCategory> categoryModel = category.GetList();
            string hdnSeletedClientID = "";
            string hdnRightClientID   = "";

            foreach (Johnny.CMS.OM.Access.PermissionCategory item in categoryModel)
            {
                permissioncontrol permissionCtrl = (permissioncontrol)LoadControl("..\\usercontrol\\permissioncontrol.ascx");
                permissionCtrl.RoleId = DataConvert.GetInt32(ddlRoles.SelectedValue);
                permissionCtrl.PermissionCategoryId   = item.PermissionCategoryId;
                permissionCtrl.PermissionCategoryName = item.PermissionCategoryName;
                PlaceHolder1.Controls.Add(permissionCtrl);
                HtmlInputHidden hdnValue     = (HtmlInputHidden)permissionCtrl.FindControl("hdnSelected");
                HtmlSelect      hdnRightList = (HtmlSelect)permissionCtrl.FindControl("lstRight");
                hdnSeletedClientID = hdnSeletedClientID + hdnValue.ClientID + ",";
                hdnRightClientID   = hdnRightClientID + hdnRightList.ClientID + ",";
            }
            btnSave.Attributes.Add("onclick", "return Save('" + ddlRoles.ClientID + "','" + hdnSeletedClientID + "','" + hdnAllSelected.ClientID + "');");
            btnReset.Attributes.Add("onclick", "listClear('" + hdnRightClientID + "','" + hdnSeletedClientID + "','" + hdnAllSelected.ClientID + "');return false;");
        }
 public override void getData()
 {
     Johnny.CMS.BLL.Access.PermissionCategory bll = new Johnny.CMS.BLL.Access.PermissionCategory();
     myManageGridView.DataSource = bll.GetList();
     myManageGridView.DataBind();
 }