Example #1
0
        protected override void BtnSearchClick(object sender, EventArgs e)
        {
            base.BtnSearchClick(sender, e);

            var desde = SecurityExtensions.ToDataBaseDateTime(dpDesde.SelectedDate.GetValueOrDefault());
            var hasta = SecurityExtensions.ToDataBaseDateTime(dpHasta.SelectedDate.GetValueOrDefault());

            Stadistics = ReportFactory.OperatorStadisticsDAO.GetOperatorStadistics(ddlEmpleado.Selected, desde, hasta);

            var showResults = Stadistics != null && Stadistics.HasActiveDays();

            if (showResults)
            {
                OperatorMobiles = ReportFactory.OperatorMobilesDAO.GetOperatorMobiles(ddlEmpleado.Selected, desde, hasta).Select(om => new OperatorMobilesVo(om)).ToList();

                AddResultsToSession();
            }

            ifDetalleVehiculo.Visible = ifMoviles.Visible = showResults;

            if (NotFound != null)
            {
                NotFound.Text = !showResults?CultureManager.GetSystemMessage("NO_RESULT_FOR_CURRENT_FILTERS") : null;
            }
        }
Example #2
0
        /// <summary>
        /// Remembers current page data and layout before printing the report.
        /// </summary>
        protected override void OnPrePrint()
        {
            AddResultsToSession();

            Session["KeepInSession"] = true;

            ifConductoresPrint.Visible = ifDetalleVehiculoPrint.Visible = Stadistics.HasActiveDays();
        }
Example #3
0
        /// <summary>
        /// Perfmorms custom search actions.
        /// </summary>
        private void RealizarBusqueda()
        {
            var desde = SecurityExtensions.ToDataBaseDateTime(dpDesde.SelectedDate.GetValueOrDefault());
            var hasta = SecurityExtensions.ToDataBaseDateTime(dpHasta.SelectedDate.GetValueOrDefault());

            Stadistics = ReportFactory.MobileStadisticsDAO.GetMobileStadistics(ddlVehiculo.Selected, desde, hasta);

            var showResults = Stadistics.HasActiveDays();

            if (showResults)
            {
                MobileDrivers = ReportFactory.MobileDriversDAO.GetMobileDrivers(ddlVehiculo.Selected, desde, hasta).Select(md => new MobileDriversVo(md)).ToList();

                AddResultsToSession();
            }

            ifDetalleVehiculo.Visible = ifConductores.Visible = showResults;

            if (NotFound != null)
            {
                NotFound.Text = !showResults?CultureManager.GetSystemMessage("NO_RESULT_FOR_CURRENT_FILTERS") : null;
            }
        }