public override void Selected(UIPickerView pickerView, nint row, nint component) { if (lstDropDownData == null || lstDropDownData.Count == 0) { return; } selectedModel = lstDropDownData[(int)row]; txtField.Text = selectedModel.CompName; }
async void GetEntityCodeList() { if (IosUtils.IosUtility.IsReachable()) { IosUtils.IosUtility.showProgressHud(""); try { var res = await WebServiceMethods.GetEntityCode(Convert.ToInt32(IosUtils.Settings.UserId), IosUtils.Settings.UserCompCode); if (res != null) { InvokeOnMainThread(() => { entitylst = res; if (isEdit) { EntityCode = entitylst.Where(x => x.CompCode.Equals(entityCode)).FirstOrDefault(); entityModel = new EntityPickerModel(entitylst, IBEntityTxt, EntityCode); IBEntityTxt.Text = EntityCode.CompName; IBEntityPicker.Model = entityModel; } else { entityModel = new EntityPickerModel(entitylst, IBEntityTxt, entitylst[0]); EntityCode = entitylst[0]; IBEntityTxt.Text = entitylst[0].CompName; IBEntityPicker.Model = entityModel; } }); GetAccountCodeList(); } else { IosUtils.IosUtility.hideProgressHud(); IosUtils.IosUtility.showAlertWithInfo(IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSErrorTitle", "LSErrorTitle"), IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSUnknownError", "LSErrorTitle")); } } catch (Exception e) { IosUtils.IosUtility.hideProgressHud(); IosUtils.IosUtility.showAlertWithInfo(IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSErrorTitle", "LSErrorTitle"), e.Message); } } }
public EntityPickerModel(List <EntityCodesResponse> data, UITextField txt, EntityCodesResponse current) { lstDropDownData.AddRange(data); selectedModel = current; txtField = txt; }
partial void IBEntityDoneClicked(Foundation.NSObject sender) { EntityCode = entityModel.selectedModel; GetAccountCodeList(); selectedTextFeild.EndEditing(true); }
public void EditingEnded(UITextField textField) { EntityCode = entityModel.selectedModel; AccountCode = accountModel.selectedModel; }