public ActionResult createSeminarTask(Task post)
        {
            if (post.TaskID > 0)
                db.editSeminarTask(post);
            else
                db.createSeminarTask(post);

            return RedirectToAction("Seminars", new { SelectedItemID = post.SeminarID });
        }
 public void createSeminarTask(Task task)
 {
     db.Tasks.Add(task);
     db.SaveChanges();
 }
 public ActionResult createSeminarTask(int Id)
 {
     Task model = new Task() { SeminarID = Id };
     ViewBag.TaskTypeID = new SelectList(db.getTaskTypes(),"TaskTypeID","TaskTypeDescription");
     return View(model);
 }
        public void editSeminarTask(Task task)
        {
            Task editTask = db.Tasks.Find(task.TaskID);
            editTask.TaskTypeID = task.TaskTypeID;
            editTask.TaskCode = task.TaskCode;
            editTask.TaskName = task.TaskName;
            editTask.SumScores = task.SumScores;

            db.SaveChanges();
        }