Пример #1
0
 public ActionResult Edit(string id, EmployeeDepartmentTableDetails data)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(data).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         return(View());
     }
     catch
     {
         return(View());
     }
 }
Пример #2
0
 public ActionResult Edit(int id, [Bind("Id,Name,DateOfBirth,Address,ContactNumber,City,Country")] EmployeeTableDetails data)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(data).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         return(View());
     }
     catch
     {
         return(View());
     }
 }
Пример #3
0
 public ActionResult Edit(int id, [Bind("ClientNumber,ClientName,Address,City,State,Pincode")] ClientTableData client)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(client).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         return(View());
     }
     catch
     {
         return(View());
     }
 }