Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            apangata apangata = db.apangatas.Find(id);

            db.apangatas.Remove(apangata);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "apangaID,apangata1,apanga_type,senior_id")] apangata apangata)
 {
     if (ModelState.IsValid)
     {
         db.Entry(apangata).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Education", apangata.senior_id);
     return(View(apangata));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "apangaID,apangata1,apanga_type,senior_id")] apangata apangata)
        {
            if (ModelState.IsValid)
            {
                db.apangatas.Add(apangata);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", apangata.senior_id);
            return(View(apangata));
        }
Example #4
0
        // GET: apangata/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            apangata apangata = db.apangatas.Find(id);

            if (apangata == null)
            {
                return(HttpNotFound());
            }
            return(View(apangata));
        }
Example #5
0
        // GET: apangata/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            apangata apangata = db.apangatas.Find(id);

            if (apangata == null)
            {
                return(HttpNotFound());
            }
            ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Education", apangata.senior_id);
            return(View(apangata));
        }