예제 #1
0
        public async Task <IActionResult> Create([Bind("VatId,Vat1")] Vat vat)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vat);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(vat));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("WoodId,Wood1")] Wood wood)
        {
            if (ModelState.IsValid)
            {
                _context.Add(wood);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(wood));
        }
예제 #3
0
        public async Task <IActionResult> Create([Bind("ColourId,Colour")] Colours colours)
        {
            if (ModelState.IsValid)
            {
                _context.Add(colours);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(colours));
        }
예제 #4
0
        public async Task <IActionResult> Create([Bind("DetailId,AccessoryId,OrderId")] Details details)
        {
            if (ModelState.IsValid)
            {
                _context.Add(details);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(details));
        }
예제 #5
0
        public async Task <IActionResult> Create([Bind("Username,Password,UserType,CustomerId")] Auth auth)
        {
            if (ModelState.IsValid)
            {
                _context.Add(auth);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(auth));
        }
예제 #6
0
        public async Task <IActionResult> Create([Bind("ProductionProcessId,ProductionProcess1")] ProductionProcess productionProcess)
        {
            if (ModelState.IsValid)
            {
                _context.Add(productionProcess);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(productionProcess));
        }
예제 #7
0
        public async Task <IActionResult> Create([Bind("BoatId,Model,BoatType,NumberOfRowers,Colour,Wood,BasePrice,Vat")] Boat boat)
        {
            if (ModelState.IsValid)
            {
                _context.Add(boat);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(boat));
        }
        public async Task <IActionResult> Create([Bind("SalesPersonId,FirstName,SecondName")] SalesPerson salesPerson)
        {
            if (ModelState.IsValid)
            {
                _context.Add(salesPerson);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(salesPerson));
        }
예제 #9
0
        public async Task <IActionResult> Create([Bind("ContractId,Date,DateDepositPayed,OrderId,ContractTotalPrice,ContractTotalPriceIncVat,ProductionProcess")] Contract contract)
        {
            if (ModelState.IsValid)
            {
                _context.Add(contract);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(contract));
        }
예제 #10
0
        public async Task <IActionResult> Create([Bind("BoatTypeId,BoatType1")] BoatType boatType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(boatType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(boatType));
        }
        public async Task <IActionResult> Create([Bind("AccessoryId1,AccName,DescriptionOfAccessory,Price,Vat,Inventory,PartnerId")] AccessoryId accessoryId)
        {
            if (ModelState.IsValid)
            {
                _context.Add(accessoryId);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(accessoryId));
        }
예제 #12
0
        public async Task <IActionResult> Create([Bind("CustomerId,FirstName,SecondName,DateOfBirth,Address,City,Email,PhoneNumber,IdNumber,IdDocumentName")] Customers customers)
        {
            if (ModelState.IsValid)
            {
                _context.Add(customers);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customers));
        }
예제 #13
0
        public async Task <IActionResult> Create([Bind("OrderId,Date,SelesPersonId,CustomerId,BoatId,DeliveryAddress,City")] Orders orders)
        {
            if (ModelState.IsValid)
            {
                _context.Add(orders);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(orders));
        }
        public async Task <IActionResult> Create([Bind("DocumentNameId,DocumentName1")] DocumentName documentName)
        {
            if (ModelState.IsValid)
            {
                _context.Add(documentName);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(documentName));
        }
예제 #15
0
        public async Task <IActionResult> Create([Bind("PartnerId,Name,Address,City")] Partners partners)
        {
            if (ModelState.IsValid)
            {
                _context.Add(partners);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(partners));
        }
예제 #16
0
        public async Task <IActionResult> Create([Bind("FitId,AccessoryId,BoatId")] Fit fit)
        {
            if (ModelState.IsValid)
            {
                _context.Add(fit);
                await _context.SaveChangesAsync();

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