예제 #1
0
        protected void GetUserGroupList()
        {
            UserGroupBLL userGroup = new UserGroupBLL();

            try
            {
                DataTable dt = userGroup.GetUserGroupList();
                userGroupListGridView.DataSource = dt;
                userGroupListGridView.DataBind();

                if (dt.Rows.Count < 1)
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "User Group List Data Not Found!!!"; msgDetailLabel.Text = "";
                    msgbox.Attributes.Add("class", "alert alert-warning");
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
            finally
            {
                userGroup = null;
            }
        }
예제 #2
0
        protected void GetUserGroupList()
        {
            UserGroupBLL userGroup = new UserGroupBLL();

            try
            {
                DataTable dt = userGroup.GetUserGroupList();
                userGroupListGridView.DataSource = dt;
                userGroupListGridView.DataBind();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (dt.Rows[i]["UserGroupName"].ToString() == "Super Admin")
                    {
                        LinkButton editLinkButton = (LinkButton)userGroupListGridView.Rows[i].FindControl("editLinkButton");
                        LinkButton activateLinkButton = (LinkButton)userGroupListGridView.Rows[i].FindControl("activateLinkButton");
                        LinkButton deactivateLinkButton = (LinkButton)userGroupListGridView.Rows[i].FindControl("deactivateLinkButton");
                        LinkButton deleteLinkButton = (LinkButton)userGroupListGridView.Rows[i].FindControl("deleteLinkButton");
                        editLinkButton.Visible = false;
                        activateLinkButton.Visible = false;
                        deactivateLinkButton.Visible = false;
                        deleteLinkButton.Visible = false;

                        break;
                    }
                }

                if (userGroupListGridView.Rows.Count > 0)
                {
                    userGroupListGridView.UseAccessibleHeader = true;
                    userGroupListGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "User Group List Data Not Found!!!"; msgDetailLabel.Text = "";
                    msgbox.Attributes.Add("class", "alert alert-warning");
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
            finally
            {
                userGroup = null;
            }
        }