public override void OnBindElements(View view) { AddCounterpartyName = view.FindViewById <EditText>(Resource.Id.AddCounterpartyName); AddCounterpartyStreet = view.FindViewById <EditText>(Resource.Id.AddCounterpartyStreet); AddCounterpartyPostalCode = view.FindViewById <EditText>(Resource.Id.AddCounterpartyPostalCode); AddCounterpartyCity = view.FindViewById <AutoCompleteTextView>(Resource.Id.AddCounterpartyCity); AddCounterpartyPhone = view.FindViewById <EditText>(Resource.Id.AddCounterpartyPhone); AddCounterpartyNIP = view.FindViewById <EditText>(Resource.Id.AddCounterpartyNIP); AddCounterpartyName.AfterTextChanged += AfterTextChanged; AddCounterpartyStreet.AfterTextChanged += AfterTextChanged; AddCounterpartyCity.AfterTextChanged += AfterTextChanged; AddCounterpartyPostalCode.AfterTextChanged += AfterTextChanged; AddCounterpartyPhone.AfterTextChanged += AfterTextChanged; AddCounterpartyNIP.AfterTextChanged += AfterTextChanged; var token = CancelAndSetTokenForView(AddCounterpartyCity); _cityAdapter = new BaseArrayAdapter <Models.City>(Context); AddCounterpartyCity.Adapter = _cityAdapter; AddCounterpartyCity.Threshold = 1; Criteria.ItemsPerPage = 10; var task = Task.Run(GetCities, token); AddCounterpartyCity.ItemClick += OnAutocompleteCityClick; }
public override void OnBindElements(View view) { AddGoodsDispatchedNoteInvoiceId = view.FindViewById <AutoCompleteTextView>(Resource.Id.AddGoodsDispatchedNoteInvoiceId); AddGoodsDispatchedNoteDocumentId = view.FindViewById <EditText>(Resource.Id.AddGoodsDispatchedNoteDocumentId); AddGoodsDispatchedNoteIssueDate = view.FindViewById <EditText>(Resource.Id.AddGoodsDispatchedNoteIssueDate); AddGoodsDispatchedNoteDispatchDate = view.FindViewById <EditText>(Resource.Id.AddGoodsDispatchedNoteDispatchDate); AddGoodsDispatchedNoteInvoiceId.AfterTextChanged += AfterTextChanged; AddGoodsDispatchedNoteIssueDate.OnFocusChangeListener = this; AddGoodsDispatchedNoteDispatchDate.OnFocusChangeListener = this; _dialog = CreateDatePickerDialog(this); _addGoodsDispatchedNoteAdapter = new AddGoodsDispatchedNoteAdapter(Context, LocationService); _invoiceAdapter = new BaseArrayAdapter <Models.Invoice>(Context); InvoiceFilterCriteria = new InvoiceFilterCriteria { ItemsPerPage = 5, InvoiceType = InvoiceType.Sales, AssignedToNote = false }; var currentDate = DateTime.Now; var currentDateFormat = currentDate.ToLongDateString(); AddGoodsDispatchedNoteIssueDate.Text = currentDateFormat; AddGoodsDispatchedNoteIssueDate.Tag = new JavaObjectWrapper <DateTime>(currentDate); AddGoodsDispatchedNoteDispatchDate.Text = currentDateFormat; AddGoodsDispatchedNoteDispatchDate.Tag = new JavaObjectWrapper <DateTime>(currentDate); AddGoodsDispatchedNoteDocumentId.Text = string.Format("WZ/{0:yyyyMMddhhmmss}", currentDate); }
public override void OnBindElements(View view) { CounterpartyEditName = view.FindViewById <TextInputEditText>(Resource.Id.CounterpartyEditName); CounterpartyEditCity = view.FindViewById <AutoCompleteTextView>(Resource.Id.CounterpartyEditCity); CounterpartyEditStreet = view.FindViewById <TextInputEditText>(Resource.Id.CounterpartyEditStreet); CounterpartyEditPostalCode = view.FindViewById <TextInputEditText>(Resource.Id.CounterpartyEditPostalCode); CounterpartyEditNIP = view.FindViewById <TextInputEditText>(Resource.Id.CounterpartyEditNIP); CounterpartyEditPhoneNumber = view.FindViewById <TextInputEditText>(Resource.Id.CounterpartyEditPhoneNumber); CounterpartyEditName.Text = Entity.Name; CounterpartyEditStreet.Text = Entity.Street; CounterpartyEditCity.Text = Entity.City.Name; CounterpartyEditPostalCode.Text = Entity.PostalCode; CounterpartyEditNIP.Text = Entity.NIP; CounterpartyEditPhoneNumber.Text = Entity.PhoneNumber; CounterpartyEditName.AfterTextChanged += afterTextChanged; CounterpartyEditStreet.AfterTextChanged += afterTextChanged; CounterpartyEditCity.AfterTextChanged += afterTextChanged; CounterpartyEditPostalCode.AfterTextChanged += afterTextChanged; CounterpartyEditPhoneNumber.AfterTextChanged += afterTextChanged; CounterpartyEditNIP.AfterTextChanged += afterTextChanged; var token = CancelAndSetTokenForView(CounterpartyEditCity); _cityAdapter = new BaseArrayAdapter <Models.City>(Activity); CounterpartyEditCity.Adapter = _cityAdapter; CounterpartyEditCity.Threshold = 1; Criteria.ItemsPerPage = 10; var task = Task.Run(GetCities, token); CounterpartyEditCity.ItemClick += OnAutocompleteCounterpartyClick; }
public override void OnBindElements(View view) { AddInvoiceType = view.FindViewById <Spinner>(Resource.Id.AddInvoiceType); AddInvoiceCounterparty = view.FindViewById <AutoCompleteTextView>(Resource.Id.AddInvoiceCounterparty); AddInvoiceDocumentId = view.FindViewById <EditText>(Resource.Id.AddInvoiceDocumentId); AddInvoiceIssueDate = view.FindViewById <EditText>(Resource.Id.AddInvoiceIssueDate); AddInvoiceCompletionDate = view.FindViewById <EditText>(Resource.Id.AddInvoiceCompletionDate); AddInvoiceCity = view.FindViewById <AutoCompleteTextView>(Resource.Id.AddInvoiceCity); AddInvoicePaymentMethod = view.FindViewById <Spinner>(Resource.Id.AddInvoicePaymentMethod); AddInvoiceProducts = view.FindViewById <ListView>(Resource.Id.AddInvoiceProducts); AddInvoiceAddProductButton = view.FindViewById <ImageButton>(Resource.Id.AddInvoiceAddProductButton); _dialog = CreateDatePickerDialog(this); AddInvoiceIssueDate.OnFocusChangeListener = this; AddInvoiceCompletionDate.OnFocusChangeListener = this; AddInvoiceAddProductButton.SetOnClickListener(this); _invoiceTypeAdapter = new SpinnerDefaultValueAdapter <Models.KeyValue>(Context); _paymentMethodAdapter = new SpinnerDefaultValueAdapter <Models.KeyValue>(Context); _counterPartyAdapter = new BaseArrayAdapter <Models.Counterparty>(Context); _cityAdapter = new BaseArrayAdapter <City>(Context); _productsAdapter = new AddInvoiceEntryRowItemAdapter(Context); AddInvoiceProducts.Adapter = _productsAdapter; _productsAdapter.IOnClickListener = this; _productsAdapter.UpdateList(Entity.Products); AddInvoiceType.Adapter = _invoiceTypeAdapter; AddInvoicePaymentMethod.Adapter = _paymentMethodAdapter; AddInvoiceCounterparty.Adapter = _counterPartyAdapter; AddInvoiceCounterparty.ItemClick += OnAutocompleteCounterpartyClick; AddInvoiceCity.Adapter = _cityAdapter; AddInvoiceCity.ItemClick += OnAutocompleteCityClick; AddInvoiceCity.AfterTextChanged += AfterTextChanged; AddInvoiceCounterparty.AfterTextChanged += AfterTextChanged; var currentDate = DateTime.Now; var currentDateFormat = currentDate.ToLongDateString(); AddInvoiceIssueDate.Text = currentDateFormat; AddInvoiceIssueDate.Tag = new JavaObjectWrapper <DateTime>(currentDate); AddInvoiceCompletionDate.Text = currentDateFormat; AddInvoiceCompletionDate.Tag = new JavaObjectWrapper <DateTime>(currentDate); AddInvoiceDocumentId.Text = string.Format("FAK/{0:yyyyMMddhhmmss}", currentDate); var token = CancelAndSetTokenForView(AddButton); Task.Run(async() => { await Load(token); }, token); }
public BaseFilter(BaseArrayAdapter <T> adapter) { _adapter = adapter; }