public PartialViewResult _AddDailyRoutine(CreateDailyRoutineAndImportantNotice model) { if (ModelState.IsValid) { return(PartialView("_AddDailyRoutine")); } return(PartialView(model)); }
public PartialViewResult CreateImportantNotice(CreateDailyRoutineAndImportantNotice model) { Toddler toddler = GetCurrentToddler(); if (ModelState.IsValid) { toddler.ImportantNotice = model.toddler.ImportantNotice; db.Entry(toddler).State = EntityState.Modified; db.SaveChanges(); } return(PartialView("_ListImportantNotice", toddler)); }
/**DAILYROUTINE / IMPORTANT NOTICE***************/ // GET: Administration/Children/DailyRoutine public PartialViewResult _AddDailyRoutine() { Toddler toddler = GetCurrentToddler(); CreateDailyRoutineAndImportantNotice cdrin = new CreateDailyRoutineAndImportantNotice(); if (toddler != null) { cdrin.toddler = toddler; } else { cdrin.toddler = new Toddler(); } return(PartialView(cdrin)); }