private async void calcularImporte() { var oServicio = (servicios)cboxservicio.SelectedItem; var svCtrl = new servicioController(); var servicio = await svCtrl.obtenerPorId(oServicio.idservicio); this.txtimporte.Text = (servicio.sv_precio * Convert.ToInt32(txtcantservicios.Value)).ToString(); }
private async void calcularImporte() { this.CitaBase = await ctCtrl.obtenerCitaPorIdOriginal(this.Cita.Id); var svCtrl = new servicioController(); var servicio = await svCtrl.obtenerPorId(CitaDetalle[0].ServicioId); this.Servicio = servicio; decimal total = CitaDetalle.Sum(d => d.Importe); this.txtimporte.Text = total.ToString(); }