Esempio n. 1
0
 public void loadUserType()
 {
     try
     {
         DataTable dtUserType = new DataTable();
         dtUserType                = _objUserType.GetUserTypes();
         cmbUserType.DataSource    = dtUserType;
         cmbUserType.ValueMember   = "UserTypeId";
         cmbUserType.DisplayMember = "UserType";
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 2
0
 private void bindUserType()
 {
     try
     {
         DataTable dtUserType = _userTypeRepo.GetUserTypes();
         if (dtUserType != null)
         {
             cmbUserType.DataSource    = dtUserType;
             cmbUserType.ValueMember   = "UserTypeId";
             cmbUserType.DisplayMember = "UserType";
         }
     }
     catch (Exception ex)
     {
         _errorLogs.LogErrors("frmRegistration", "bindUserType", ex.Message);
     }
 }
Esempio n. 3
0
        public void loadDropDown()
        {
            DataTable dtUserType = new DataTable();

            try
            {
                dtUserType = _objUserType.GetUserTypes();
                DataRow dr = dtUserType.NewRow();
                dr["UserType"]   = "SELECT(Display ALL)";
                dr["UserTypeId"] = 0;
                dtUserType.Rows.InsertAt(dr, 0);
                if (dtUserType != null)
                {
                    cbUserType.DataSource    = dtUserType;
                    cbUserType.ValueMember   = "UserTypeId";
                    cbUserType.DisplayMember = "UserType";
                }
            }
            catch (Exception)
            {
                throw;
            }
        }