예제 #1
0
 public ActionResult Edit(int StationID)
 {
     StationModels sdm = new StationModels();
     StationDetail sd = sdm.findStationById(StationID);
     ViewData["DataEdit"] = sd;
     return View();
 }
예제 #2
0
 //
 // GET: /Administrator/Station/
 public ActionResult Index()
 {
     StationModels sdm = new StationModels();
     List<StationDetail> stationDetails = sdm.GetAllStationDetails();
     ViewData["Data"] = stationDetails;
     return View();
 }
예제 #3
0
 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");
     }
 }