public ActionResult Edit(int StationID) { StationModels sdm = new StationModels(); StationDetail sd = sdm.findStationById(StationID); ViewData["DataEdit"] = sd; return View(); }
// // GET: /Administrator/Station/ public ActionResult Index() { StationModels sdm = new StationModels(); List<StationDetail> stationDetails = sdm.GetAllStationDetails(); ViewData["Data"] = stationDetails; return View(); }
public ActionResult CreateStation(FormCollection form) { StationModels sdm = new StationModels(); if (sdm.CreateStation(form["StationName"], form["StationCode"], form["StationDescription"])) { ViewData["Error"] = ""; return View("Add"); } else { ViewData["Error"] = "Can not insert new station"; return View("Add"); } }