public ActionResult Create(int organizationId)
 {
     OrganizationHolidayCalendar organizationholidaycalendar = new OrganizationHolidayCalendar();
     organizationholidaycalendar.OrganizationID = organizationId;
     ViewBag.PossibleHolidayCalendars = holidaycalendarRepository.All;
     return View(organizationholidaycalendar);
 }
 public ActionResult Create(OrganizationHolidayCalendar organizationholidaycalendar,int organizationId)
 {
     if (ModelState.IsValid) {
         organizationholidaycalendarRepository.InsertOrUpdate(organizationholidaycalendar);
         organizationholidaycalendarRepository.Save();
         return RedirectToAction("Index",new { organizationId=organizationId });
     } else {
         ViewBag.PossibleHolidayCalendars = holidaycalendarRepository.All;
         return View(organizationholidaycalendar);
     }
 }
 public void InsertOrUpdate(OrganizationHolidayCalendar organizationholidaycalendar)
 {
     if (organizationholidaycalendar.OrganizationHolidayCalendarID == default(int)) {
         // New entity
         context.OrganizationHolidayCalendar.Add(organizationholidaycalendar);
     } else {
         // Existing entity
         context.Entry(organizationholidaycalendar).State = EntityState.Modified;
     }
 }
 public ViewResult Search(OrganizationHolidayCalendar searchOrganizationHolidayCalendar,int organizationId)
 {
     if(searchOrganizationHolidayCalendar!=null)
     {
                     }
                 return View("Index",organizationholidaycalendarRepository.AllIncluding(organizationId,organizationholidaycalendar => organizationholidaycalendar.Organization));
 }