Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            Gen_Mst_DocumentType gen_Mst_DocumentType = db.Gen_Mst_DocumentType.FirstOrDefault(m => m.DocCode == id);

            db.Gen_Mst_DocumentType.Remove(gen_Mst_DocumentType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "DocCode,DocDescription,Comments,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate")] Gen_Mst_DocumentType gen_Mst_DocumentType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gen_Mst_DocumentType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CreatedBy  = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.CreatedBy);
     ViewBag.ModifiedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.ModifiedBy);
     return(View(gen_Mst_DocumentType));
 }
Ejemplo n.º 3
0
        // GET: DocumentType/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gen_Mst_DocumentType gen_Mst_DocumentType = db.Gen_Mst_DocumentType.FirstOrDefault(m => m.DocCode == id);

            if (gen_Mst_DocumentType == null)
            {
                return(HttpNotFound());
            }
            return(View(gen_Mst_DocumentType));
        }
Ejemplo n.º 4
0
        // GET: DocumentType/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gen_Mst_DocumentType gen_Mst_DocumentType = db.Gen_Mst_DocumentType.FirstOrDefault(m => m.DocCode == id);

            if (gen_Mst_DocumentType == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CreatedBy  = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.CreatedBy);
            ViewBag.ModifiedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.ModifiedBy);
            return(View(gen_Mst_DocumentType));
        }