public ActionResult CreateModuleDay(int?dayId, int?moduleId) { ModuleDay moduleDay = new ModuleDay(); if (dayId == null) { moduleDay.ModuleId = Convert.ToInt32(moduleId); } else { moduleDay = Models.ModuleDay.GetDay(dayId).First(); } return(PartialView(moduleDay)); }
public ActionResult CreateModuleDay(ModuleDay moduleDay) { moduleDay.Save(); return(Redirect(Request.UrlReferrer.ToString())); }