public ActionResult DeleteConfirmed(int id)
        {
            WillisEmployee willisemployee = _db.WillisEmployees.Find(id);

            _db.WillisEmployees.Remove(willisemployee);
            _db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit(WillisEmployee willisemployee)
 {
     if (ModelState.IsValid)
     {
         _db.Entry(willisemployee).State = EntityState.Modified;
         _db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(willisemployee));
 }
        //
        // GET: /Administration/WillisEmployee/Edit/5

        public ActionResult Edit(int id = 0)
        {
            WillisEmployee willisemployee = _db.WillisEmployees.Find(id);

            if (willisemployee == null)
            {
                return(HttpNotFound());
            }
            return(View(willisemployee));
        }
        public ActionResult Create(WillisEmployee willisemployee)
        {
            if (ModelState.IsValid)
            {
                _db.WillisEmployees.Add(willisemployee);
                _db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(willisemployee));
        }
Exemple #5
0
 public bool DeleteWillisEmployee(WillisEmployee WillisEmployee)
 {
     db.WillisEmployees.Remove(WillisEmployee);
     db.SaveChanges();
     return(true);
 }
Exemple #6
0
 public bool UpdateWillisEmployee(WillisEmployee WillisEmployee)
 {
     db.Entry(WillisEmployee).State = EntityState.Modified;
     db.SaveChanges();
     return(true);
 }
Exemple #7
0
 public bool CreateWillisEmployee(WillisEmployee WillisEmployee)
 {
     db.WillisEmployees.Add(WillisEmployee);
     db.SaveChanges();
     return(true);
 }
Exemple #8
0
        public WillisEmployee GetWillisEmployee(int WillisEmployeeID)
        {
            WillisEmployee WillisEmployee = db.WillisEmployees.Find(WillisEmployeeID);

            return(WillisEmployee);
        }