예제 #1
0
 public SeatQuantity(SeatType seat, int quantity)
 {
     Seat = seat;
     Quantity = quantity;
 }
예제 #2
0
 public SeatQuantity(SeatType seat, int quantity)
 {
     Seat     = seat;
     Quantity = quantity;
 }
        private static ConferenceInfo BuildConferenceInfo(Table seats, string conferenceSlug)
        {
            var conference = new ConferenceInfo()
            {
                Description = Constants.UI.ConferenceDescription +  " (" + conferenceSlug + ")",
                Name = conferenceSlug,
                Slug = conferenceSlug,
                Location = Constants.UI.Location,
                Tagline = Constants.UI.TagLine,
                TwitterSearch = Constants.UI.TwitterSearch,
                StartDate = DateTime.Now,
                EndDate = DateTime.Now.AddDays(1),
                OwnerName = "test",
                OwnerEmail = "*****@*****.**",
                IsPublished = true,
                WasEverPublished = true
            };

            foreach (var row in seats.Rows)
            {
                var seat = new SeatType()
                {
                    Id = Guid.NewGuid(),
                    Description = row["seat type"],
                    Name = row["seat type"],
                    Price = Convert.ToDecimal(row["rate"].Replace("$", "")),
                    Quantity = Convert.ToInt32(row["quota"])
                };
                conference.Seats.Add(seat);
            }

            return conference;
        }