예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            StaffMemberAttendence staffmemberattendence = db.StaffMemberAttendence.Find(id);

            db.StaffMemberAttendence.Remove(staffmemberattendence);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "StaffMemberAttendenceId,StaffMemberId,Status,Date,InTime,OutTime")] StaffMemberAttendence staffmemberattendence)
 {
     if (ModelState.IsValid)
     {
         db.Entry(staffmemberattendence).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.StaffMemberId = new SelectList(db.StaffMember, "StaffMemberId", "StaffMemberName", staffmemberattendence.StaffMemberId);
     return(View(staffmemberattendence));
 }
예제 #3
0
        // GET: /StaffMemberAttendence/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StaffMemberAttendence staffmemberattendence = db.StaffMemberAttendence.Find(id);

            if (staffmemberattendence == null)
            {
                return(HttpNotFound());
            }
            return(View(staffmemberattendence));
        }
예제 #4
0
        // GET: /StaffMemberAttendence/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StaffMemberAttendence staffmemberattendence = db.StaffMemberAttendence.Find(id);

            if (staffmemberattendence == null)
            {
                return(HttpNotFound());
            }
            ViewBag.StaffMemberId = new SelectList(db.StaffMember, "StaffMemberId", "StaffMemberName", staffmemberattendence.StaffMemberId);
            return(View(staffmemberattendence));
        }