Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Stuff_Attendence stuff_Attendence = db.Stuff_Attendence.Find(id);

            db.Stuff_Attendence.Remove(stuff_Attendence);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "id,stuff_id,stuff_status")] Stuff_Attendence stuff_Attendence)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stuff_Attendence).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.stuff_id = new SelectList(db.Stuff_Attendence, "id", "id", stuff_Attendence.stuff_id);
     return(View(stuff_Attendence));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "id,stuff_id,stuff_status")] Stuff_Attendence stuff_Attendence)
        {
            if (ModelState.IsValid)
            {
                db.Stuff_Attendence.Add(stuff_Attendence);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.stuff_id = new SelectList(db.Stuff_Attendence, "id", "id", stuff_Attendence.stuff_id);
            return(View(stuff_Attendence));
        }
Beispiel #4
0
        // GET: ManagementAdmin/Stuff_Attendence/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Stuff_Attendence stuff_Attendence = db.Stuff_Attendence.Find(id);

            if (stuff_Attendence == null)
            {
                return(HttpNotFound());
            }
            return(View(stuff_Attendence));
        }
Beispiel #5
0
        // GET: ManagementAdmin/Stuff_Attendence/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Stuff_Attendence stuff_Attendence = db.Stuff_Attendence.Find(id);

            if (stuff_Attendence == null)
            {
                return(HttpNotFound());
            }
            ViewBag.stuff_id = new SelectList(db.Stuff_Attendence, "id", "id", stuff_Attendence.stuff_id);
            return(View(stuff_Attendence));
        }