Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Employee_Employee employee_Employee = db.Employes.Find(id);

            db.Employes.Remove(employee_Employee);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "EmployeeID,FirstName,MiddleName,LastName,Gender,EmailAddress,Titre,Departement,ModifiedDate,EntrepriseID")] Employee_Employee employee_Employee)
 {
     if (ModelState.IsValid)
     {
         employee_Employee.ModifiedDate    = DateTime.Now;
         db.Entry(employee_Employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EntrepriseID = new SelectList(db.Entreprises, "EntrepriseID", "EntrepriseName", employee_Employee.EntrepriseID);
     return(View(employee_Employee));
 }
Exemplo n.º 3
0
        // GET: Employee_Employee/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Employee_Employee employee_Employee = db.Employes.Find(id);

            if (employee_Employee == null)
            {
                return(HttpNotFound());
            }
            return(View(employee_Employee));
        }
Exemplo n.º 4
0
        // GET: Employee_Employee/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Employee_Employee employee_Employee = db.Employes.Find(id);

            if (employee_Employee == null)
            {
                return(HttpNotFound());
            }
            ViewBag.EntrepriseID = new SelectList(db.Entreprises, "EntrepriseID", "EntrepriseName", employee_Employee.EntrepriseID);
            return(View(employee_Employee));
        }