private static void generateURL(object r) { reqData rData = (reqData)r; seriesCatalogDataSet sc = new seriesCatalogDataSet(); scAdapater.FillBySiteVariable(sc.SeriesCatalog, rData.DS.Sites[0].SiteID, rData.DS.Variables[0].VariableID); requestData = generateURL(URLSiteName(rData.DS.Sites), URLVariableCode(rData.DS.Variables, rData.DS.Sites), selectStartDate(rData.StartDate, sc.SeriesCatalog[0].SeriesID), selectEndDate(rData.EndDate, sc.SeriesCatalog[0].SeriesID)); //newDataTable = newTable(rData.DS.Variables[0].VariableID.ToString(), sc.SeriesCatalog[0].SeriesID, requestData); //int SeriesID = db.seriesID(rData.Site, rData.Variable); //string requestData = generateURL(URLSiteName(rData.Site), URLVariableCode(rData.Variable, rData.Site), selectStartDate(rData.StartDate, SeriesID), selectEndDate(rData.EndDate, SeriesID)); //newDataTable= newTable(rData.Variable, SeriesID, requestData); }
public ValuesDataSet getDataValues(ValuesDataSet ds, DateTime startDate, DateTime endDate) { SeriesCatalogTableAdapter scAdapater = new SeriesCatalogTableAdapter(); scAdapater.Connection.ConnectionString = odws.Config.ODDB(); seriesCatalogDataSet sc = new seriesCatalogDataSet(); scAdapater.FillBySiteVariable(sc.SeriesCatalog, ds.Sites[0].SiteID, ds.Variables[0].VariableID); string requestData = ""; try { requestData = generateURL(URLSiteName(ds.Sites), URLVariableCode(ds.Variables, ds.Sites), selectStartDate(startDate, sc.SeriesCatalog[0].SeriesID), selectEndDate(endDate, sc.SeriesCatalog[0].SeriesID)); return(newTable(ds.Variables[0].VariableID.ToString(), sc.SeriesCatalog[0].SeriesID, requestData)); } catch (Exception ex) { return(new ValuesDataSet()); } }