Exemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SubStations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSubStations(SubStation subStation)
 {
     base.AddObject("SubStations", subStation);
 }
Exemplo n.º 2
0
        public virtual ActionResult CreateStation(SubStation tocreate, int layoutid)
        {
            tocreate.LayoutID = layoutid;
            if (ModelState.IsValid)
            {
                _entities.SubStations.AddObject(tocreate);
                _entities.SaveChanges();
                var viewmodel = _entities.SubStations.Where(x => x.LayoutID == tocreate.LayoutID).ToList();
                return PartialView(Views._stationTable, viewmodel);
            }

            const string js = " $('.info_div').hide();$('#warning').fadeIn('slow');";
            return JavaScript(js);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new SubStation object.
 /// </summary>
 /// <param name="stationID">Initial value of the StationID property.</param>
 /// <param name="layoutID">Initial value of the LayoutID property.</param>
 public static SubStation CreateSubStation(global::System.Int32 stationID, global::System.Int32 layoutID)
 {
     SubStation subStation = new SubStation();
     subStation.StationID = stationID;
     subStation.LayoutID = layoutID;
     return subStation;
 }