private async void GetValues() { try { if (IosUtils.IosUtility.IsReachable()) { IosUtils.IosUtility.showProgressHud(""); responseList = await WebServiceMethods.ShowRefUsers(IosUtils.Settings.UserCompCode); if (responseList != null && responseList.Count > 0) { selectedUser = responseList.Where(u => u.UserID == IosUtils.Settings.UserId).FirstOrDefault(); //selectedUser = responseList[0]; IBAssignedToTxt.Text = selectedUser.UserName; userPickerModel = new UserRefPicker(responseList, IBAssignedToTxt, selectedUser); IBAssignedToPicker.Model = userPickerModel; } _notesTypeList = await WebServiceMethods.ShowNotesType(); GetNotesTypeResult(_notesTypeList); IosUtils.IosUtility.hideProgressHud(); SetDateTime(); } } catch (Exception e) { IosUtils.IosUtility.hideProgressHud(); } }
public override void Selected(UIPickerView pickerView, nint row, nint component) { if (lstDropDownData == null || lstDropDownData.Count == 0) { return; } selectedModel = lstDropDownData[(int)row]; txtField.Text = selectedModel.UserName; }
public void EditingEnded(UITextField textField) { selectedUser = userPickerModel.selectedModel; SelectedType = eventPickerModel.selectedModel; }
partial void IBAssignedToDoneClicked(Foundation.NSObject sender) { selectedUser = userPickerModel.selectedModel; IBAssignedToTxt.EndEditing(true); }
private async void GetValues() { try { if (IosUtils.IosUtility.IsReachable()) { IosUtils.IosUtility.showProgressHud(""); SetDateTime(); responseList = await WebServiceMethods.ShowRefUsers(IosUtils.Settings.UserCompCode); if (responseList != null && responseList.Count > 0) { if (isEdit) { selectedUser = responseList.Where(u => u.UserID == Event.AssignedTo).FirstOrDefault(); IBAssignedToTxt.Text = selectedUser != null ? selectedUser.UserName : ""; IBSubjectTxt.Text = Event.Subject; IBDetailsTxt.Text = Event.Details; IBFromDateTxt.Text = Event.DateStart.ToString(Utilities.CALENDAR_DATE_FORMAT); IBToDateTxt.Text = Event.DateEnd.ToString(Utilities.CALENDAR_DATE_FORMAT); } else { selectedUser = responseList.Where(u => u.UserID.Equals(IosUtils.Settings.UserId)). FirstOrDefault(); IBAssignedToTxt.Text = selectedUser.UserName; } userPickerModel = new UserRefPicker(responseList, IBAssignedToTxt, selectedUser); IBAssignedToPicker.Model = userPickerModel; } _notesTypeList = await WebServiceMethods.ShowNotesType(); if (_notesTypeList != null && _notesTypeList.Count > 0) { if (isEdit) { SelectedType = _notesTypeList.Where(u => u.NotesTypeId == Convert.ToInt32(Event.NotesTypeId)) .FirstOrDefault(); IBEventTypeTxt.Text = SelectedType.NotesTypeName; eventPickerModel = new EventTypePickerModel(_notesTypeList, IBEventTypeTxt, SelectedType); IBEventTypePicker.Model = eventPickerModel; } else { SelectedType = _notesTypeList[0]; IBEventTypeTxt.Text = SelectedType.NotesTypeName; eventPickerModel = new EventTypePickerModel(_notesTypeList, IBEventTypeTxt, SelectedType); IBEventTypePicker.Model = eventPickerModel; } } IosUtils.IosUtility.hideProgressHud(); } } catch (Exception e) { IosUtils.IosUtility.hideProgressHud(); } }
public UserRefPicker(List <RefUsersResponse> data, UITextField txt, RefUsersResponse current) { lstDropDownData.AddRange(data); selectedModel = current; txtField = txt; }