Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EmpOvertime empOvertime = db.EmpOvertimes.Find(id);

            db.EmpOvertimes.Remove(empOvertime);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "empOTID,empID,AttendanceDetailDTRId,In1,Out1,OTReason,AppliedOTHoursDEC,AppliedOTHoursCHAR,SupervisorID,Remarks,DateApproved,DateApplied,IsApproved,IsDenied")] EmpOvertime empOvertime)
 {
     if (ModelState.IsValid)
     {
         db.Entry(empOvertime).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(empOvertime));
 }
Exemplo n.º 3
0
 public ActionResult Create([Bind(Include = "empOTID,empID,AttendanceDetailDTRId,In1,Out1,OTReason,AppliedOTHoursDEC,AppliedOTHoursCHAR,SupervisorID,Remarks,DateApproved,DateApplied,IsApproved,IsDenied,AttendanceDate")] EmpOvertime empOvertime, string Create, string Edit)
 {
     Console.WriteLine(empOvertime.empID + " " + empOvertime.AttendanceDetailDTRId + " " + empOvertime.In1 + " " + empOvertime.Out1 + " " + empOvertime.OTReason + " " + empOvertime.AppliedOTHoursDEC + " " + empOvertime.AppliedOTHoursCHAR + " " + empOvertime.AttendanceDetailDTRId + " " + empOvertime.SupervisorID + " " + empOvertime.Remarks + " " + empOvertime.DateApproved + " " + empOvertime.DateApplied +
                       empOvertime.AttendanceDate + " " + empOvertime.IsApproved + " " + empOvertime.IsDenied
                       );
     if (ModelState.IsValid)
     {
         db.EmpOvertimes.Add(empOvertime);
         db.SaveChanges();
         return(RedirectToAction("Create"));
     }
     return(View(empOvertime));
 }
Exemplo n.º 4
0
        // GET: OvertimeApplication/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EmpOvertime empOvertime = db.EmpOvertimes.Find(id);

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