예제 #1
0
 public ActionResult Create()
 {
     ContactFolderOwner contactfolderowner = new ContactFolderOwner();
     ViewBag.PossibleContactFolders = contactfolderRepository.All;
     ViewBag.PossibleShareWithUsers = userRepository.All;
     return View(contactfolderowner);
 }
예제 #2
0
 public ActionResult Create(ContactFolderOwner contactfolderowner)
 {
     if (ModelState.IsValid) {
         contactfolderownerRepository.InsertOrUpdate(contactfolderowner);
         contactfolderownerRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleContactFolders = contactfolderRepository.All;
         ViewBag.PossibleShareWithUsers = userRepository.All;
         return View(contactfolderowner);
     }
 }
예제 #3
0
 public ViewResult Search(ContactFolderOwner searchContactFolderOwner)
 {
     if(searchContactFolderOwner!=null)
     {
                     }
                 return View("Index",contactfolderownerRepository.AllIncluding(contactfolderowner => contactfolderowner.ContactFolder, contactfolderowner => contactfolderowner.ShareWithUser));
 }
예제 #4
0
 public void InsertOrUpdate(ContactFolderOwner contactfolderowner)
 {
     if (contactfolderowner.ContactFolderOwnerID == default(int)) {
         // New entity
         context.ContactFolderOwner.Add(contactfolderowner);
     } else {
         // Existing entity
         context.Entry(contactfolderowner).State = EntityState.Modified;
     }
 }