Example #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            tb_Current_Intersection_Service_Dataset tb_Current_Intersection_Service_Dataset = db.tb_Current_Intersection_Service_Dataset.Find(id);

            db.tb_Current_Intersection_Service_Dataset.Remove(tb_Current_Intersection_Service_Dataset);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ServiceID,ConsumerID,DatasetID,ProviderID,DatasetActivatedToUsedByService,GSBDatasetID,ImportingDate,VersionNumber,VersionDate,DataSourceName")] tb_Current_Intersection_Service_Dataset tb_Current_Intersection_Service_Dataset)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tb_Current_Intersection_Service_Dataset).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DatasetID = new SelectList(db.tb_Current_MarsadDataset, "DatasetID", "DatasetFullName", tb_Current_Intersection_Service_Dataset.DatasetID);
     ViewBag.ServiceID = new SelectList(db.tb_Current_Service, "ServiceID", "ConsumerID", tb_Current_Intersection_Service_Dataset.ServiceID);
     return(View(tb_Current_Intersection_Service_Dataset));
 }
Example #3
0
        //public ActionResult Index(string searchBy, string search, int? page)
        //{
        //    //return View(db.tb_Current_Service.ToList());

        //    var tb_Current_Service = db.tb_Current_Service.Include(t => t.tb_Current_Intersection_Service_Dataset).Include(t => t.tb_Current_Intersection_Service_ServiceChannel);
        //    // return View(tb_Current_Agency.ToList());

        //    if (searchBy == "ServiceID")
        //    {
        //        // return View(db.tb_Current_Agency.Where(x => x.AgencyID.(search)).ToList());
        //        return View(db.tb_Current_Service.Where(x => x.ServiceID.Contains(search) || search == null).ToList().ToPagedList(page ?? 1, 50));
        //    }
        //    else if (searchBy == "ServiceArabicName")
        //    {
        //        // return View(db.tb_Current_Agency.Where(x => x.AgencyID.(search)).ToList());
        //        return View(db.tb_Current_Service.Where(x => x.ServiceArabicName.Contains(search) || search == null).ToList().ToPagedList(page ?? 1, 50));
        //    }

        //    else
        //    {
        //        return View(db.tb_Current_Service.Where(x => x.AgencyName.ToString().Contains(search) || search == null).ToList().ToPagedList(page ?? 1, 50));
        //    }
        //}

        // GET: tb_Current_Intersection_Service_Dataset/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tb_Current_Intersection_Service_Dataset tb_Current_Intersection_Service_Dataset = db.tb_Current_Intersection_Service_Dataset.Find(id);

            if (tb_Current_Intersection_Service_Dataset == null)
            {
                return(HttpNotFound());
            }
            return(View(tb_Current_Intersection_Service_Dataset));
        }
Example #4
0
        // GET: tb_Current_Intersection_Service_Dataset/Edit/5
        public ActionResult Edit(string ServiceID, int DatasetID)
        {
            if (ServiceID == null || DatasetID < 0)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tb_Current_Intersection_Service_Dataset tb_Current_Intersection_Service_Dataset = db.tb_Current_Intersection_Service_Dataset.Find(ServiceID, DatasetID);

            if (tb_Current_Intersection_Service_Dataset == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DatasetID = new SelectList(db.tb_Current_MarsadDataset, "DatasetID", "DatasetFullName", tb_Current_Intersection_Service_Dataset.DatasetID);
            ViewBag.ServiceID = new SelectList(db.tb_Current_Service, "ServiceID", "ConsumerID", tb_Current_Intersection_Service_Dataset.ServiceID);
            return(View(tb_Current_Intersection_Service_Dataset));
        }