public async Task <IActionResult> Edit(string id, [Bind("LETTERSTYLE,DESCRIPTION")] LetterStyle letterStyle)
        {
            if (id != letterStyle.LETTERSTYLE)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(letterStyle);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LetterStyleExists(letterStyle.LETTERSTYLE))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(letterStyle));
        }
Пример #2
0
        public async Task <IActionResult> Edit(decimal id, [Bind("GROUPID,COMPONENTID,id")] GroupComponents groupComponents)
        {
            if (id != groupComponents.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(groupComponents);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!GroupComponentsExists(groupComponents.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(groupComponents));
        }
        public async Task <IActionResult> Edit(string id, [Bind("WORKAREAID,DESCRIPTION")] WorkArea workArea)
        {
            if (id != workArea.WORKAREAID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(workArea);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!WorkAreaExists(workArea.WORKAREAID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(workArea));
        }
        public async Task <IActionResult> Edit(decimal id, [Bind("id,MODELTYPE,MSIZE,TOPTUBE,CHAINSTAY,TOTALLENGTH,GROUNDCLEARANCE,HEADTUBEANGLE,SEATTUBEANGEL")] ModelSize modelSize)
        {
            if (id != modelSize.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(modelSize);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ModelSizeExists(modelSize.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(modelSize));
        }
        public async Task <IActionResult> Edit(decimal id, [Bind("PAINTID,COLORNAME,COLORSTYLE,COLORLIST,DATEINTRODUCED")] Paint paint)
        {
            if (id != paint.PAINTID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(paint);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PaintExists(paint.PAINTID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(paint));
        }
Пример #6
0
        public async Task <IActionResult> Edit(decimal id, [Bind("SERIALNUMBER,COMPONENTID,SUBSTITUTEID,LOCATION,QUANTITY,DATEINSTALLED,EMPLOYEEID,id")] BikeParts bikeParts)
        {
            if (id != bikeParts.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bikeParts);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BikePartsExists(bikeParts.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(bikeParts));
        }
        public async Task <IActionResult> Edit(string id, [Bind("COMPONENTNAME,ASSEMBLYORDER,DESCRIPTION")] ComponentName componentName)
        {
            if (id != componentName.COMPONENTNAME)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(componentName);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ComponentNameExists(componentName.COMPONENTNAME))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(componentName));
        }
Пример #8
0
        public async Task <IActionResult> Edit(decimal id, [Bind("id,PURCHASEID,COMPONENTID,PRICEPAID,QUANTITY,QUANTITYRECEIVED")] PurchaseItem purchaseItem)
        {
            if (id != purchaseItem.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(purchaseItem);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PurchaseItemExists(purchaseItem.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(purchaseItem));
        }
        public async Task <IActionResult> Edit(decimal id, [Bind("CUSTOMERID,PHONE,FIRSTNAME,LASTNAME,ADDRESS,ZIPCODE,CITYID,BALANCEDUE")] Customer customer)
        {
            if (id != customer.CUSTOMERID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(customer);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CustomerExists(customer.CUSTOMERID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(customer));
        }
        public async Task <IActionResult> Edit(double id, [Bind("TUBEID,MATERIAL,DESCRIPTION,DIAMETER,THICKNESS,ROUNDNESS,WEIGHT,STIFFNESS,LISTPRICE,CONSTRUCTION")] TubeMaterial tubeMaterial)
        {
            if (id != tubeMaterial.TUBEID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tubeMaterial);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TubeMaterialExists(tubeMaterial.TUBEID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tubeMaterial));
        }
Пример #11
0
        public async Task <IActionResult> Edit(string id, [Bind("STATE,TAXRATE")] StateTaxRate stateTaxRate)
        {
            if (id != stateTaxRate.STATE)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(stateTaxRate);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StateTaxRateExists(stateTaxRate.STATE))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(stateTaxRate));
        }
Пример #12
0
        public async Task <IActionResult> Edit(decimal id, [Bind("COMPONENTID,MANUFACTURERID,PRODUCTNUMBER,ROAD,CATEGORY,LENGTH,HEIGHT,WIDTH,WEIGHT,YEAR,ENDYEAR,DESCRIPTION,LISTPRICE,ESTIMATEDCOST,QUANTITYONHAND")] Component component)
        {
            if (id != component.COMPONENTID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(component);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ComponentExists(component.COMPONENTID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(component));
        }
        public async Task <IActionResult> Edit(decimal id, [Bind("PURCHASEID,EMPLOYEEID,MANUFACTURERID,TOTALLIST,SHIPPINGCOST,DISCOUNT,ORDERDATE,RECEIVEDATE,AMOUNTDUE")] PurchaseOrder purchaseOrder)
        {
            if (id != purchaseOrder.PURCHASEID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(purchaseOrder);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PurchaseOrderExists(purchaseOrder.PURCHASEID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(purchaseOrder));
        }
Пример #14
0
        public async Task <IActionResult> Edit(decimal id, [Bind("EMPLOYEEID,TAXPAYERID,LASTNAME,FIRSTNAME,HOMEPHONE,ADDRESS,ZIPCODE,CITYID,DATEHIRED,DATERELEASED,CURRENTMANAGER,SALARYGRADE,SALARY,TITLE,WORKAREA")] Employee employee)
        {
            if (id != employee.EMPLOYEEID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(employee);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmployeeExists(employee.EMPLOYEEID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(employee));
        }
Пример #15
0
        public async Task <IActionResult> Edit(DateTime id, [Bind("DATEVALUE,MADECOUNT")] TempDateMade tempDateMade)
        {
            if (id != tempDateMade.DATEVALUE)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tempDateMade);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TempDateMadeExists(tempDateMade.DATEVALUE))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tempDateMade));
        }
