예제 #1
0
        public void AddAntenna(Antenna antenna)
        {
            using (DataClassesDataContext dbconnection = new DataClassesDataContext())
            {
                dbconnection.Antenna.InsertOnSubmit(antenna);

                try
                {
                    dbconnection.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict);
                }
                catch (SqlException ex)
                {
                    throw ex;
                }
            }
        }
예제 #2
0
 public void UpdateAntenna(Antenna antenna)
 {
     using (DataClassesDataContext dbconnection = new DataClassesDataContext())
     {
         var querry =
             from ante in dbconnection.Antenna
             where ante.Name == antenna.Name
             select ante;
         if (querry.Count() > 0)
         {
             dbconnection.Antenna.DeleteOnSubmit(querry.First());
             dbconnection.Antenna.InsertOnSubmit(antenna);
             try
             {
                 dbconnection.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict);
             }
             catch (SqlException ex)
             {
                 throw ex;
             }
         }
     }
 }
예제 #3
0
 private void detach_Antenna(Antenna entity)
 {
     this.SendPropertyChanging();
     entity.WaveForm = null;
 }
예제 #4
0
 private void attach_Antenna(Antenna entity)
 {
     this.SendPropertyChanging();
     entity.WaveForm = this;
 }
예제 #5
0
 partial void DeleteAntenna(Antenna instance);
예제 #6
0
 partial void UpdateAntenna(Antenna instance);
예제 #7
0
 partial void InsertAntenna(Antenna instance);