示例#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;
            }
        }
示例#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();
        }
示例#3
0
        public void StadisticsNullMoviesTest()
        {
            Stadistics stadistics = new Stadistics()
            {
                Movies     = null,
                MovieTypes = new List <MovieType>(),
                Name       = "NotMovie",
                Value      = 2
            };
            IActionResult stadisticEndpoint = administration.Stadistics(stadistics);

            Assert.IsType <ViewResult>(stadisticEndpoint);
        }
示例#4
0
 public IActionResult Stadistics(Stadistics stadistics)
 {
     if (stadistics.Movies != null)
     {
         return(View(stadistics));
     }
     stadistics = new Stadistics
     {
         Movies     = AdministrationRepository.GetMovies(),
         MovieTypes = AdministrationRepository.GetMovieTypes()
     };
     return(View(stadistics));
 }
示例#5
0
    void Start()
    {
        //PRUEBA
        nav    = GetComponent <NavMeshAgent>();
        target = PlayerManager.instance.player.transform;

        //
        collider = GetComponent <CapsuleCollider>();
        anim     = GetComponent <Animator>();
        st       = FindObjectOfType <Stadistics>();
        life     = 100;
        damage   = 15;
        audioPer = GetComponent <AudioSource>();
        anim.SetBool("isIdleMonster", true);
    }
示例#6
0
        public IActionResult StadisticsByDateRange(DateTime dateInitial, DateTime dateFinal)
        {
            if (dateFinal == default || dateInitial == default)
            {
                return(NotFound());
            }
            var res = new Stadistics
            {
                Movies     = AdministrationRepository.GetMovies(),
                MovieTypes = AdministrationRepository.GetMovieTypes(),
                Name       = "Ventas del Rango de Fecha",
                Value      = AdministrationRepository.StadisticsByDateRange(dateInitial, dateFinal)
            };

            return(View("Stadistics", res));;
        }
示例#7
0
        public IActionResult StadisticsByDate(DateTime date)
        {
            if (date == default)
            {
                return(NotFound());
            }
            var res = new Stadistics
            {
                Movies     = AdministrationRepository.GetMovies(),
                MovieTypes = AdministrationRepository.GetMovieTypes(),
                Name       = "Ventas del Día",
                Value      = AdministrationRepository.StadisticsByDate(date)
            };

            return(View("Stadistics", res));
        }
示例#8
0
        public IActionResult StadisticsByMovieType(string movieTypeId)
        {
            if (string.IsNullOrEmpty(movieTypeId))
            {
                return(NotFound());
            }
            var res = new Stadistics
            {
                Movies     = AdministrationRepository.GetMovies(),
                MovieTypes = AdministrationRepository.GetMovieTypes(),
                Name       = "Ventas del Tipo de Plícula",
                Value      = AdministrationRepository.StadisticsByMovieType(movieTypeId)
            };

            return(View("Stadistics", res));
        }
示例#9
0
        public IActionResult StadisticsByDirector(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(NotFound());
            }
            var res = new Stadistics
            {
                Movies     = AdministrationRepository.GetMovies(),
                MovieTypes = AdministrationRepository.GetMovieTypes(),
                Name       = "Ventas por Director",
                Value      = AdministrationRepository.StadisticsByDirector(name)
            };

            return(View("Stadistics", res));
        }
示例#10
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;
            }
        }
示例#11
0
 private void Start()
 {
     st = FindObjectOfType <Stadistics>();
 }
示例#12
0
 void Start()
 {
     st  = FindObjectOfType <Stadistics>();
     box = GetComponent <BoxCollider>();
     boton.SetActive(false);
 }
示例#13
0
 void Start()
 {
     st   = FindObjectOfType <Stadistics>();
     life = 75;
 }