public virtual ActionResult Edit(ClassSession model) { if (!ModelState.IsValid) { return View(model); } model.ReBind(); var result = _sessionService.EditClassSession(model); if (!result.IsSuccessfull) { this.NotificationController().Notify(result.Message, NotificationStatus.Error); return View(model); } return RedirectToAction(MVC.Session.ActionNames.Add, MVC.Session.Name, new { classId = model.ClassId }); }
public virtual ActionResult Add(ClassSession model) { if (!ModelState.IsValid) { return View(model); } model.ReBind(); var result = _sessionService.AddClassSession(model); if (!result.IsSuccessfull) { this.NotificationController().Notify(result.Message, NotificationStatus.Error); return View(model); } if (!model.IsCanceled) this.NotificationController().Notify(string.Format(LocalMessage.SessionMaterialAddress, result.Message), NotificationStatus.Success); return RedirectToAction(MVC.Session.ActionNames.Add, MVC.Session.Name, new { classId = model.ClassId }); }