コード例 #1
0
        public void Init()
        {
            Context = new TicketManagementContext();
            Data    = new DataProvider(Context);

            manager = Data.SeatManager;

            Data.Clear();

            venue = new Venue()
            {
                Description = "asdasd",
                Address     = "asdas",
                Phone       = "asdasd"
            };
            venue.Id = Data.VenueManager.Save(venue);

            layout = new Layout()
            {
                Description = "asdasd",
                VenueId     = venue.Id
            };
            layout.Id = Data.LayoutManager.Save(layout, Data.VenueManager);

            area = new Area()
            {
                Description = "asdasdas",
                LayoutId    = layout.Id,
                CoordX      = 10,
                CoordY      = 10,
            };
            area.Id = Data.AreaManager.Save(area, Data.LayoutManager, Data.SeatManager);
        }
コード例 #2
0
        public void Init()
        {
            Context = new TicketManagementContext();
            Data    = new DataProvider(Context);
            manager = Data.VenueManager;

            Data.Clear();
        }
コード例 #3
0
        public void Init()
        {
            Context = new TicketManagementContext();
            Data    = new DataProvider(Context);

            manager = Data.LayoutManager;

            Data.Clear();

            venue = new Venue()
            {
                Address     = "addr",
                Description = "asdasdasd",
                Phone       = "000"
            };
            venue.Id = Data.VenueManager.Save(venue);
        }
コード例 #4
0
        public void Init()
        {
            Context = new TicketManagementContext();
            Data    = new DataProvider(Context);
            manager = Data.EventManager;

            Data.Clear();

            var venue = new Venue()
            {
                Address     = "sadasd",
                Description = "asdsadas",
                Phone       = "000",
            };

            venue.Id = Data.VenueManager.Save(venue);

            layout = new Layout()
            {
                Description = "asdadas",
                VenueId     = venue.Id,
            };
            layout.Id = Data.LayoutManager.Save(layout, Data.VenueManager);

            var area = new Area()
            {
                CoordX      = 10,
                CoordY      = 20,
                Description = "asdasd",
                LayoutId    = layout.Id,
            };

            area.Id = Data.AreaManager.Save(area, Data.LayoutManager, Data.SeatManager);

            var seat = new Seat()
            {
                AreaId = area.Id,
                Number = 3,
                Row    = 3
            };

            seat.Id = Data.SeatManager.Save(seat, Data.AreaManager);

            var venueWS = new Venue()
            {
                Address     = "venueWS",
                Description = "venueWS",
                Phone       = "000",
            };

            venueWS.Id = Data.VenueManager.Save(venueWS);

            layoutWithoutSeats = new Layout()
            {
                Description = "layoutWS",
                VenueId     = venueWS.Id,
            };
            layoutWithoutSeats.Id = Data.LayoutManager.Save(layoutWithoutSeats, Data.VenueManager);

            var areaWS = new Area()
            {
                CoordX      = 12,
                CoordY      = 15,
                Description = "areaWS",
                LayoutId    = layoutWithoutSeats.Id,
            };

            areaWS.Id = Data.AreaManager.Save(areaWS, Data.LayoutManager, Data.SeatManager);
        }