Пример #1
0
 public ActionResult Edit(int id, FormCollection collection)
 {
     try
     {
         // TODO: Add update logic here
         var model = TrainingNeedAssessment.GetById(id);
         TryUpdateModel(model);
         model.SaveOrUpDate();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Пример #2
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         var model = new TrainingNeedAssessment();
         TryUpdateModel(model);
         model.CreatedAt = DateTime.Now;
         model.CreatedBy = SessionItems.CurrentUser.UserID;
         model.Insert();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Пример #3
0
 // GET: TrainingNeedAssessment/Edit/5
 public ActionResult Edit(int id)
 {
     return(View(TrainingNeedAssessment.GetById(id)));
 }
Пример #4
0
 // GET: TrainingNeedAssessment
 public ActionResult Index()
 {
     return(View(TrainingNeedAssessment.GetAll()));
 }