public void loadUserType() { try { DataTable dtUserType = new DataTable(); dtUserType = _objUserType.GetUserTypes(); cmbUserType.DataSource = dtUserType; cmbUserType.ValueMember = "UserTypeId"; cmbUserType.DisplayMember = "UserType"; } catch (Exception) { throw; } }
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); } }
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; } }