Ejemplo n.º 1
0
        public static void fillDropDownItems(System.Web.UI.WebControls.DropDownList ddl,UserGroup _userGroupObj)
        {
            try
            {
                //if (Branch.dropDownItems.Count < 1)
                //{
                //    new BranchSelectDataByUser().getBranchDropDownItemsByUser(-1);
                //}

                UserGroup _u = new UserGroup();
                _u = _userGroupObj;
                new UserGroupSelect(_u).UserGroupDropDownList(_u._dropDownList);

                ddl.DataSource = _u._dropDownList;
                ddl.DataTextField = "Name";
                ddl.DataValueField = "Value";
                ddl.DataBind();

            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                ddl = null;
            }
        }
Ejemplo n.º 2
0
        public void fillListedUnitGroups(System.Web.UI.WebControls.ListBox lstbx)
        {
            UnitAndUnitGroupSelect _unitNGroup = new UnitAndUnitGroupSelect();
            UserGroup ug = new UserGroup();
            try
            {

                _unitNGroup.UserID = this._userID;
                _unitNGroup.ComID = this._comID;
                _unitNGroup.LoadListedUnitGroups(ug._dropDownList);

                lstbx.DataSource = ug._dropDownList;
                lstbx.DataTextField = "Name";
                lstbx.DataValueField = "Value";
                lstbx.DataBind();
            }
            catch (Exception ex)
            {
                ex.Message.ToString();
            }
            finally
            {
                _unitNGroup = null;
                ug = null;

            }
        }
Ejemplo n.º 3
0
 public NotListedGroupSelect(UserGroup _ugroup)
 {
     this.UsrGrp = _ugroup;
     Command = @"SELECT groupID,groupName FROM tblGroup WHERE groupID NOT IN" +
               @" (SELECT groupID FROM tblGroupWiseUnit WHERE unitID = :unitID)" +
               @" AND tblGroup.comID= :comID AND coalesce(isDelete,'0') != '1'" +
               @" ORDER BY groupName ASC;";
 }
Ejemplo n.º 4
0
 public UserGroupSelect(UserGroup _userGroup)
 {
     this._usergrouppObj = _userGroup;
     Command = "SELECT groupID,groupName FROM tblGroup WHERE coalesce(isDelete,'0') != '1'" +
               "AND groupName != 'Administrator' AND comID = :comID ORDER BY groupName ASC;";
 }
Ejemplo n.º 5
0
 public GroupListSelect(UserGroup _ugroup)
 {
     this.UsrGrp = _ugroup;
     Command = "SELECT groupID,groupName FROM tblGroup WHERE comID = :comID AND" +
        			  " coalesce(isDelete,'0') != '1' ORDER BY groupName ASC;";
 }
Ejemplo n.º 6
0
 public makeUpdateParam(UserGroup _userGroup)
 {
     this._userGroup = _userGroup;
     build();
 }
Ejemplo n.º 7
0
 public makeInsertParams(UserGroup _userGroup)
 {
     this._userGroup = _userGroup;
     build();
 }
        public static void fillNotListedGroupList(System.Web.UI.WebControls.ListBox LstBox, UserGroup _UsrGroup)
        {
            try
               {

               UserGroup _UG = new UserGroup();
               _UG = _UsrGroup;
               new NotListedGroupSelect(_UG).LoadNotListedGroupList(_UG._dropDownList);
               LstBox.DataSource = _UG._dropDownList;
               LstBox.DataTextField = "Name";
               LstBox.DataValueField = "Value";
               LstBox.DataBind();

               }
               catch (Exception ex)
               {
               throw ex;
               }
               finally
               {
               //LstBox = null;
               }
        }