public ActionResult Create(VendorNoteCategory vendornotecategory)
 {
     if (ModelState.IsValid) {
         vendornotecategoryRepository.InsertOrUpdate(vendornotecategory);
         vendornotecategoryRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View(vendornotecategory);
     }
 }
 public ViewResult Search(VendorNoteCategory searchVendorNoteCategory)
 {
     if(searchVendorNoteCategory!=null)
     {
                     }
                 return View("Index",vendornotecategoryRepository.All);
 }
 public ActionResult Create()
 {
     VendorNoteCategory vendornotecategory = new VendorNoteCategory();
     return View(vendornotecategory);
 }
Exemplo n.º 4
0
 public void InsertOrUpdate(VendorNoteCategory vendornotecategory)
 {
     if (vendornotecategory.VendorNoteCategoryID == default(int)) {
         // New entity
         context.VendorNoteCategory.Add(vendornotecategory);
     } else {
         // Existing entity
         context.Entry(vendornotecategory).State = EntityState.Modified;
     }
 }