public ActionResult Edit([Bind(Include = "userID,OwnerName,CompanyName,Type,Phone,Email,Password,Address,City,ZIPCode")] Company company)
 {
     if (ModelState.IsValid)
     {
         db.Entry(company).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(company));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "C_ID,FirstName,LastName,Phone,Email,Password,Address,City,ZIPCode,Status,UCode")] Client client)
 {
     if (ModelState.IsValid)
     {
         db.Entry(client).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(client));
 }
示例#3
0
 public ActionResult Edit([Bind(Include = "P_ID,Ammount,Paid,Due,Date")] Payment payment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(payment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(payment));
 }
示例#4
0
 public ActionResult Edit([Bind(Include = "E_ID,FirstName,LastName,Phone,Password,Address,City,ZIPCode")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(employee));
 }
 public ActionResult Edit([Bind(Include = "coID,month,C_ID,code1")] Code code)
 {
     if (ModelState.IsValid)
     {
         db.Entry(code).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.C_ID = new SelectList(db.Clients, "C_ID", "FirstName", code.C_ID);
     return(View(code));
 }