async void OnSubmitData(object sender, EventArgs args)
        {
            try {
                ServiceReference3.IncomeRecordModel payment = new ServiceReference3.IncomeRecordModel();

                payment.detail = detail.Text;
                payment.amount = Double.Parse(amount.Text);

                bool     send = true;
                DateTime temp;
                if (DateTime.TryParse(paymentDate.Text, out temp))
                {
                    payment.paymentDate = DateTime.Parse(paymentDate.Text);
                }
                else
                {
                    send = false;
                    Device.BeginInvokeOnMainThread(() => {
                        DisplayAlert("Error", "Error de fecha", "Ok");
                    });
                }

                if (send)
                {
                    var wsPayment = new ServiceReference3.IncomeRecordSoapClient();
                    wsPayment.AddAsync(payment);
                    wsPayment.AddCompleted += wsPaymentAddCompleted;
                }
            } catch (Exception ex) {
                throw ex;
            }
        }
Beispiel #2
0
        public IncomeRecordList()
        {
            InitializeComponent();
            var wsPayment = new ServiceReference3.IncomeRecordSoapClient();

            wsPayment.GetDetailsAsync();
            wsPayment.GetDetailsCompleted += wsPaymentCompleted;
        }
Beispiel #3
0
        public IncomeRecordEdit(int idSelected)
        {
            InitializeComponent();
            id.Text = idSelected.ToString();

            var wsPayment = new ServiceReference3.IncomeRecordSoapClient();

            wsPayment.GetDetailsByIdAsync(idSelected);
            wsPayment.GetDetailsByIdAsync(idSelected);
            wsPayment.GetDetailsByIdCompleted += wsPaymentCompleted;
        }
Beispiel #4
0
        async void OnDelete(object sender, EventArgs args)
        {
            try {
                ServiceReference3.IncomeRecordModel payment = new ServiceReference3.IncomeRecordModel();

                payment.id = Int32.Parse(id.Text);
                var wsPayment = new ServiceReference3.IncomeRecordSoapClient();
                wsPayment.DeleteAsync(payment.id);
                wsPayment.DeleteCompleted += wsPaymentDeleteCompleted;
            } catch (Exception ex) {
                throw ex;
            }
        }