public ActionResult Upload(int?id) { Session["ardaid"] = id; ArdaItem ardaitem = db.ArdaItems.Find(id); return(View(ardaitem)); }
public ActionResult DeleteConfirmed(int id) { ArdaItem ardaItem = db.ArdaItems.Find(id); db.ArdaItems.Remove(ardaItem); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ArdaID,ArdaCategory,UnitID,Serial,Quantity,SiteID,Sitename,Cluster,Province,SiteAddress,SiteOwner,Contact,Reason,OriginalLocation,PickUpLocation,StagingArea,Origin,RDFControl,ArdaStatusID,Approver,Department,Remarks")] ArdaItem ardaItem) { if (ModelState.IsValid) { db.Entry(ardaItem).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ArdaStatusID = new SelectList(db.ArdaStatus, "ArdaStatusID", "Status", ardaItem.ArdaStatusID); ViewBag.UnitID = new SelectList(db.Units, "UnitID", "CategoryBrand", ardaItem.UnitID); return(View(ardaItem)); }
// GET: ArdaItems/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ArdaItem ardaItem = db.ArdaItems.Find(id); if (ardaItem == null) { return(HttpNotFound()); } return(View(ardaItem)); }
// GET: ArdaItems/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ArdaItem ardaItem = db.ArdaItems.Find(id); if (ardaItem == null) { return(HttpNotFound()); } ViewBag.ArdaStatusID = new SelectList(db.ArdaStatus, "ArdaStatusID", "Status", ardaItem.ArdaStatusID); ViewBag.UnitID = new SelectList(db.Units, "UnitID", "CategoryBrand", ardaItem.UnitID); return(View(ardaItem)); }
public ActionResult Create([Bind(Include = "ArdaID,ArdaCategory,UnitID,Serial,Quantity,SiteID,Sitename,Cluster,Province,SiteAddress,SiteOwner,Contact,Reason,OriginalLocation,PickUpLocation,StagingArea,Origin,RDFControl,ArdaStatusID,Approver,Department,Remarks")] ArdaItem ardaItem) { if (ModelState.IsValid) { db.ArdaItems.Add(ardaItem); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Serial = Session["Serial"]; ViewBag.SiteID = Session["SiteID"]; ViewBag.SiteName = Session["SiteName"]; ViewBag.Cluster = Session["Cluster"]; ViewBag.Address = Session["Address"]; ViewBag.SiteOwner = Session["SiteOwner"]; ViewBag.Contact = Session["Contact"]; ViewBag.ArdaStatusID = new SelectList(db.ArdaStatus, "ArdaStatusID", "Status", ardaItem.ArdaStatusID); ViewBag.UnitID = new SelectList(db.Units, "UnitID", "CategoryBrand", ardaItem.UnitID); return(View(ardaItem)); }