public ActionResult Edit([Bind(Include = "StateProvinceID,StateProvinceCode,CountryRegionCode,IsOnlyStateProvinceFlag,Name,TerritoryID,rowguid,ModifiedDate,isDeleted")] StateProvince stateProvince)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stateProvince).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(stateProvince));
 }
 public ActionResult Edit([Bind(Include = "LocationID,Name,CostRate,Availability,ModifiedDate,isDeleted")] Location location)
 {
     if (ModelState.IsValid)
     {
         db.Entry(location).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(location));
 }
 public ActionResult Edit([Bind(Include = "DepartmentID,Name,GroupName,ModifiedDate")] Department department)
 {
     if (ModelState.IsValid)
     {
         db.Entry(department).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(department));
 }
Ejemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "CreditCardID,CardType,CardNumber,ExpMonth,ExpYear,ModifiedDate,isDeleted")] CreditCard creditCard)
 {
     if (ModelState.IsValid)
     {
         db.Entry(creditCard).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(creditCard));
 }
Ejemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "ProductCategoryID,Name,rowguid,ModifiedDate,isDeleted")] ProductCategory productCategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productCategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(productCategory));
 }
 public ActionResult Edit([Bind(Include = "CultureID,Name,ModifiedDate,isDeleted")] Culture culture)
 {
     if (ModelState.IsValid)
     {
         db.Entry(culture).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(culture));
 }
Ejemplo n.º 7
0
 public ActionResult Edit([Bind(Include = "AddressTypeID,Name,rowguid,ModifiedDate,isDeleted")] AddressType addressType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(addressType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(addressType));
 }
Ejemplo n.º 8
0
 public ActionResult Edit([Bind(Include = "ProductSubcategoryID,ProductCategoryID,Name,rowguid,ModifiedDate,isDeleted")] ProductSubcategory productSubcategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productSubcategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductCategoryID = new SelectList(db.ProductCategories, "ProductCategoryID", "Name", productSubcategory.ProductCategoryID);
     return(View(productSubcategory));
 }
 public ActionResult Edit([Bind(Include = "AddressID,AddressLine1,AddressLine2,City,StateProvinceID,PostalCode,SpatialLocation,rowguid,ModifiedDate")] Address address)
 {
     if (ModelState.IsValid)
     {
         db.Entry(address).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.StateProvinceID = new SelectList(db.StateProvinces, "StateProvinceID", "StateProvinceCode", address.StateProvinceID);
     return(View(address));
 }
 public ActionResult Edit([Bind(Include = "BusinessEntityID,rowguid,ModifiedDate,isDeleted")] BusinessEntity businessEntity)
 {
     if (ModelState.IsValid)
     {
         db.Entry(businessEntity).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.People, "BusinessEntityID", "FirstName", businessEntity.BusinessEntityID);
     return(View(businessEntity));
 }
 public ActionResult Edit([Bind(Include = "BusinessEntityID,AddressID,AddressTypeID,rowguid,ModifiedDate")] BusinessEntityAddress businessEntityAddress)
 {
     if (ModelState.IsValid)
     {
         db.Entry(businessEntityAddress).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AddressID = new SelectList(db.Addresses, "AddressID", "AddressLine1", businessEntityAddress.AddressID);
     return(View(businessEntityAddress));
 }
Ejemplo n.º 12
0
 public ActionResult Edit([Bind(Include = "BusinessEntityID,PasswordHash,PasswordSalt,rowguid,ModifiedDate,isDeleted")] Password password)
 {
     if (ModelState.IsValid)
     {
         db.Entry(password).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.People, "BusinessEntityID", "PersonType", password.BusinessEntityID);
     return(View(password));
 }
Ejemplo n.º 13
0
 public ActionResult Edit([Bind(Include = "JobCandidateID,BusinessEntityID,Resume,ModifiedDate,isDeleted")] JobCandidate jobCandidate)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jobCandidate).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.Employees, "BusinessEntityID", "NationalIDNumber", jobCandidate.BusinessEntityID);
     return(View(jobCandidate));
 }
Ejemplo n.º 14
0
 public ActionResult Edit([Bind(Include = "BusinessEntityID,EmailAddressID,EmailAddress1,rowguid,ModifiedDate,isDeleted")] EmailAddress emailAddress)
 {
     if (ModelState.IsValid)
     {
         db.Entry(emailAddress).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.People, "BusinessEntityID", "PersonType", emailAddress.BusinessEntityID);
     return(View(emailAddress));
 }
 public ActionResult Edit([Bind(Include = "BusinessEntityID,NationalIDNumber,LoginID,OrganizationLevel,JobTitle,BirthDate,MaritalStatus,Gender,HireDate,SalariedFlag,VacationHours,SickLeaveHours,CurrentFlag,rowguid,ModifiedDate,isDeleted")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.People, "BusinessEntityID", "PersonType", employee.BusinessEntityID);
     return(View(employee));
 }
