Пример #1
0
        public ActionResult DeleteConfirmed(DateTime id)
        {
            TIMEKEEPING tIMEKEEPING = db.TIMEKEEPINGs.Find(id);

            db.TIMEKEEPINGs.Remove(tIMEKEEPING);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Date,EmployeeID,State,AbsentID,HoursWorkDay,HoursWorkNight")] TIMEKEEPING tIMEKEEPING)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tIMEKEEPING).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Date       = new SelectList(db.DATEINFORMATIONs, "Date", "Date", tIMEKEEPING.Date);
     ViewBag.EmployeeID = new SelectList(db.EMPLOYEEs, "EmployeeID", "EmployeeName", tIMEKEEPING.EmployeeID);
     return(View(tIMEKEEPING));
 }
Пример #3
0
        // GET: TIMEKEEPINGs/Delete/5
        public ActionResult Delete(DateTime id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TIMEKEEPING tIMEKEEPING = db.TIMEKEEPINGs.Find(id);

            if (tIMEKEEPING == null)
            {
                return(HttpNotFound());
            }
            return(View(tIMEKEEPING));
        }
Пример #4
0
        // GET: TIMEKEEPINGs/Edit/5
        public ActionResult Edit(DateTime id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TIMEKEEPING tIMEKEEPING = db.TIMEKEEPINGs.Find(id);

            if (tIMEKEEPING == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Date       = new SelectList(db.DATEINFORMATIONs, "Date", "Date", tIMEKEEPING.Date);
            ViewBag.EmployeeID = new SelectList(db.EMPLOYEEs, "EmployeeID", "EmployeeName", tIMEKEEPING.EmployeeID);
            return(View(tIMEKEEPING));
        }