Esempio n. 1
0
        protected void LoadUserGroups()
        {
            UserGroupBLL userGroup = new UserGroupBLL();

            try
            {
                DataTable dt = userGroup.GetActiveUserGroupList();

                drpdownGroup.DataSource = dt;
                drpdownGroup.DataValueField = "UserGroupId";
                drpdownGroup.DataTextField = "UserGroupName";
                drpdownGroup.DataBind();
                drpdownGroup.Items.Insert(0, "----------Select----------");
                drpdownGroup.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message;
                msgbox.Attributes.Add("Class", "alert alert-warning");
            }
            finally
            {
                userGroup = null;
            }
        }
Esempio n. 2
0
        private void LoadUserGroups()
        {
            try
            {

                UserGroupBLL usergroupbll = new UserGroupBLL();
                DataTable dt = usergroupbll.GetActiveUserGroupList();
                drpdownGroup.DataTextField = "UserGroupName";
                drpdownGroup.DataValueField = "UserGroupId";
                drpdownGroup.DataSource = dt;
                drpdownGroup.DataBind();
                drpdownGroup.Items.Insert(0, "Select Group");
                drpdownGroup.SelectedIndex = 0;
                drpdownGroup.Items[0].Value = "";

            }
            catch (Exception ex)
            {

                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");

            }
        }
        protected void LoadUserGroups()
        {
            UserGroupBLL userGroup = new UserGroupBLL();

            try
            {
                DataTable dt = userGroup.GetActiveUserGroupList();

                userGroupDropDownList.DataSource = dt;
                userGroupDropDownList.DataValueField = "UserGroupId";
                userGroupDropDownList.DataTextField = "UserGroupName";
                userGroupDropDownList.DataBind();
                userGroupDropDownList.Items.Insert(0, "--Select Group--");
                userGroupDropDownList.SelectedIndex = 1;

                if (dt.Rows.Count < 1)
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "User Group 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;
            }
        }