public ActionResult DeleteConfirmed(string id) { Gen_Mst_Module gen_Mst_Module = db.Gen_Mst_Module.FirstOrDefault(m => m.ModuleCode == id); db.Gen_Mst_Module.Remove(gen_Mst_Module); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ProductCode,ModuleCode,ModuleName,Comments,ModuleOrder,CreatedBy,CreatedDate")] Gen_Mst_Module gen_Mst_Module) { if (ModelState.IsValid) { db.Entry(gen_Mst_Module).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProductCode = new SelectList(db.Gen_Mst_Product, "ProductCode", "ProductName", gen_Mst_Module.ProductCode); return(View(gen_Mst_Module)); }
//[HttpPost] //public JsonResult Index(string search) //{ // KATSI_PRVEntities db = new KATSI_PRVEntities(); // List<Gen_Mst_Module> allsearch = db. //} // GET: Gen_Mst_Module/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gen_Mst_Module gen_Mst_Module = db.Gen_Mst_Module.FirstOrDefault(m => m.ModuleCode == id); if (gen_Mst_Module == null) { return(HttpNotFound()); } return(View(gen_Mst_Module)); }
// GET: Gen_Mst_Module/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gen_Mst_Module gen_Mst_Module = db.Gen_Mst_Module.FirstOrDefault(m => m.ModuleCode == id); if (gen_Mst_Module == null) { return(HttpNotFound()); } ViewBag.ProductCode = new SelectList(db.Gen_Mst_Product, "ProductCode", "ProductName", gen_Mst_Module.ProductCode); return(View(gen_Mst_Module)); }