public RecurrenceTypeList() { InitializeComponent(); var wsPayment = new ServiceReference1.RecurenceTypeSoapClient(); wsPayment.GetDetailsAsync(); wsPayment.GetDetailsCompleted += wsPaymentCompleted; }
public RecurrenceTypeEdit(int idSelected) { InitializeComponent(); id.Text = idSelected.ToString(); var wsPayment = new ServiceReference1.RecurenceTypeSoapClient(); wsPayment.GetDetailsByIdAsync(idSelected); wsPayment.GetDetailsByIdCompleted += wsPaymentCompleted; }
async void OnDelete(object sender, EventArgs args) { try { ServiceReference1.RecurenceTypeModel payment = new ServiceReference1.RecurenceTypeModel(); payment.id = Int32.Parse(id.Text); var wsPayment = new ServiceReference1.RecurenceTypeSoapClient(); wsPayment.DeleteAsync(payment.id); wsPayment.DeleteCompleted += wsPaymentDeleteCompleted; } catch (Exception ex) { throw ex; } }
async void OnSubmitData(object sender, EventArgs args) { try { ServiceReference1.RecurenceTypeModel payment = new ServiceReference1.RecurenceTypeModel(); payment.detail = detail.Text; payment.days = Int32.Parse(days.Text); var wsPayment = new ServiceReference1.RecurenceTypeSoapClient(); wsPayment.AddAsync(payment); wsPayment.AddCompleted += wsPaymentAddCompleted; } catch (Exception ex) { throw ex; } }