public override void Selected(UIPickerView pickerView, nint row, nint component)
 {
     if (lstDropDownData == null || lstDropDownData.Count == 0)
     {
         return;
     }
     selectedModel = lstDropDownData[(int)row];
     txtField.Text = selectedModel.NotesTypeName;
 }
Exemplo n.º 2
0
 public void EditingEnded(UITextField textField)
 {
     selectedUser = userPickerModel.selectedModel;
     SelectedType = eventPickerModel.selectedModel;
 }
Exemplo n.º 3
0
 partial void IBEventTypeDoneClicked(Foundation.NSObject sender)
 {
     SelectedType = eventPickerModel.selectedModel;
     IBEventTypeTxt.EndEditing(true);
 }
Exemplo n.º 4
0
        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 EventTypePickerModel(List <NotesTypeResponse> data, UITextField txt, NotesTypeResponse current)
 {
     lstDropDownData.AddRange(data);
     selectedModel = current;
     txtField      = txt;
 }