Ejemplo n.º 1
0
 public ActionResult Create()
 {
     RequisitionTeam requisitionteam = new RequisitionTeam();
     ViewBag.PossibleRequisitions = requisitionRepository.All;
     ViewBag.PossibleRequisitionTeamCategories = requisitionteamcategoryRepository.All;
     ViewBag.PossibleRequisitionTeamUsers = userRepository.All;
     return View(requisitionteam);
 }
Ejemplo n.º 2
0
 public ActionResult Create(RequisitionTeam requisitionteam)
 {
     if (ModelState.IsValid) {
         requisitionteamRepository.InsertOrUpdate(requisitionteam);
         requisitionteamRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleRequisitions = requisitionRepository.All;
         ViewBag.PossibleRequisitionTeamCategories = requisitionteamcategoryRepository.All;
         ViewBag.PossibleRequisitionTeamUsers = userRepository.All;
         return View(requisitionteam);
     }
 }
Ejemplo n.º 3
0
 public ViewResult Search(RequisitionTeam searchRequisitionTeam)
 {
     if(searchRequisitionTeam!=null)
     {
                     }
                 return View("Index",requisitionteamRepository.AllIncluding(requisitionteam => requisitionteam.Requisition, requisitionteam => requisitionteam.RequisitionTeamCategory, requisitionteam => requisitionteam.RequisitionTeamUser));
 }
Ejemplo n.º 4
0
 public void InsertOrUpdate(RequisitionTeam requisitionteam)
 {
     if (requisitionteam.RequisitionTeamID == default(int)) {
         // New entity
         context.RequisitionTeam.Add(requisitionteam);
     } else {
         // Existing entity
         context.Entry(requisitionteam).State = EntityState.Modified;
     }
 }