Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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);
                }
            }
        }
Exemplo n.º 3
0
 public EntityPickerModel(List <EntityCodesResponse> data, UITextField txt, EntityCodesResponse current)
 {
     lstDropDownData.AddRange(data);
     selectedModel = current;
     txtField      = txt;
 }
Exemplo n.º 4
0
 partial void IBEntityDoneClicked(Foundation.NSObject sender)
 {
     EntityCode = entityModel.selectedModel;
     GetAccountCodeList();
     selectedTextFeild.EndEditing(true);
 }
Exemplo n.º 5
0
 public void EditingEnded(UITextField textField)
 {
     EntityCode  = entityModel.selectedModel;
     AccountCode = accountModel.selectedModel;
 }