private void PopulateDropdownCountries() { DropdownCountries.ClearOptions(); _countries = DemoDataManager.GetInstance().Select_Countries(); for (int i = 0; i < _countries.Count; i++) { DropdownCountries.options.Add(new Dropdown.OptionData(_countries[i].ColumnCountryName.ColumnValue)); } }
private void PopulateDropdownUsers() { DropdownUsers.ClearOptions(); _users = DemoDataManager.GetInstance().Select_Users(); DropdownUsers.options.Add(new Dropdown.OptionData("Please Select")); for (int i = 0; i < _users.Count; i++) { DropdownUsers.options.Add(new Dropdown.OptionData($"{_users[i].ColumnFirstName.ColumnValue}/{_users[i].ColumnLastName.ColumnValue}/{_users[i].Country.ColumnCountryName.ColumnValue}")); } }
public void SaveUserData() { if (!string.IsNullOrEmpty(FieldFirstName.text) && !string.IsNullOrEmpty(FieldLastName.text) && SelectedCountry != null) { if (DemoDataManager.GetInstance().Insert_User(FieldFirstName.text, FieldLastName.text, SelectedCountry)) { PopulateDropdownUsers(); } } }
public void RemoveUserData() { DemoDataManager.GetInstance().Delete_User(SelectedUser); PopulateDropdownUsers(); }