Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(string employeeID, string workCenterID)
        {
            WORKS_IN wORKS_IN = db.WORKS_IN.Find(employeeID, workCenterID);

            db.WORKS_IN.Remove(wORKS_IN);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Employee_ID,Work_Center_ID,Joining_Date,Enable_Flag")] WORKS_IN wORKS_IN)
 {
     if (ModelState.IsValid)
     {
         db.Entry(wORKS_IN).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Employee_ID    = new SelectList(db.EMPLOYEE, "Employee_ID", "Employee_Name", wORKS_IN.Employee_ID);
     ViewBag.Work_Center_ID = new SelectList(db.WORK_CENTER, "Work_Center_ID", "Work_Center_Location", wORKS_IN.Work_Center_ID);
     return(View(wORKS_IN));
 }
Exemplo n.º 3
0
        // GET: WORKS_IN/Details/5
        public ActionResult Details(string employeeID, string workCenterID)
        {
            if (employeeID == null || workCenterID == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WORKS_IN wORKS_IN = db.WORKS_IN.Find(employeeID, workCenterID);

            if (wORKS_IN == null)
            {
                return(HttpNotFound());
            }
            return(View(wORKS_IN));
        }
Exemplo n.º 4
0
        // GET: WORKS_IN/Edit/5
        public ActionResult Edit(string employeeID, string workCenterID)
        {
            if (employeeID == null || workCenterID == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WORKS_IN wORKS_IN = db.WORKS_IN.Find(employeeID, workCenterID);

            if (wORKS_IN == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Employee_ID    = new SelectList(db.EMPLOYEE, "Employee_ID", "Employee_Name", wORKS_IN.Employee_ID);
            ViewBag.Work_Center_ID = new SelectList(db.WORK_CENTER, "Work_Center_ID", "Work_Center_Location", wORKS_IN.Work_Center_ID);
            return(View(wORKS_IN));
        }