Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "id,name,email,C_union,current_job")] userinfo_db userinfo_db)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userinfo_db).State = EntityState.Modified;
         db.Entry(userinfo_db).Property(x => x.created_at).IsModified = false;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(userinfo_db));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id,currency,salaryAmount")] salary_db salary_db)
 {
     if (ModelState.IsValid)
     {
         db.Entry(salary_db).State = EntityState.Modified;
         db.Entry(salary_db).Property(x => x.created_at).IsModified = false;
         db.Entry(salary_db).Property(x => x.salary_id).IsModified  = false;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(salary_db));
 }