internal void CopyFromRow(TempDatabase.ComplianceJobBindingTable row)
 {
     this.TenantId          = row.TenantId;
     this.JobRunId          = row.JobRunId;
     this.BindingOptions    = row.BindingOptions;
     this.Bindings          = row.Bindings;
     this.BindingType       = row.BindingType;
     this.JobStartTime      = row.JobStartTime;
     this.JobResults        = row.JobResults;
     this.JobStatus         = row.JobStatus;
     this.NumBindings       = row.NumberBindings;
     this.NumBindingsFailed = row.NumberBindingsFailed;
     this.JobMaster         = row.JobMaster;
 }
Example #2
0
 public void Delete(ComplianceBinding binding)
 {
     using (SqlConnection sqlConnection = new SqlConnection(this.GetConnectionString()))
     {
         using (DataContext dataContext = new DataContext(sqlConnection))
         {
             Table <TempDatabase.ComplianceJobBindingTable>      table     = dataContext.GetTable <TempDatabase.ComplianceJobBindingTable>();
             IQueryable <TempDatabase.ComplianceJobBindingTable> queryable = from bindingRow in table
                                                                             where bindingRow.JobRunId == binding.JobRunId && (int)bindingRow.BindingType == (int)binding.BindingType
                                                                             select bindingRow;
             if (queryable != null && queryable.Count <TempDatabase.ComplianceJobBindingTable>() > 0)
             {
                 TempDatabase.ComplianceJobBindingTable entity = queryable.First <TempDatabase.ComplianceJobBindingTable>();
                 table.DeleteOnSubmit(entity);
                 dataContext.SubmitChanges();
             }
         }
     }
 }