Example #1
0
 public void AddEvent()
 {
     for (int i = 0; i < 20; i++)
     {
         var @event = new Events()
         {
             EventName = "PSquare Live " + i,
             EventDate = DateTime.Today.AddDays(i * 5),
             Time = DateTime.MinValue.AddHours(10).ToString("HH:mm"),
             Venue = "Muson",
             ImageThumbNailPath = ((i % 12) + 1) + ".jpg",
             TicketPrice = 10.ToString("c")
         };
         this._eventRepository.Create(@event);
     }
 }
Example #2
0
 public ActionResult Edit(Events eventItem)
 {
     eventItem.EventDate = DateTime.Parse(eventItem.EventDateString);
     _eventsService.Update(eventItem);
     return RedirectToAction("Index");
 }