Ejemplo n.º 1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     // Lets put the secret sync row in the table only if its not present
     DataClassesDataContext db = new DataClassesDataContext();
     var query = (from g in db.sync_settings
                  where g.sync_job_id == Constants.AppSyncRowKey
                  select g).FirstOrDefault();
     if (query == null)
     {
         sync_setting startRow = new sync_setting();
         startRow.sync_job_id = Constants.AppSyncRowKey;
         startRow.sync_status = Constants.SyncNotStarted;
         startRow.sync_frequency_hours = Constants.SyncFrequency;
         startRow.sync_server_name = this.Server.MachineName;
         startRow.sync_timestamp = DateTime.MinValue;
         db.GetTable<sync_setting>().InsertOnSubmit(startRow);
         db.SubmitChanges();
     }
 }
Ejemplo n.º 2
0
 partial void Updatesync_setting(sync_setting instance);
Ejemplo n.º 3
0
 partial void Deletesync_setting(sync_setting instance);
Ejemplo n.º 4
0
 partial void Insertsync_setting(sync_setting instance);