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