Ejemplo n.º 1
0
 public void BindRole()
 {
     try
     {
         RoleBl objRoleBL = new RoleBl();
         var    objResult = objRoleBL.Role_SelectAll();
         if (objResult != null)
         {
             gvRole.DataSource = objResult.ResultDt;
             gvRole.DataBind();
             if (gvRole.Rows.Count > 0)
             {
                 PanelVisibilityMode(1);
             }
             else
             {
                 PanelVisibilityMode(2);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 public void BindRole()
 {
     try
     {
         RoleBl   objRoleBl   = new RoleBl();
         Controls objControls = new Controls();
         var      objResult   = objRoleBl.Role_SelectAll();
         if (objResult != null)
         {
             if (objResult.ResultDt.Rows.Count > 0)
             {
                 objControls.BindDropDown_ListBox(objResult.ResultDt, ddlRole, "Name", "Id");
             }
             ddlRole.Items.Insert(0, new ListItem("--Select--", "-1"));
         }
     }
     catch (Exception ex)
     {
         log.Error("Error", ex);
         ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
     }
 }