Beispiel #1
0
        public List <EmployeeDto> ListarPorTurno(int turno)
        {
            var       list = new List <EmployeeDto>();
            EnumTurns turn = new EnumTurns();

            switch (turno)
            {
            case 0:
                turn = EnumTurns.Morning;
                break;

            case 1:
                turn = EnumTurns.Late;
                break;

            case 2:
                turn = EnumTurns.Night;
                break;
            }

            list = this.employesRepository.Set()
                   .Where(c => c.Turn == turn).Select(
                c => new EmployeeDto
            {
                Id          = c.ID,
                Name        = c.Name,
                Surname     = c.Surname,
                CountryName = c.Country1.Name,
                Date        = c.Date,
                Turn        = c.Turn,
                Price       = c.Price
            }).ToList();

            return(list);
        }
Beispiel #2
0
        /// <summary>
        /// Devuelve la lista de los horarios de HOY segun un turno especifico.
        /// </summary>
        /// <param name="numTurn"></param>
        /// <returns></returns>
        public List <HorariosDto> ListarPorTurno(int numTurn)
        {
            var turn = new EnumTurns();

            switch (numTurn)
            {
            case 0:
                turn = EnumTurns.Morning;
                break;

            case 1:
                turn = EnumTurns.Late;
                break;

            case 2:
                turn = EnumTurns.Night;
                break;
            }

            var list     = new List <HorariosDto>();
            var porTurno = this.horarioRepository.Read()
                           .Where(c => c.Employees.Turn == turn);

            foreach (var empleado in porTurno)
            {
                if (empleado.StartlHour.Date == DateTime.Today)
                {
                    list.Add(new HorariosDto()
                    {
                        Id         = empleado.ID,
                        EmployeeId = empleado.EmployeeId,
                        StartlHour = empleado.StartlHour,
                        FinishHour = empleado.FinishHour
                    });
                }
            }
            ;
            return(list);
        }
Beispiel #3
0
    /// <summary>
    /// Allows the game to be played again, without loosing the information about the scores.
    /// </summary>
    public void ReloadGame()
    {
        IsOver = 0;
        UIC.txtRestart.text = "Restart Game";
        Blocks.Blue1stMove  = 0;
        Blocks.Red1stMove   = 0;
        Grid.PaintBoard();
        subfaseGC             = EnumSubFases.Inicial;
        faseGC                = EnumFases.Hiding;
        turnGC                = EnumTurns.BluesTurn;
        diceValor             = 0;
        BlueMoves             = 0;
        RedMoves              = 0;
        RolledDice            = 1;
        Blocks.blocksInserted = 0;
        Grid.ReloadBoard();
        UIC.TutorialMSG.SetActive(false);

        /*if (faseGC != EnumFases.Ending)
         * {
         *  UIController.bluePoints = 0;
         *  UIController.redPoints = 0;
         * }*/
    }
Beispiel #4
0
 /// <summary>
 /// Checks whos turn it is and pass to the next.
 /// </summary>
 public void ChangeTurn()
 {
     if (faseGC != EnumFases.Hiding)
     {
         if (turnGC == EnumTurns.BluesTurn)
         {
             if (BlueMoves <= 0)
             {
                 BlueMoves = 0;
                 turnGC    = EnumTurns.RedsTurn;
             }
         }
         else
         {
             if (RedMoves <= 0)
             {
                 RedMoves   = 0;
                 diceValor  = 0;
                 RolledDice = 1;
                 turnGC     = EnumTurns.BluesTurn;
             }
         }
     }
 }