コード例 #1
0
        public async Task <IActionResult> Create([Bind("GROUPID,COMPONENTID,id")] GroupComponents groupComponents)
        {
            if (ModelState.IsValid)
            {
                _context.Add(groupComponents);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(groupComponents));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("id,MODELTYPE,MSIZE,TOPTUBE,CHAINSTAY,TOTALLENGTH,GROUNDCLEARANCE,HEADTUBEANGLE,SEATTUBEANGEL")] ModelSize modelSize)
        {
            if (ModelState.IsValid)
            {
                _context.Add(modelSize);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(modelSize));
        }
コード例 #3
0
        public async Task <IActionResult> Create([Bind("LETTERSTYLE,DESCRIPTION")] LetterStyle letterStyle)
        {
            if (ModelState.IsValid)
            {
                _context.Add(letterStyle);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(letterStyle));
        }
コード例 #4
0
        public async Task <IActionResult> Create([Bind("SERIALNUMBER,COMPONENTID,SUBSTITUTEID,LOCATION,QUANTITY,DATEINSTALLED,EMPLOYEEID,id")] BikeParts bikeParts)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bikeParts);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bikeParts));
        }
コード例 #5
0
        public async Task <IActionResult> Create([Bind("WORKAREAID,DESCRIPTION")] WorkArea workArea)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workArea);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(workArea));
        }
コード例 #6
0
        public async Task <IActionResult> Create([Bind("id,PURCHASEID,COMPONENTID,PRICEPAID,QUANTITY,QUANTITYRECEIVED")] PurchaseItem purchaseItem)
        {
            if (ModelState.IsValid)
            {
                _context.Add(purchaseItem);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(purchaseItem));
        }
コード例 #7
0
        public async Task <IActionResult> Create([Bind("PAINTID,COLORNAME,COLORSTYLE,COLORLIST,DATEINTRODUCED")] Paint paint)
        {
            if (ModelState.IsValid)
            {
                _context.Add(paint);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(paint));
        }
コード例 #8
0
        public async Task <IActionResult> Create([Bind("TUBEID,MATERIAL,DESCRIPTION,DIAMETER,THICKNESS,ROUNDNESS,WEIGHT,STIFFNESS,LISTPRICE,CONSTRUCTION")] TubeMaterial tubeMaterial)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tubeMaterial);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tubeMaterial));
        }
コード例 #9
0
        public async Task <IActionResult> Create([Bind("COMPONENTNAME,ASSEMBLYORDER,DESCRIPTION")] ComponentName componentName)
        {
            if (ModelState.IsValid)
            {
                _context.Add(componentName);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(componentName));
        }
コード例 #10
0
        public async Task <IActionResult> Create([Bind("CUSTOMERID,TRANSACTIONDATE,EMPLOYEEID,AMOUNT,DESCRIPTION,REFERENCE,id")] CustomerTransaction customerTransaction)
        {
            if (ModelState.IsValid)
            {
                _context.Add(customerTransaction);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customerTransaction));
        }
コード例 #11
0
        public async Task <IActionResult> Create([Bind("CUSTOMERID,PHONE,FIRSTNAME,LASTNAME,ADDRESS,ZIPCODE,CITYID,BALANCEDUE")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(customer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customer));
        }
コード例 #12
0
        public async Task <IActionResult> Create([Bind("STATE,TAXRATE")] StateTaxRate stateTaxRate)
        {
            if (ModelState.IsValid)
            {
                _context.Add(stateTaxRate);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(stateTaxRate));
        }
コード例 #13
0
        public async Task <IActionResult> Create([Bind("COMPONENTID,MANUFACTURERID,PRODUCTNUMBER,ROAD,CATEGORY,LENGTH,HEIGHT,WIDTH,WEIGHT,YEAR,ENDYEAR,DESCRIPTION,LISTPRICE,ESTIMATEDCOST,QUANTITYONHAND")] Component component)
        {
            if (ModelState.IsValid)
            {
                _context.Add(component);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(component));
        }
コード例 #14
0
        public async Task <IActionResult> Create([Bind("PURCHASEID,EMPLOYEEID,MANUFACTURERID,TOTALLIST,SHIPPINGCOST,DISCOUNT,ORDERDATE,RECEIVEDATE,AMOUNTDUE")] PurchaseOrder purchaseOrder)
        {
            if (ModelState.IsValid)
            {
                _context.Add(purchaseOrder);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(purchaseOrder));
        }
コード例 #15
0
        public async Task <IActionResult> Create([Bind("EMPLOYEEID,TAXPAYERID,LASTNAME,FIRSTNAME,HOMEPHONE,ADDRESS,ZIPCODE,CITYID,DATEHIRED,DATERELEASED,CURRENTMANAGER,SALARYGRADE,SALARY,TITLE,WORKAREA")] Employee employee)
        {
            if (ModelState.IsValid)
            {
                _context.Add(employee);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(employee));
        }
