Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            khaShrot khashrot = db.khaShrots.Find(id);

            db.khaShrots.Remove(khashrot);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "sourceId,sourceName,remarks")] khaShrot khashrot)
 {
     if (ModelState.IsValid)
     {
         khaShrot objKhaShrot = new khaShrot();
         objKhaShrot.sourceName = TrimText(khashrot.sourceName);
         objKhaShrot.remarks    = TrimText(khashrot.remarks);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(khashrot));
 }
Beispiel #3
0
        // GET: /KharchaShrot/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            khaShrot khashrot = db.khaShrots.Find(id);

            if (khashrot == null)
            {
                return(HttpNotFound());
            }
            return(View(khashrot));
        }