Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Supplier_ID,SupplierNumber,SupplierName,SupplierAddress,SupplierCounty,SupplierContact,SupplierEMail")] Supplier supplier)
 {
     if (ModelState.IsValid)
     {
         db.MarkAsModified(supplier);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(supplier));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Property_ID,Prop_Address,Prop_County,Type,Cost_Centre,OPW_Building_Code,Team,SquareMetre,StaffCapacity,CarParkSpots,DateOpened,DateClosed,Lease_ID")] Property property)
 {
     if (ModelState.IsValid)
     {
         db.MarkAsModified(property);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(property));
 }
 public ActionResult Edit([Bind(Include = "Transaction_ID,Property_ID,Contract_ID,Weekday,DailyHours,HoursUpdatedDate,WeeklyHours,AvgMonthlyHours")] ContractHour contractHour)
 {
     if (ModelState.IsValid)
     {
         db.MarkAsModified(contractHour);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Contract_ID = new SelectList(db.ContractDetail, "Contract_ID", "PriceDescription", contractHour.Contract_ID);
     ViewBag.Property_ID = new SelectList(db.Property, "Property_ID", "Prop_Address", contractHour.Property_ID);
     return(View(contractHour));
 }
 public ActionResult Edit([Bind(Include = "Contract_ID,ContractStartDate,ContractFinishDate,ContractExtensionsAvailable,DurationContactExtension,Servicetype,PriceDescription,Price,VatRate,PriceUpdatedate,Supplier_ID")] ContractDetail contractDetail)
 {
     if (ModelState.IsValid)
     {
         //db.Entry(contractDetail).State = EntityState.Modified;
         db.MarkAsModified(contractDetail);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Supplier_ID = new SelectList(db.Supplier, "Supplier_ID", "SupplierNumber", contractDetail.Supplier_ID);
     return(View(contractDetail));
 }