コード例 #16
0
        public async Task <IActionResult> Create([Bind("DATEVALUE,MADECOUNT")] TempDateMade tempDateMade)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tempDateMade);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tempDateMade));
        }
コード例 #17
0
        public async Task <IActionResult> Create([Bind("COMPONENTGROUPID,GROUPNAME,BIKETYPE,YEAR,ENDYEAR,WEIGHT")] GroupO groupO)
        {
            if (ModelState.IsValid)
            {
                _context.Add(groupO);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(groupO));
        }
コード例 #18
0
        public async Task <IActionResult> Create([Bind("ID,LASTNAME,FIRSTNAME,GENDER")] SampleName sampleName)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sampleName);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sampleName));
        }
コード例 #19
0
        public async Task <IActionResult> Create([Bind("SERIALNUMBER,CUSTOMERID,MODELTYPE,PAINTID,FRAMESIZE,ORDERDATE,STARTDATE,SHIPDATE,SHIPEMPLOYEE,FRAMEASSEMBLER,PAINTER,CONSTRUCTION,WATERBOTTLEBRAZEONS,CUSTOMNAME,LETTERSTYLEID,STOREID,EMPLOYEEID,TOPTUBE,CHAINSTAY,HEADTUBEANGLE,SEATTUBEANGLE,LISTPRICE,SALEPRICE,SALESTAX,SALESTATE,SHIPPRICE,FRAMEPRICE,COMPONENTLIST")] Bicycle bicycle)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bicycle);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bicycle));
        }
コード例 #20
0
        public async Task <IActionResult> Create([Bind("STOREID,STORENAME,PHONE,CONTACTFIRSTNAME,CONTACTLASTNAME,ADDRESS,ZIPCODE,CITYID")] RetailStore retailStore)
        {
            if (ModelState.IsValid)
            {
                _context.Add(retailStore);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(retailStore));
        }
コード例 #21
0
        public async Task <IActionResult> Create([Bind("id,MANUFACTURERID,TRANSACTIONDATE,EMPLOYEEID,AMOUNT,DESCRIPTION,REFERENCE")] ManufacturerTransaction manufacturerTransaction)
        {
            if (ModelState.IsValid)
            {
                _context.Add(manufacturerTransaction);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(manufacturerTransaction));
        }
コード例 #22
0
        public async Task <IActionResult> Create([Bind("MANUFACTURERID,MANUFACTURERNAME,CONTACTNAME,PHONE,ADDRESS,ZIPCODE,CITYID,BALANCEDUE")] Manufacturer manufacturer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(manufacturer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(manufacturer));
        }
コード例 #23
0
        public async Task <IActionResult> Create([Bind("ID,BASEADDRESS")] SampleStreet sampleStreet)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sampleStreet);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sampleStreet));
        }
コード例 #24
0
        public async Task <IActionResult> Create([Bind("ITEMNAME,VALUE,DESCRIPTION,DATECHANGED")] Preference preference)
        {
            if (ModelState.IsValid)
            {
                _context.Add(preference);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(preference));
        }
コード例 #25
0
        public async Task <IActionResult> Create([Bind("ID,VERSION,CHANGEDATE,NAME,REVISIONCOMMENTS")] RevisionHistory revisionHistory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(revisionHistory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(revisionHistory));
        }
コード例 #26
0
        public async Task <IActionResult> Create([Bind("CityId,ZIPCODE,CITY,STATE,AREACODE,POPULATION1990,POPULATION1980,COUNTRY,LATITUDE,LONGITUDE,POPULATIONCDF")] City city)
        {
            if (ModelState.IsValid)
            {
                _context.Add(city);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(city));
        }
コード例 #27
0
        public async Task <IActionResult> Create([Bind("SERIALNUMBER,TUBEID,QUANTITY,id")] BicycleTubeUsage bicycleTubeUsage)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bicycleTubeUsage);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bicycleTubeUsage));
        }
コード例 #28
0
        public async Task <IActionResult> Create([Bind("ID,MODELTYPE,FRAMESIZE")] CommonSizes commonSizes)
        {
            if (ModelState.IsValid)
            {
                _context.Add(commonSizes);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(commonSizes));
        }
コード例 #29
0
        public async Task <IActionResult> Create([Bind("MODELTYPE,DESCRIPTION,COMPONENTID")] ModelType modelType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(modelType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(modelType));
        }
コード例 #30
0
        public async Task <IActionResult> Create([Bind("ID,SERIALNUMBER,TUBENAME,TUBEID,LENGTH")] BikeTubes bikeTubes)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bikeTubes);
                await _context.SaveChangesAsync();

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