Ejemplo n.º 1
0
 public ActionResult DeleteConfirmed(string id)
 {
     try
     {
         ChamberDtl chamberdtl = db.ChamberDtls.Find(id);
         db.ChamberDtls.Remove(chamberdtl);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View("Error"));
     }
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ChamberId,ChamberName,Status,Description,Remarks")] ChamberDtl chamberdtl)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(chamberdtl).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         return(View(chamberdtl));
     }
     catch
     {
         return(View("Error"));
     }
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "ChamberId,ChamberName,Status,Description,Remarks")] ChamberDtl chamberdtl)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    db.ChamberDtls.Add(chamberdtl);
                    db.SaveChanges();
                    return(RedirectToAction("Index"));
                }

                return(View(chamberdtl));
            }
            catch
            {
                return(View("Error"));
            }
        }
Ejemplo n.º 4
0
 // GET: /CamberDetail/Edit/5
 public ActionResult Edit(string id)
 {
     try
     {
         if (id == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         ChamberDtl chamberdtl = db.ChamberDtls.Find(id);
         if (chamberdtl == null)
         {
             return(HttpNotFound());
         }
         return(View(chamberdtl));
     }
     catch
     {
         return(View("Error"));
     }
 }