private void getBlocksAsync() { try { _dbProvider.getBlocksAsync(MonitBeginTime, MonitEndTime); } catch (Exception ex) { LogFactory.WriteLine("getBlocksAsync:" + ex.Message); } }
private void SearchBlock(Dictionary <string, string> argDic) { DateTime dtBeginTime; DateTime dtEndTime; DateTime.TryParse(argDic["BeginTime"], out dtBeginTime); DateTime.TryParse(argDic["EndTime"], out dtEndTime); string Satellite = argDic["Satellite"]; string Sensor = argDic["Sensor"]; _hdDataProvider.getBlocksAsync(dtBeginTime, dtEndTime, Satellite, Sensor); }
/// <summary> /// BeginTime=2012-09-09 0:00:00;EndTime=2012-09-09 23:59:59;Satellite=FY3A;Sensor=VIRR;DataType=Projection /// </summary> /// <param name="argument"></param> internal void SetQueryArgument(string argument) { if (string.IsNullOrWhiteSpace(argument)) { return; } string[] args = argument.Split(';'); Dictionary <string, string> argDic = new Dictionary <string, string>(); foreach (string arg in args) { string[] argKv = arg.Split('='); argDic.Add(argKv[0], argKv[1]); } DateTime dtBeginTime; DateTime dtEndTime; DateTime.TryParse(argDic["BeginTime"], out dtBeginTime); DateTime.TryParse(argDic["EndTime"], out dtEndTime); string Satellite = argDic["Satellite"]; string Sensor = argDic["Sensor"]; string DataType = argDic["DataType"]; if (_isSearching) { return; } _isSearching = true; switch (DataType) { case "Projection": _hdDataProvider.getProjectionsAsync(dtBeginTime, dtEndTime, Satellite, Sensor); break; case "Block": _hdDataProvider.getBlocksAsync(dtBeginTime, dtEndTime, Satellite, Sensor); break; case "Mosaic": _hdDataProvider.getMosaicsAsync(dtBeginTime, dtEndTime, Satellite, Sensor); break; default: break; } }
private void getBlocksAsync() { _dbProvider.getBlocksAsync(MonitBeginTime, MonitEndTime); }