コード例 #1
0
        public async Task <IActionResult> Create([Bind("PolicyID,PolicyLocationID,LocationNumber,LocationDescription,LocationAddress,LocationCity,LocationState,LocationZip")] PolicyLocation policyLocation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(policyLocation);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(policyLocation));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("OutageID,StartDate,EndDate,Application,Description")] Outage outage)
        {
            if (ModelState.IsValid)
            {
                _context.Add(outage);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(outage));
        }
コード例 #3
0
        public async Task <IActionResult> Create([Bind("PolicyID,PolicyNumber,EffectiveDate,ExpirationDate,PremiumAmount,InsuredName")] Policy policy)
        {
            if (ModelState.IsValid)
            {
                _context.Add(policy);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(policy));
        }