protected void InitializeRepeater()
 {
     int userid = Convert.ToInt32(Session["UserId"]);
     User user = new User();
     user = user.GetUser(userid);
     Module module = new Module();
     var list = module.GetModuleList(Convert.ToInt32(user.RoleId), "Report");
     repeaterReport.DataSource = list;
     repeaterReport.DataBind();
 }
 protected bool hasAccess(string modulename)
 {
     bool result = false;
     User user = new User();
     user = user.GetUser(Convert.ToInt32(HttpContext.Current.Session["UserId"]));
     Module module = new Module();
     var list = module.GetModuleList(Convert.ToInt32(user.RoleId),modulename);
     RolesModuleAccess moduleAccess = new RolesModuleAccess();
     if (list.Count > 0)
         result = true;
     return result;
 }
 protected bool HasAccess()
 {
     int userid = Convert.ToInt32(Session["UserId"]);
     bool result = false;
     User user = new User();
     user = user.GetUser(userid);
     Module module = new Module();
     var list = module.GetModuleList(Convert.ToInt32(user.RoleId), "Report");
     if (list.Count > 0)
         result = true;
     return result;
 }
        protected void InitializeModuleGrid(int roleId = 0)
        {
            Module module = new Module();
            var datalist = module.GetModuleList();

            gridViewModuleAccess.DataSource = datalist;
            gridViewModuleAccess.DataBind();
            if(roleId > 0)
                InitializeCheckBox(roleId);
            if (gridViewModuleAccess.Rows.Count > 1)
                modalChkboxAll.Visible = true;
            else
                modalChkboxAll.Visible = false;
        }