public async Task Execute(IJobExecutionContext context) { if ((int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) == 0 && up) || (int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) == 5 && up)) { up = false; RequestMrr req = new RequestMrr(); RequestMinear reqm = new RequestMinear(); RequestSp sp = new RequestSp(); RequestRate rate = new RequestRate(); req.Upload(); sp.Upload(); rate.Upload(); reqm.Upload(); DeleteDouble(); } else if ((int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) != 0 && !up) && (int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) != 5)) { up = true; } }
public IActionResult GetRate([FromBody] RequestRate model) { if (!ModelState.IsValid) { return(BadRequest(ErrorResult.GetResult(ModelState))); } var rate = rateService.GetRate(model.From, model.To); if (!rate.IsSuccess) { return(BadRequest(ErrorResult.GetResult(rate))); } return(Ok(new RateViewModel { From = model.From, To = model.To, Rate = rate.Data })); }