Ejemplo n.º 16
0
 public ActionResult Edit([Bind(Include = "ProductID,ModifiedDate,isDeleted")] ProductDocument productDocument)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productDocument).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductID = new SelectList(db.Products, "ProductID", "Name", productDocument.ProductID);
     return(View(productDocument));
 }
Ejemplo n.º 17
0
 public ActionResult Edit([Bind(Include = "ProductID,StartDate,EndDate,StandardCost,ModifiedDate,isDeleted")] ProductCostHistory productCostHistory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productCostHistory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductID = new SelectList(db.Products, "ProductID", "Name", productCostHistory.ProductID);
     return(View(productCostHistory));
 }
 public ActionResult Edit([Bind(Include = "BillOfMaterialsID,ProductAssemblyID,ComponentID,StartDate,EndDate,UnitMeasureCode,BOMLevel,PerAssemblyQty,ModifiedDate,isDeleted")] BillOfMaterial billOfMaterial)
 {
     if (ModelState.IsValid)
     {
         db.Entry(billOfMaterial).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ComponentID       = new SelectList(db.Products, "ProductID", "Name", billOfMaterial.ComponentID);
     ViewBag.ProductAssemblyID = new SelectList(db.Products, "ProductID", "Name", billOfMaterial.ProductAssemblyID);
     return(View(billOfMaterial));
 }
 public ActionResult Edit([Bind(Include = "BusinessEntityID,TerritoryID,SalesQuota,Bonus,CommissionPct,SalesYTD,SalesLastYear,rowguid,ModifiedDate,isDeleted")] SalesPerson salesPerson)
 {
     if (ModelState.IsValid)
     {
         db.Entry(salesPerson).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.Employees, "BusinessEntityID", "NationalIDNumber", salesPerson.BusinessEntityID);
     ViewBag.TerritoryID      = new SelectList(db.SalesTerritories, "TerritoryID", "Name", salesPerson.TerritoryID);
     return(View(salesPerson));
 }
 public ActionResult Edit([Bind(Include = "BusinessEntityID,CreditCardID,ModifiedDate,isDeleted")] PersonCreditCard personCreditCard)
 {
     if (ModelState.IsValid)
     {
         db.Entry(personCreditCard).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.People, "BusinessEntityID", "PersonType", personCreditCard.BusinessEntityID);
     ViewBag.CreditCardID     = new SelectList(db.CreditCards, "CreditCardID", "CardType", personCreditCard.CreditCardID);
     return(View(personCreditCard));
 }
 public ActionResult Edit([Bind(Include = "CurrencyRateID,CurrencyRateDate,FromCurrencyCode,ToCurrencyCode,AverageRate,EndOfDayRate,ModifiedDate,isDeleted")] CurrencyRate currencyRate)
 {
     if (ModelState.IsValid)
     {
         db.Entry(currencyRate).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FromCurrencyCode = new SelectList(db.Currencies, "CurrencyCode", "Name", currencyRate.FromCurrencyCode);
     ViewBag.ToCurrencyCode   = new SelectList(db.Currencies, "CurrencyCode", "Name", currencyRate.ToCurrencyCode);
     return(View(currencyRate));
 }
Ejemplo n.º 22
0
 public ActionResult Edit([Bind(Include = "BusinessEntityID,PhoneNumber,PhoneNumberTypeID,ModifiedDate,isDeleted")] PersonPhone personPhone)
 {
     if (ModelState.IsValid)
     {
         db.Entry(personPhone).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID  = new SelectList(db.People, "BusinessEntityID", "PersonType", personPhone.BusinessEntityID);
     ViewBag.PhoneNumberTypeID = new SelectList(db.PhoneNumberTypes, "PhoneNumberTypeID", "Name", personPhone.PhoneNumberTypeID);
     return(View(personPhone));
 }
Ejemplo n.º 23
0
 public ActionResult Edit([Bind(Include = "BusinessEntityID,Name,SalesPersonID,Demographics,rowguid,ModifiedDate,isDeleted")] Store store)
 {
     if (ModelState.IsValid)
     {
         db.Entry(store).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.BusinessEntities, "BusinessEntityID", "BusinessEntityID", store.BusinessEntityID);
     ViewBag.SalesPersonID    = new SelectList(db.SalesPersons, "BusinessEntityID", "BusinessEntityID", store.SalesPersonID);
     return(View(store));
 }
 public ActionResult Edit([Bind(Include = "ProductID,LocationID,Shelf,Bin,Quantity,rowguid,ModifiedDate,isDeleted")] ProductInventory productInventory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productInventory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.LocationID = new SelectList(db.Locations, "LocationID", "Name", productInventory.LocationID);
     ViewBag.ProductID  = new SelectList(db.Products, "ProductID", "Name", productInventory.ProductID);
     return(View(productInventory));
 }
 public ActionResult Edit([Bind(Include = "CountryRegionCode,CurrencyCode,ModifiedDate,isDeleted")] CountryRegionCurrency countryRegionCurrency)
 {
     if (ModelState.IsValid)
     {
         db.Entry(countryRegionCurrency).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CountryRegionCode = new SelectList(db.CountryRegions, "CountryRegionCode", "Name", countryRegionCurrency.CountryRegionCode);
     ViewBag.CurrencyCode      = new SelectList(db.Currencies, "CurrencyCode", "Name", countryRegionCurrency.CurrencyCode);
     return(View(countryRegionCurrency));
 }
Ejemplo n.º 26
0
 public ActionResult Edit([Bind(Include = "BusinessEntityID,PersonType,NameStyle,Title,FirstName,MiddleName,LastName,Suffix,EmailPromotion,AdditionalContactInfo,Demographics,rowguid,ModifiedDate")] Person person)
 {
     if (ModelState.IsValid)
     {
         db.Entry(person).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusinessEntityID = new SelectList(db.BusinessEntities, "BusinessEntityID", "BusinessEntityID", person.BusinessEntityID);
     ViewBag.BusinessEntityID = new SelectList(db.Employees, "BusinessEntityID", "NationalIDNumber", person.BusinessEntityID);
     return(View(person));
 }
 public ActionResult Edit([Bind(Include = "SalesOrderID,SalesOrderDetailID,CarrierTrackingNumber,OrderQty,ProductID,SpecialOfferID,UnitPrice,UnitPriceDiscount,LineTotal,rowguid,ModifiedDate,isDeleted")] SalesOrderDetail salesOrderDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(salesOrderDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SalesOrderID   = new SelectList(db.SalesOrderHeaders, "SalesOrderID", "SalesOrderNumber", salesOrderDetail.SalesOrderID);
     ViewBag.SpecialOfferID = new SelectList(db.SpecialOfferProducts, "SpecialOfferID", "SpecialOfferID", salesOrderDetail.SpecialOfferID);
     return(View(salesOrderDetail));
 }
Ejemplo n.º 28
0
 public ActionResult Edit([Bind(Include = "PurchaseOrderID,PurchaseOrderDetailID,DueDate,OrderQty,ProductID,UnitPrice,LineTotal,ReceivedQty,RejectedQty,StockedQty,ModifiedDate,isDeleted")] PurchaseOrderDetail purchaseOrderDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(purchaseOrderDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductID       = new SelectList(db.Products, "ProductID", "Name", purchaseOrderDetail.ProductID);
     ViewBag.PurchaseOrderID = new SelectList(db.PurchaseOrderHeaders, "PurchaseOrderID", "PurchaseOrderID", purchaseOrderDetail.PurchaseOrderID);
     return(View(purchaseOrderDetail));
 }
 public ActionResult Edit([Bind(Include = "ProductID,Name,ProductNumber,MakeFlag,FinishedGoodsFlag,Color,SafetyStockLevel,ReorderPoint,StandardCost,ListPrice,Size,SizeUnitMeasureCode,WeightUnitMeasureCode,Weight,DaysToManufacture,ProductLine,Class,Style,ProductSubcategoryID,ProductModelID,SellStartDate,SellEndDate,DiscontinuedDate,rowguid,ModifiedDate,isDeleted")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductModelID       = new SelectList(db.ProductModels, "ProductModelID", "Name", product.ProductModelID);
     ViewBag.ProductSubcategoryID = new SelectList(db.ProductSubcategories, "ProductSubcategoryID", "Name", product.ProductSubcategoryID);
     ViewBag.ProductID            = new SelectList(db.ProductDocuments, "ProductID", "ProductID", product.ProductID);
     return(View(product));
 }
Ejemplo n.º 30
0
 public ActionResult Edit([Bind(Include = "PurchaseOrderID,RevisionNumber,Status,EmployeeID,VendorID,ShipMethodID,OrderDate,ShipDate,SubTotal,TaxAmt,Freight,TotalDue,ModifiedDate,isDeleted")] PurchaseOrderHeader purchaseOrderHeader)
 {
     if (ModelState.IsValid)
     {
         db.Entry(purchaseOrderHeader).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EmployeeID   = new SelectList(db.Employees, "BusinessEntityID", "NationalIDNumber", purchaseOrderHeader.EmployeeID);
     ViewBag.ShipMethodID = new SelectList(db.ShipMethods, "ShipMethodID", "Name", purchaseOrderHeader.ShipMethodID);
     ViewBag.VendorID     = new SelectList(db.Vendors, "BusinessEntityID", "AccountNumber", purchaseOrderHeader.VendorID);
     return(View(purchaseOrderHeader));
 }