Exemplo n.º 1
0
 public ActionResult Create(HolidayCalendar holidaycalendar)
 {
     if (ModelState.IsValid) {
         holidaycalendarRepository.InsertOrUpdate(holidaycalendar);
         holidaycalendarRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View(holidaycalendar);
     }
 }
Exemplo n.º 2
0
 public void InsertOrUpdate(HolidayCalendar holidaycalendar)
 {
     if (holidaycalendar.HolidayCalendarID == default(int)) {
         // New entity
         context.HolidayCalendar.Add(holidaycalendar);
     } else {
         // Existing entity
         context.Entry(holidaycalendar).State = EntityState.Modified;
     }
 }
Exemplo n.º 3
0
 public ActionResult Create()
 {
     HolidayCalendar holidaycalendar = new HolidayCalendar();
     return View(holidaycalendar);
 }
Exemplo n.º 4
0
 public ViewResult Search(HolidayCalendar searchHolidayCalendar)
 {
     if(searchHolidayCalendar!=null)
     {
                     }
                 return View("Index",holidaycalendarRepository.All);
 }