private void AutoSuggestBox_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { var query = e.SelectedItem as string; var items = new List <Pokemon>(); if (!string.IsNullOrEmpty(query)) { ViewModel.Pokemons.ForEach(x => { x.types.ForEach(t => { if (t.type.name.Equals(query)) { items.Add(x); } }); }); if (items.Count > 0) { lv.ItemsSource = items; } else { DisplayAlert("Aviso", "Essse tipo de pokemon aí não foi carregado!", "OK"); } } else { lv.ItemsSource = ViewModel.Pokemons; } }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { //try //{ // txtsearchbykeyword.Text = ((StudentProfileModel)e.SelectedItem).wardenName; // selectedtextdata = new ObservableCollection<StudentProfileModel>(); // if (wardenInfoModels != null) // { // foreach (var items in wardenInfoModels) // { // if (txtsearchbykeyword.Text == items.wardenName) // { // if (!string.IsNullOrEmpty(items.wardenPhoneNo)) // selectedtextdata.Add(items); // } // } // } // if (selectedtextdata == null || selectedtextdata.Count == 0) // { // _listView.ItemsSource = null; // App.Current.MainPage.DisplayAlert("HMS", "No contact no found for the entered name", "OK"); // } // else // _listView.ItemsSource = selectedtextdata; //} //catch (Exception ex) //{ //} }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { txtsearchbykeyword.Text = ((WardenInfoModel)e.SelectedItem).firstName; infoModels = new ObservableCollection <WardenInfoModel>(); if (wardenInfos != null) { foreach (var items in wardenInfos) { if (txtsearchbykeyword.Text == items.firstName) { if (!string.IsNullOrEmpty(items.contact)) { infoModels.Add(items); break; } } } } if (infoModels == null) { _listView.ItemsSource = null; App.Current.MainPage.DisplayAlert("HMS", "No contact no found for the entered name", "OK"); } else { _listView.ItemsSource = infoModels; } } catch (Exception ex) { } }
//private void txtsearchbyapplicationno_TextChanged(object sender, AutoSuggestBoxTextChangedEventArgs e) //{ // try // { // if (e.Reason == AutoSuggestionBoxTextChangeReason.UserInput) // { // hostelAdmittedStudentDetails1 = new ObservableCollection<HostelAdmittedStudentDetails>(); // if (Vm.HostelAdmittedStudentDetails != null) // { // foreach (var items in Vm.HostelAdmittedStudentDetails) // { // if (!string.IsNullOrEmpty(items.applicationNo)) // { // if (!string.IsNullOrEmpty(txtsearchbyapplicationno.Text)) // { // if (items.applicationNo.ToUpper().StartsWith(txtsearchbyapplicationno.Text.ToUpper()) || items.applicationNo.ToLower().StartsWith(txtsearchbyapplicationno.Text.ToLower())) // hostelAdmittedStudentDetails1.Add(items); // } // } // else // Vm.HostelAdmittedStudentDetails.Clear(); // } // txtsearchbyapplicationno.ItemsSource = hostelAdmittedStudentDetails1; // } // } // } // catch (Exception ex) // { // } //} //private void txtsearchbyapplicationno_SuggestionChosen(object sender, AutoSuggestBoxSuggestionChosenEventArgs e) //{ // txtsearchbyapplicationno.Text = ((HostelAdmittedStudentDetails)e.SelectedItem).applicationNo; // Vm.gethosteladmissionid(txtsearchbyapplicationno.Text); //} private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { txtsearchbykeyword.Text = ((LeaveTypeModel)e.SelectedItem).name; Vm.LeaveType = txtsearchbykeyword.Text; var id = ((LeaveTypeModel)e.SelectedItem).leaveTypeId; Vm.LeaveTypeId = id; }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { Vm.CountryName = ((CountryModel)e.SelectedItem).country; CountryModel md = (CountryModel)e.SelectedItem; int cnt = Vm.CountryModel.IndexOf(md); Vm.CountrySelection(cnt); }
private void District_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { var selected = e.SelectedItem; var id = viewModel.Districts.Find(x => x.Name == selected).ID; viewModel.DistrictID = Convert.ToInt32(id); (sender as AutoSuggestBox).Unfocus(); }
private void AutoSuggestBox_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs args) { // Definir sender.Text. Você pode usar args.SelectedItem para construir sua string de texto. if (args.SelectedItem != null) { (sender as AutoSuggestBox).Text = ((ClientesModel)args.SelectedItem).DS_RAZAO + " - " + ((ClientesModel)args.SelectedItem).DS_CIDADE; } }
private void txtsearchbyhostel_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { //txtsearchbyhostel.Text = ((HostelModel)e.SelectedItem).hostelName; //hostellist.Add(txtsearchbyhostel.Text); //for (int i = 0; i < hostellist.Count; i++) //{ // sb.Append(hostellist[i].ToString()); // sb.Append(","); //} //txtassignedhostellist.Text = sb.ToString(); }
private void txtselectbyarea_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { txtselectbyarea.Text = ((AreaModel)e.SelectedItem).areaName; AreaModel value = (AreaModel)e.SelectedItem; vm.selectedarea(value.id); } catch (Exception ex) { } }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { Vm.FloorProp.AreaName = ((AreaModel)e.SelectedItem).areaName; AreaModel value = (AreaModel)e.SelectedItem; Vm.selectedArea(value.id); } catch (Exception ex) { } }
private void txtselectbyarea_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { txtselectbyarea.Text = ((AreaModel)e.SelectedItem).areaName; string value = ((AreaModel)e.SelectedItem).id; App.areaid = value; VM.GetHostelList(App.areaid); } catch (Exception ex) { } }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { Vm.AreaName = ((AreaModel)e.SelectedItem).areaName; //Vm.AreaName = txtsearchbykeyword.DisplayMemberPath; //Vm.AreaName = txtsearchbykeyword.TextMemberPath; Vm.AreaId = ((AreaModel)e.SelectedItem).id; } catch (Exception ex) { } }
private void ItemAutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { if (sender.Text != "") { int index = itemsNameList.IndexOf(sender.Text); if (index == -1) { return; } sender.Text = itemsSQLite[index].Description; WeightEntry.Text = itemsSQLite[index].Weight.ToString(); UnitPriceEntry.Text = itemsSQLite[index].UnitCost.ToString(); } }
private void txtsearchbywarden_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { txtsearchbywarden.Text = ((WardenInfoModel)e.SelectedItem).firstName; Warden1 = new ObservableCollection <WardenInfoModel>(); if (Warden != null || Warden.Count == 0) { foreach (var items in Warden) { if (txtsearchbywarden.Text == items.firstName) { Warden1.Add(items); break; } } } lv_contact.ItemsSource = Warden1; }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { txtsearchbykeyword.Text = ((WardenServiceModel)e.SelectedItem).name.ToString(); serviceCategories1 = new ObservableCollection <WardenServiceModel>(); foreach (var items in serviceCategories) { if (items.name.ToString() == txtsearchbykeyword.Text) { serviceCategories1.Add(items); } } _listView.ItemsSource = serviceCategories1; } catch (Exception ex) { } }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { //try //{ // hostalMasterModels = new ObservableCollection<HostalMasterModel>(); // txtsearchbykeyword.Text = ((HostalMasterModel)e.SelectedItem).hostelName; // if (ListHostel != null) // { // foreach (var items in ListHostel) // { // hostalMasterModels.Add(items); // } // } // _listView.ItemsSource = hostalMasterModels; //} //catch (Exception ex) //{ //} }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { txtsearchbykeyword.Text = ((StudentLeaveHistory)e.SelectedItem).stuName.ToString(); studentLeaveHistories1 = new ObservableCollection <StudentLeaveHistory>(); if (studentLeaveHistories != null) { foreach (var items in studentLeaveHistories) { if (items.stuName == txtsearchbykeyword.Text) { studentLeaveHistories1.Add(items); } } } _listView.ItemsSource = studentLeaveHistories1; } catch (Exception ex) { } }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { try { txtsearchbykeyword.Text = ((Students)e.SelectedItem).studentName; students = new ObservableCollection <Students>(); if (Students != null) { foreach (var items in Students) { if (items.studentName == txtsearchbykeyword.Text) { students.Add(items); } } } listview.ItemsSource = students; } catch (Exception ex) { } }
private void AutoSuggestBox_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { // Set sender.Text. You can use args.SelectedItem to build your text string. inputBox.Text = e.SelectedItem.ToString(); }
private void txtsearchbyarea_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { txtsearchbyarea.Text = ((AreaModel)e.SelectedItem).areaName; vm.WardenAssignment.areaId = ((AreaModel)e.SelectedItem).id; vm.GetHostelList(vm.WardenAssignment.areaId); }
private void txtsearchbywarden_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { txtsearchbywarden.Text = ((WardenInfoModel)e.SelectedItem).firstName; vm.WardenAssignment.employeeId = ((WardenInfoModel)e.SelectedItem).id.ToString(); }
private void AutoSuggestBox_SuggestionChosen(object sender, XAutoSuggestBoxSuggestionChosenEventArgs e) { MessagingCenter.Send(Element, "AutoSuggestBox_" + nameof(AutoSuggestBox.SuggestionChosen), e.SelectedItem); }
private void StopEntrySuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { ((AutoSuggestBox)sender).Text = e.SelectedItem.ToString(); }
public void FireSuggestionChosen(AutoSuggestBoxSuggestionChosenEventArgs args) { SuggestionChosen?.Invoke(this, args); }
private void NativeAutoSuggestBox_SuggestionChosen(object sender, AutoSuggestBoxSuggestionChosenEventArgs e) { Element.FireSuggestionChosen(new AutoSuggestBoxSuggestionChosenEventArgs(e.SelectedItem)); }
private void AutoSuggestBox_SuggestionChosen(object sender, XAutoSuggestBoxSuggestionChosenEventArgs e) { Element?.RaiseSuggestionChosen(e.SelectedItem); }
private void txtsearchbyhostel_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { txtsearchbyhostel.Text = ((HostelModel)e.SelectedItem).hostelName; App.hostelid = ((HostelModel)e.SelectedItem).id; }
private void txtsearchbykeyword_SuggestionChosen(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxSuggestionChosenEventArgs e) { txtsearchbykeyword.Text = ((WardenServiceModel)e.SelectedItem).name; vm.Servicecategoryname = txtsearchbykeyword.Text; vm.RequestServiceModel.roomServiceTypeId = ((WardenServiceModel)e.SelectedItem).id.ToString(); }