예제 #1
0
 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));
     }
 }
예제 #2
0
        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}"));
            }
        }
예제 #3
0
 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();
         }
     }
 }
예제 #4
0
 public void RemoveUserData()
 {
     DemoDataManager.GetInstance().Delete_User(SelectedUser);
     PopulateDropdownUsers();
 }