コード例 #1
0
        private void SaveSeats(Group group, int seatNumber, int projectionId)
        {
            List <Seat> seats = new List <Seat>();


            for (int i = 0; i < group.Totalrow; i++)
            {
                for (int j = 0; j < group.Totalcolumn; j++)
                {
                    Seat seat = new Seat();
                    seat.GroupId      = group.Id;
                    seat.Rownumber    = i;
                    seat.Columnnumber = j;
                    seat.Seatname     = group.GroupName + j + i;
                    Seat isAvailable = ws.GetByRowAndColumn(0, group.Id, i, j);
                    if (isAvailable.Status == STATUS.FUERA_SERVICIO.ToString())
                    {
                        seat.Status = STATUS.FUERA_SERVICIO.ToString();
                    }
                    else
                    {
                        seat.Status = STATUS.DISPONIBLE.ToString();
                    }
                    seat.Seatname     = seatNumber.ToString();
                    seat.ProjectionId = projectionId;
                    seats.Add(seat);
                    seatNumber++;
                }
            }
            ws.AddAll(seats);
        }
コード例 #2
0
        private void SaveSeats(Group group)
        {
            List <Seat> seats = new List <Seat>();

            for (int i = 0; i < group.Totalrow; i++)
            {
                for (int j = 0; j < group.Totalcolumn; j++)
                {
                    Seat seat = new Seat();
                    seat.GroupId      = group.Id;
                    seat.Rownumber    = i;
                    seat.Columnnumber = j;
                    seat.Seatname     = group.GroupName + j + i;
                    seat.Status       = STATUS.DISPONIBLE.ToString();
                    seat.Seatname     = seatNumber.ToString();
                    seats.Add(seat);
                    seatNumber++;
                }
            }
            workSeat.AddAll(seats);
        }