public static void UpdateDataSet(this MSMOA.JobSchedule jobSchedule, Data.ApplicationDataSet.JSJobSchedulesRow dataRow) { try { dataRow.ActiveEndDate = jobSchedule.ActiveEndDate; dataRow.ActiveEndTimeOfDay = jobSchedule.ActiveEndTimeOfDay; dataRow.ActiveStartDate = jobSchedule.ActiveStartDate; dataRow.ActiveStartTimeOfDay = jobSchedule.ActiveStartTimeOfDay; dataRow.DateCreated = jobSchedule.DateCreated; dataRow.FrequencyInterval = jobSchedule.FrequencyInterval.ToString(); dataRow.FrequencyRecurrenceFactor = jobSchedule.FrequencyRecurrenceFactor.ToString(); dataRow.FrequencyRelativeIntervals = jobSchedule.FrequencyRelativeIntervals.ToString(); dataRow.FrequencySubDayInterval = jobSchedule.FrequencySubDayInterval.ToString(); dataRow.FrequencySubDayTypes = jobSchedule.FrequencySubDayTypes.ToString(); dataRow.FrequencyTypes = jobSchedule.FrequencyTypes.ToString(); dataRow.ID_JobSchedule = jobSchedule.ID; dataRow.IsEnabled = jobSchedule.IsEnabled; dataRow.JobCount = jobSchedule.JobCount; } catch (Exception ex) { VNC.AppLog.Error(ex, LOG_APPNAME, CLASS_BASE_ERRORNUMBER + 7); // TODO(crhodes): // Wrap anything above that throws an exception that we want to ignore, // e.g. property not available because of SQL Edition. } }
private static void UpdateDataSet(this MSMOA.JobSchedule jobSchedule, Data.ApplicationDataSet.JSJobSchedulesRow dataRow) { try { //dataRow.X = jobSchedule.X; } catch (Exception ex) { // TODO(crhodes): // Wrap anything above that throws an exception that we want to ignore, // e.g. property not available because of SQL Edition. VNC.AppLog.Error(ex, LOG_APPNAME, CLASS_BASE_ERRORNUMBER + 10); } }
private static void UpdateDatabaseWithSnapShot(Data.ApplicationDataSet.JSJobSchedulesRow dataRow, string snapShotError) { try { dataRow.SnapShotDate = DateTime.Now; dataRow.SnapShotError = snapShotError; Common.ApplicationDataSet.JSJobSchedulesTA.Update(Common.ApplicationDataSet.JSJobSchedules); } catch (Exception ex) { string errorMessage = string.Format("JSJobSchedulesRow.ID:{0} - ex:{1} ex.Inner:{2}", dataRow.ID, ex, ex.InnerException); VNC.AppLog.Error(errorMessage, LOG_APPNAME, CLASS_BASE_ERRORNUMBER + 7); } }