Пример #1
0
        public ActionResult DeleteConfirmed(int?id)
        {
            Gen_Mst_Components gen_Mst_Components = db.Gen_Mst_Components.FirstOrDefault(m => m.RowNum == id);

            db.Gen_Mst_Components.Remove(gen_Mst_Components);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ProductCode,ModuleCode,ScreenCode,Componentscode,ComponentsName,TabPageCode,Comments,ComponentsOrder,CreatedBy,CreatedDate,RowNum,Description,DataComments,Datatype,Length,Tablecode,FieldName,Mandatory,IsDeleted")] Gen_Mst_Components gen_Mst_Components)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gen_Mst_Components).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductCode = new SelectList(db.Gen_Mst_Screen, "ProductCode", "ScreenName", gen_Mst_Components.ProductCode);
     return(View(gen_Mst_Components));
 }
Пример #3
0
        // GET: Components/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gen_Mst_Components gen_Mst_Components = db.Gen_Mst_Components.FirstOrDefault(m => m.RowNum == id);

            if (gen_Mst_Components == null)
            {
                return(HttpNotFound());
            }
            return(View(gen_Mst_Components));
        }
Пример #4
0
        // GET: Components/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gen_Mst_Components gen_Mst_Components = db.Gen_Mst_Components.FirstOrDefault(m => m.RowNum == id);

            if (gen_Mst_Components == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ProductCode = new SelectList(db.Gen_Mst_Screen, "ProductCode", "ScreenName", gen_Mst_Components.ProductCode);
            return(View(gen_Mst_Components));
        }