Example #1
0
        public void GenerateSeats()
        {
            EnumSeatStatus seatstatus;

            foreach (var item in MovieHalls)
            {
                for (int i = 1; i <= 3; i++)
                {
                    for (int x = 1; x <= 10; x++)
                    {
                        Random rng = new Random();
                        Thread.Sleep(1);
                        int random = rng.Next(0, 10);

                        if (random > 3)
                        {
                            seatstatus = EnumSeatStatus.E;
                        }
                        else
                        {
                            seatstatus = EnumSeatStatus.T;
                        }

                        Thread.Sleep(1);
                        Halls.Add(new Halls()
                        {
                            HallNo = item.HallId, TotalRow = i, TotalColumn = x, Seats = i + "," + x, SeatStatus = seatstatus
                        });
                    }
                }
            }
        }
Example #2
0
 public void GenerateHall()
 {
     Halls.Add(new Halls()
     {
         Id          = 001,
         HallNo      = "001",
         TotalColumn = 10,
         TotalRow    = 3
     });
 }