Пример #16
0
        public async Task <IActionResult> Edit(decimal id, [Bind("COMPONENTGROUPID,GROUPNAME,BIKETYPE,YEAR,ENDYEAR,WEIGHT")] GroupO groupO)
        {
            if (id != groupO.COMPONENTGROUPID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(groupO);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!GroupOExists(groupO.COMPONENTGROUPID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(groupO));
        }
Пример #17
0
        public async Task <IActionResult> Edit(decimal id, [Bind("ID,LASTNAME,FIRSTNAME,GENDER")] SampleName sampleName)
        {
            if (id != sampleName.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(sampleName);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SampleNameExists(sampleName.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(sampleName));
        }
        public async Task <IActionResult> Edit(decimal id, [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 (id != bicycle.SERIALNUMBER)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bicycle);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BicycleExists(bicycle.SERIALNUMBER))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(bicycle));
        }
Пример #19
0
        public async Task <IActionResult> Edit(decimal id, [Bind("STOREID,STORENAME,PHONE,CONTACTFIRSTNAME,CONTACTLASTNAME,ADDRESS,ZIPCODE,CITYID")] RetailStore retailStore)
        {
            if (id != retailStore.STOREID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(retailStore);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!RetailStoreExists(retailStore.STOREID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(retailStore));
        }
Пример #20
0
        public async Task <IActionResult> Edit(decimal id, [Bind("id,MANUFACTURERID,TRANSACTIONDATE,EMPLOYEEID,AMOUNT,DESCRIPTION,REFERENCE")] ManufacturerTransaction manufacturerTransaction)
        {
            if (id != manufacturerTransaction.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(manufacturerTransaction);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ManufacturerTransactionExists(manufacturerTransaction.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(manufacturerTransaction));
        }
Пример #21
0
        public async Task <IActionResult> Edit(decimal id, [Bind("MANUFACTURERID,MANUFACTURERNAME,CONTACTNAME,PHONE,ADDRESS,ZIPCODE,CITYID,BALANCEDUE")] Manufacturer manufacturer)
        {
            if (id != manufacturer.MANUFACTURERID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(manufacturer);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ManufacturerExists(manufacturer.MANUFACTURERID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(manufacturer));
        }
Пример #22
0
        public async Task <IActionResult> Edit(decimal id, [Bind("ID,BASEADDRESS")] SampleStreet sampleStreet)
        {
            if (id != sampleStreet.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(sampleStreet);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SampleStreetExists(sampleStreet.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(sampleStreet));
        }
        public async Task <IActionResult> Edit(string id, [Bind("ITEMNAME,VALUE,DESCRIPTION,DATECHANGED")] Preference preference)
        {
            if (id != preference.ITEMNAME)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(preference);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PreferenceExists(preference.ITEMNAME))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(preference));
        }
Пример #24
0
        public async Task <IActionResult> Edit(decimal id, [Bind("ID,VERSION,CHANGEDATE,NAME,REVISIONCOMMENTS")] RevisionHistory revisionHistory)
        {
            if (id != revisionHistory.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(revisionHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!RevisionHistoryExists(revisionHistory.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(revisionHistory));
        }
        public async Task <IActionResult> Edit(decimal id, [Bind("CityId,ZIPCODE,CITY,STATE,AREACODE,POPULATION1990,POPULATION1980,COUNTRY,LATITUDE,LONGITUDE,POPULATIONCDF")] City city)
        {
            if (id != city.CityId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(city);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CityExists(city.CityId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(city));
        }
Пример #26
0
        public async Task <IActionResult> Edit(decimal id, [Bind("SERIALNUMBER,TUBEID,QUANTITY,id")] BicycleTubeUsage bicycleTubeUsage)
        {
            if (id != bicycleTubeUsage.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bicycleTubeUsage);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BicycleTubeUsageExists(bicycleTubeUsage.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(bicycleTubeUsage));
        }
Пример #27
0
        public async Task <IActionResult> Edit(decimal id, [Bind("ID,MODELTYPE,FRAMESIZE")] CommonSizes commonSizes)
        {
            if (id != commonSizes.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(commonSizes);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CommonSizesExists(commonSizes.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(commonSizes));
        }
        public async Task <IActionResult> Edit(string id, [Bind("MODELTYPE,DESCRIPTION,COMPONENTID")] ModelType modelType)
        {
            if (id != modelType.MODELTYPE)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(modelType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ModelTypeExists(modelType.MODELTYPE))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(modelType));
        }
        public async Task <IActionResult> Edit(decimal id, [Bind("ID,SERIALNUMBER,TUBENAME,TUBEID,LENGTH")] BikeTubes bikeTubes)
        {
            if (id != bikeTubes.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bikeTubes);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BikeTubesExists(bikeTubes.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(bikeTubes));
        }