public virtual ActionResult Edit(int id, CustProjectModel editedprj)
 {
     var toedit = Repository.Single<CustomerProject>(x => x.ID == id);
     if (ModelState.IsValid)
     {
         TryUpdateModel(toedit);
         Repository.Save();
         return RedirectToAction(MVC.CustomerProject.TodoList());
     }
     ModelState.AddModelError("", Resources.Editfailure);
     return View(editedprj);
 }
 public virtual ActionResult Create(CustProjectModel toadd)
 {
     if (ModelState.IsValid)
     {
         var newprj = new CustomerProject {ProjectTypeId = 9, IsFinished = false, DisContinued = false};
         TryUpdateModel(newprj);
         var service = new CustProjectService(Repository);
         service.AddProject(newprj, CurrentUser.UserId);
         return RedirectToAction(MVC.CustomerProject.TodoList());
     }
     return View(toadd);
 }