public IActionResult Create(CUSTOMER cUSTOMER)
 {
     if (ModelState.IsValid)
     {
         _context.CUSTOMER.Add(cUSTOMER);
         _context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cUSTOMER));
 }
 public IActionResult Create(AIRCRAFT aIRCRAFT)
 {
     if (ModelState.IsValid)
     {
         _context.AIRCRAFT.Add(aIRCRAFT);
         _context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewData["MOD_CODE"] = new SelectList(_context.MODEL, "MOD_CODE", "MOD_CODENavigation", aIRCRAFT.MOD_CODE);
     return(View(aIRCRAFT));
 }
Exemple #3
0
        public IActionResult Create(CHARTER cHARTER)
        {
            if (ModelState.IsValid)
            {
                _context.CHARTER.Add(cHARTER);
                _context.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewData["AC_NUMBER"] = new SelectList(_context.AIRCRAFT, "AC_NUMBER", "AC_NUMBERNavigation", cHARTER.AC_NUMBER);

            ViewData["CUS_CODE"] = new SelectList(_context.CUSTOMER, "CUS_CODE", "CUS_CODENavigation", cHARTER.CUS_CODE);
            return(View(cHARTER));
        }