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