コード例 #1
0
        public async Task <IActionResult> Create([Bind("ID,ClientContactPerson,ClientContactNumber,ClientCompanyName,ClientRateSheetID,LastUpdateDate")] ClientClass clientClass)
        {
            if (ModelState.IsValid)
            {
                _context.Add(clientClass);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(clientClass));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("ID,Name,UserName,Password,MobileNumber,AuthorityLevel")] Staff_class staff_class)
        {
            if (ModelState.IsValid)
            {
                _context.Add(staff_class);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(staff_class));
        }
コード例 #3
0
        public async Task <IActionResult> Create([Bind("ContainerNumber,OceanFreightETA,TimeToYard,ClientCompanyName,HandlerName,IfCartageOnly,IfRequireDelivery,IfRequireStorage,IfBookedCartage,IfEnteredCartonCloud,ChargeFrom,IfExtraLeg,IfInvoiced")] ContainerClass containerClass)
        {
            if (ModelState.IsValid)
            {
                _context.Add(containerClass);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(containerClass));
        }