コード例 #1
0
        public void AddTrack(DetailsOfTrack detailsOfTrack)
        {
            DataBaseEntities1 db = new DataBaseEntities1();

            db.Track_to_travel.Add(detailsOfTrack.ConvertTrackToDal());
            db.SaveChanges();
        }
コード例 #2
0
        public void UpdateTrack(DetailsOfTrack detailsOfTrack)
        {
            Track_to_travel tracks = Mapper.ConvertTrackToDal(detailsOfTrack);

            using (var db = new DataBaseEntities1())
            {
                db.Entry <Track_to_travel>(db.Set <Track_to_travel>().Find(tracks.Track_s_code)).CurrentValues.SetValues(tracks);
                db.SaveChanges();
            }
        }
コード例 #3
0
 // PUT: api/Track/5
 public void Put([FromBody] DetailsOfTrack detailsOfTrack)
 {
     ManagmentOTrack.UpdateTrack(detailsOfTrack);
 }
コード例 #4
0
 // POST: api/Track
 public void Post([FromBody] DetailsOfTrack detailsOfTrack)
 {
     ManagmentOTrack.AddTrack(detailsOfTrack);
 }
コード例 #5
0
 public static void UpdateTrack(DetailsOfTrack detailsOfTrack)
 {
     ManagementOfTrack.management_of_track.UpdateTrack(detailsOfTrack);
 }
コード例 #6
0
 public static void AddTrack(DetailsOfTrack detailsOfTrack)
 {
     ManagementOfTrack.management_of_track.AddTrack(detailsOfTrack);
 }