void Init() { var count = (int)To.Subtract(From).TotalMinutes / IntervalInMin + 1; for (int i = 0; i < count; i++) { var dt = From.AddMinutes(IntervalInMin * i); dic.Add(dt, new Ohlc(dt, 83d, 159d, 139d, 93d, 0d)); range.Add(dt); } }
/// <summary> /// Displays a detailed list of events reported within the route. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LnkReporteDeEventosClick(object sender, EventArgs e) { var mobile = DAOFactory.CocheDAO.FindById(Mobile); Session.Add("EventsLocation", mobile.Empresa != null ? mobile.Empresa.Id : -1); Session.Add("EventsCompany", mobile.Linea != null ? mobile.Linea.Id : -1); Session.Add("EventsMobileType", mobile.TipoCoche != null ? mobile.TipoCoche.Id : -1); Session.Add("EventsMobile", Mobile); Session.Add("EventsFrom", From.AddMinutes(-1)); Session.Add("EventsTo", To.AddMinutes(1)); OpenWin("../eventos.aspx", "Reporte de Eventos"); }
/// <summary> /// Displays a detailed information about the route. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LnkResumenDeRutaClick(object sender, EventArgs e) { var mobile = DAOFactory.CocheDAO.FindById(Mobile); Session.Add("RouteLocation", mobile.Empresa != null ? mobile.Empresa.Id : -1); Session.Add("RouteCompany", mobile.Linea != null ? mobile.Linea.Id : -1); Session.Add("RouteMobileType", mobile.TipoCoche != null ? mobile.TipoCoche.Id : -1); Session.Add("RouteMobile", Mobile); Session.Add("RouteInitialDate", From.AddMinutes(-1)); Session.Add("RouteFinalDate", From.ToShortDateString().Equals(To.ToShortDateString()) ? To.AddMinutes(1) : To.Add(new TimeSpan(23, 59, 59))); OpenWin("../../Estadistica/MobileRoutes.aspx", "Resumen de Ruta"); }
/// <summary> /// Displays the selected route fragment in the historic monitor. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LnkMonitorHistoricoClick(object sender, EventArgs e) { var mobile = DAOFactory.CocheDAO.FindById(Mobile); Session.Add("Distrito", mobile.Empresa != null ? mobile.Empresa.Id : mobile.Linea != null ? mobile.Linea.Empresa.Id : -1); Session.Add("Location", mobile.Linea != null ? mobile.Linea.Id : -1); Session.Add("Chofer", mobile.Chofer != null ? mobile.Chofer.Id : -1); Session.Add("TypeMobile", mobile.TipoCoche.Id); Session.Add("Mobile", Mobile); Session.Add("InitialDate", From.AddMinutes(-1)); Session.Add("FinalDate", To.AddMinutes(1)); Session.Add("ShowMessages", 0); Session.Add("ShowPOIS", 0); OpenWin("../../../Monitor/MonitorHistorico/monitorHistorico.aspx", "Monitor Historico"); }