コード例 #1
0
 public ActionResult Create(VendorServiceCategory vendorservicecategory)
 {
     if (ModelState.IsValid) {
         vendorservicecategoryRepository.InsertOrUpdate(vendorservicecategory);
         vendorservicecategoryRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View(vendorservicecategory);
     }
 }
コード例 #2
0
 public ViewResult Search(VendorServiceCategory searchVendorServiceCategory)
 {
     if(searchVendorServiceCategory!=null)
     {
                     }
                 return View("Index",vendorservicecategoryRepository.All);
 }
コード例 #3
0
 public ActionResult Create()
 {
     VendorServiceCategory vendorservicecategory = new VendorServiceCategory();
     return View(vendorservicecategory);
 }
コード例 #4
0
 public void InsertOrUpdate(VendorServiceCategory vendorservicecategory)
 {
     if (vendorservicecategory.VendorServiceCategoryID == default(int)) {
         // New entity
         context.VendorServiceCategory.Add(vendorservicecategory);
     } else {
         // Existing entity
         context.Entry(vendorservicecategory).State = EntityState.Modified;
     }
 }