Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DataSetSection dataSetSection = db.DataSetSections.Find(id);

            db.DataSetSections.Remove(dataSetSection);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "DSSID,DataSetSectionShortName,DataSetSectionName,DataSetNameSectionPersian,DataSetNameSectionPashto,FKDSSDataSetID")] DataSetSection dataSetSection)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dataSetSection).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FKDSSDataSetID = new SelectList(db.DataSetTbls, "DSId", "DataSetShortName", dataSetSection.FKDSSDataSetID);
     return(View(dataSetSection));
 }
Exemple #3
0
        // GET: DataSetSections/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DataSetSection dataSetSection = db.DataSetSections.Find(id);

            if (dataSetSection == null)
            {
                return(HttpNotFound());
            }
            return(View(dataSetSection));
        }
Exemple #4
0
        // GET: DataSetSections/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DataSetSection dataSetSection = db.DataSetSections.Find(id);

            if (dataSetSection == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FKDSSDataSetID = new SelectList(db.DataSetTbls, "DSId", "DataSetShortName", dataSetSection.FKDSSDataSetID);
            return(View(dataSetSection));
        }