Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ALSEmployee aLSEmployee = db.ALSEmployees.Find(id);

            db.ALSEmployees.Remove(aLSEmployee);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Employee_Id,First_Name,Last_Name,Gender,D_O_B,Technology,Contact_Number,Email_Id,SSN,EAD,Is_Internal_Employee")] ALSEmployee aLSEmployee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aLSEmployee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aLSEmployee));
 }
Beispiel #3
0
        // GET: ALSEmployee/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ALSEmployee aLSEmployee = db.ALSEmployees.Find(id);

            if (aLSEmployee == null)
            {
                return(HttpNotFound());
            }
            return(View(aLSEmployee));
        }