public void CargarDatos(TicketsBL ticketsBL, ClientesBL clientesBL, ViajesBL viajesBL) { _ticketsBL = ticketsBL; listaDeTicketsBindingSource.DataSource = ticketsBL.ListaDeTickets; listadeClientesBindingSource.DataSource = clientesBL.ListadeClientes; listadeViajesBindingSource.DataSource = viajesBL.ListadeViajes; }
public Form1() { InitializeComponent(); _busBL = new BusBL(); _viajesBL = new ViajesBL(); _clientesBL = new ClientesBL(); _ticketsBL = new TicketsBL(); _usuariosBL = new UsuariosBL(); }
public void CalcularTotalTicket() { var viajesBL = new ViajesBL(); double subtotal = 0; foreach (var detalle in TicketsDetalle) { var precio = viajesBL.ObtenerPrecio(detalle.ViajeId); subtotal = subtotal + detalle.CalcualrTotalDetalle(precio); } Subtotal = subtotal; Impuesto = Subtotal * 0.15; Total = Subtotal + Impuesto; }
public HttpResponseMessage ObtenerTodosViajes() { var respuesta = new RespuestaApi <List <Viaje> >(); try { var viajes = ViajesBL.ObtenerTodosViajes(); respuesta.Datos = viajes; } catch (Exception ex) { respuesta.ManejarExepcion(ex); } return(Request.CreateResponse(respuesta.CodigoEstadoHttp, respuesta)); }
public HttpResponseMessage ObtenerDetalleViaje(int idViaje) { var respuesta = new RespuestaApi <Viaje>(); try { var viaje = ViajesBL.ObtenerDetalleViaje(idViaje); respuesta.Datos = viaje; } catch (Exception ex) { respuesta.ManejarExepcion(ex); } return(Request.CreateResponse(respuesta.CodigoEstadoHttp, respuesta)); }
public void InvocarServiciosViajes() { TransDepotMaestrosProxy proxy = new TransDepotMaestrosProxy(); try { ViajesBL viajesBL = new ViajesBL(); RequestRegistroViaje request = new RequestRegistroViaje(); ResponseRegistrarViaje response = new ResponseRegistrarViaje(); List <TramaViaje> listaViajes = new List <TramaViaje>(); listaViajes = viajesBL.ListarViaje(); if (listaViajes != null && listaViajes.Count > 0) // se supone que aqui ya tienes todos los datos { foreach (TramaViaje ent in listaViajes) { request.Trama.VesselIMO = ent.VesselIMO; request.Trama.VoyageNumber = ent.VoyageNumber; request.Trama.RowStatus = ent.RowStatus; request.Trama.VoyageStops = ent.VoyageStops; request.ID = 0; response = proxy.RegistrarViajes(request); if (response.isValid == true) { viajesBL.ActualizaViajeTDepotMaestros(ent.VoyageStops.FirstOrDefault().VoyageStopExternalCode); } else { InsertLog.Instanse.Insert(string.Format(@"Error en el metodo: {0}{1}Mensaje Error:{2}{3}Detalle Error:{4}", MethodBase.GetCurrentMethod().Name, Environment.NewLine, "Invocar Servicio TDepot Viajes ", Environment.NewLine, response.messages.FirstOrDefault().message)); } } } //else //{ // InsertLog.Instanse.Insert(string.Format(@"Error en el metodo: {0}{1}Mensaje Error:{2}{3}Detalle Error:{4}", MethodBase.GetCurrentMethod().Name, Environment.NewLine, "Obtener detalle recalada ", Environment.NewLine, "No se obtuvo detalle para la recalada ")); //} } catch (Exception ex) { InsertLog.Instanse.Insert(string.Format(@"Error en el metodo: {0}{1}Mensaje Error:{2}{3}Detalle Error:{4}", MethodBase.GetCurrentMethod().Name, Environment.NewLine, ex.Message, Environment.NewLine, ex.StackTrace)); } }
public HttpResponseMessage ActualizarEstatusViaje( PeticionActualizarEstatus peticion) { var respuesta = new RespuestaApi <bool>(); try { ViajesBL.ActualizarEstatusViaje( peticion.IdViaje, peticion.Estatus, peticion.Detalle); respuesta.Datos = true; } catch (Exception ex) { respuesta.ManejarExepcion(ex); } return(Request.CreateResponse(respuesta.CodigoEstadoHttp, respuesta)); }
public void CargarDatos(ViajesBL viajesBL) { var bindingSource = new BindingSource(); bindingSource.DataSource = from p in viajesBL.ListadeViajes select new { Foto = p.Foto, Id = p.Id, Fecha = p.Fecha, Origen = p.Origen, Destino = p.Destino, Precio = p.Precio }; var reporteViajes = new ReportedeViajes(); reporteViajes.SetDataSource(bindingSource); crystalReportViewer1.ReportSource = reporteViajes; crystalReportViewer1.RefreshReport(); }
public void CargarDatos(BusBL busBL, ViajesBL viajesBL) { listadeBusesBindingSource.DataSource = busBL.ListadeBuses; listadeViajesBindingSource.DataSource = viajesBL.ListadeViajes; }
public void CargarDatos(ViajesBL viajesBL) { listadeViajesBindingSource.DataSource = viajesBL.ListadeViajes; }