Exemple #1
0
        public ActionResult UpdateEmployee(TBLEMPLOYEE p)
        {
            var employee = db.TBLEMPLOYEE.Find(p.ID);

            employee.Employee = p.Employee;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult AddNewEmployee(TBLEMPLOYEE p)
 {
     if (!ModelState.IsValid)
     {
         return(View("AddNewEmployee"));
     }
     db.TBLEMPLOYEE.Add(p);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }