public ActionResult DeleteConfirmed(int id)
        {
            WalkIn_Material walkIn_Material = db.WalkIn_Material.Find(id);

            db.WalkIn_Material.Remove(walkIn_Material);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Material_ID,Collector_ID,Employee_ID,Quantity,WalkIn_ID")] WalkIn_Material walkIn_Material)
 {
     if (ModelState.IsValid)
     {
         db.Entry(walkIn_Material).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Collector_ID = new SelectList(db.Collectors, "Collector_ID", "Collector_Name", walkIn_Material.Collector_ID);
     ViewBag.Employee_ID  = new SelectList(db.Employees, "Employee_ID", "Employee_Name", walkIn_Material.Employee_ID);
     ViewBag.Material_ID  = new SelectList(db.Materials, "Material_ID", "Material_Description", walkIn_Material.Material_ID);
     ViewBag.WalkIn_ID    = new SelectList(db.Walk_In, "WalkIn_ID", "Material_Brought", walkIn_Material.WalkIn_ID);
     return(View(walkIn_Material));
 }
        // GET: WalkIn_Material/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WalkIn_Material walkIn_Material = db.WalkIn_Material.Find(id);

            if (walkIn_Material == null)
            {
                return(HttpNotFound());
            }
            return(View(walkIn_Material));
        }
        // GET: WalkIn_Material/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WalkIn_Material walkIn_Material = db.WalkIn_Material.Find(id);

            if (walkIn_Material == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Collector_ID = new SelectList(db.Collectors, "Collector_ID", "Collector_Name", walkIn_Material.Collector_ID);
            ViewBag.Employee_ID  = new SelectList(db.Employees, "Employee_ID", "Employee_Name", walkIn_Material.Employee_ID);
            ViewBag.Material_ID  = new SelectList(db.Materials, "Material_ID", "Material_Description", walkIn_Material.Material_ID);
            ViewBag.WalkIn_ID    = new SelectList(db.Walk_In, "WalkIn_ID", "Material_Brought", walkIn_Material.WalkIn_ID);
            return(View(walkIn_Material));
        }