public TimeSpan Subtract(W3CDateTime val) { return(UtcTime.Subtract(val.UtcTime)); }
public static ValuesDataSet GetValuesDataSet(int? siteID, int? VariableID, W3CDateTime BeginDateTime, W3CDateTime EndDateTime) { ValuesDataSet ds = basicValuesDataSet(); if (!siteID.HasValue || !VariableID.HasValue) return ds; ValuesDataSetTableAdapters.DataValuesTableAdapter valuesTableAdapter = new DataValuesTableAdapter(); valuesTableAdapter.Connection.ConnectionString = Config.ODDB(); valuesTableAdapter.FillBySiteIdVariableIDBetweenDates(ds.DataValues, siteID.Value, VariableID.Value, BeginDateTime.DateTime, EndDateTime.DateTime); return ds; }
public static int Compare(W3CDateTime t1, W3CDateTime t2) { return(DateTime.Compare(t1.UtcTime, t2.UtcTime)); }
public static bool Equals(W3CDateTime t1, W3CDateTime t2) { return(DateTime.Equals(t1.UtcTime, t2.UtcTime)); }
public ValuesDataSet getValuesDataset(int? siteId, int? variableId, W3CDateTime? BeginDateTime, W3CDateTime? EndDateTime, VariableParam variable) { ValuesDataSet valuesDs; if (variableId == null && BeginDateTime == null && EndDateTime == null) { valuesDs = ODValues.GetValuesDataSet(siteId.Value); } else if (variableId != null && BeginDateTime == null && EndDateTime == null) { valuesDs = ODValues.GetValuesDataSet(siteId, variableId); } else if (variableId != null && BeginDateTime != null && EndDateTime == null) { EndDateTime = W3CDateTime.Now; valuesDs = ODValues.GetValuesDataSet(siteId, variableId, BeginDateTime.Value, EndDateTime.Value // set above ); } else if (variableId != null && BeginDateTime == null && EndDateTime != null) { BeginDateTime = W3CDateTime.Parse(ConfigurationManager.AppSettings["MinimalSQLDate"]); valuesDs = ODValues.GetValuesDataSet(siteId, variableId, BeginDateTime.Value, // set above EndDateTime.Value ); } else { valuesDs = ODValues.GetValuesDataSet(siteId, variableId, BeginDateTime.Value, EndDateTime.Value ); } return valuesDs; }
public TimeSpan Subtract(W3CDateTime val) { return UtcTime.Subtract(val.UtcTime); }
public static bool Equals(W3CDateTime t1, W3CDateTime t2) { return DateTime.Equals(t1.UtcTime, t2.UtcTime); }
public static int Compare(W3CDateTime t1, W3CDateTime t2) { return DateTime.Compare(t1.UtcTime, t2.UtcTime); }
public static seriesCatalogTypeSeries row2SeriesCatalogElement( seriesCatalogDataSet.SeriesCatalogRow row, seriesCatalogDataSet ds, VariablesDataset vds) { int variableID = row.VariableID; VariableInfoType variable = ODvariables.GetVariableByID(variableID, vds); Nullable<W3CDateTime> beginDateTime = null; if (!row.IsBeginDateTimeNull()) beginDateTime = new W3CDateTime(row.BeginDateTime); Nullable<W3CDateTime> endDateTime = null; if (!row.IsEndDateTimeNull()) endDateTime = new W3CDateTime(row.EndDateTime); Nullable<int> valueCount = null; if (!row.IsValueCountNull()) valueCount = row.ValueCount; int? QualityControlLevelid = null; if (!row.IsQualityControlLevelIDNull()) QualityControlLevelid = row.QualityControlLevelID; int? MethodID = null; if (!row.IsMethodIDNull()) MethodID = row.MethodID; int? SourceID = null; if (!row.IsSourceIDNull()) SourceID = row.SourceID; Nullable<Boolean> valueCountIsEstimated = false; seriesCatalogTypeSeries record = CuahsiBuilder.CreateSeriesRecord( variable, variable.sampleMedium.ToString(), beginDateTime, endDateTime, valueCount, valueCountIsEstimated, null, null, null, false, // real time null, // string if real time null, QualityControlLevelid, row.MethodDescription, MethodID, row.Organization, row.SourceDescription, SourceID, row.Citation); return record; }