private void GetAdminDetailsByID(int ID) { try { AdminViewModel _adminViewModel = new AdminViewModel(); AdminModel _adminModel = new AdminModel(); _adminModel = _adminViewModel.GetAdminDetails(ID); txtFullName.Value = _adminModel.AdminFullName; txtMobileNo.Value = _adminModel.AdminMobNo; ddVenueDetails.SelectedValue = _adminModel.VenueID; txtUserName.Value = _adminModel.AdminUserName; txtEmailID.Value = _adminModel.AdminEmailID; ddUserType.SelectedValue = _adminModel.UserType; } catch (Exception ex) { ErrHandler.WriteError(ex.Message); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", "javascript:alert('Server is busy.Please try after sometime.');", true); } }
private void GetAdminList(string SearchBy) { try { AdminViewModel _adminViewModel = new AdminViewModel(); List<AdminModel> _adminModel = new List<AdminModel>(); _adminModel = _adminViewModel.GetAdminDetails(SearchBy, 0); gvAdminList.DataSource = _adminModel; gvAdminList.DataBind(); } catch (Exception ex) { throw ex; } }