private void Insert_ETH_USD() { try { ETH_USD_DTO dto = new ETH_USD_DTO(); dto.open = double.Parse(dataGridView2.Rows[0].Cells[8].Value.ToString()); dto.last = double.Parse(dataGridView2.Rows[0].Cells[1].Value.ToString()); dto.high = double.Parse(dataGridView2.Rows[0].Cells[0].Value.ToString()); dto.low = double.Parse(dataGridView2.Rows[0].Cells[5].Value.ToString()); dto.volume = double.Parse(dataGridView2.Rows[0].Cells[4].Value.ToString()); ETH_USD_BUS bus = new ETH_USD_BUS(); bus.Insert_ETH_USD(dto); } catch (Exception) { //timer1.Stop(); //MessageBox.Show(" ETH/USD API Connecting has been stopped!"); return; } finally { timer1.Start(); } }
private async void Loadding_ETH_USD() { List <ETH_USD_DTO> ls_ETH_USD = await ETH_USD_BUS.List_ETH_USD(); dataGridView2.Invoke(new Action(() => dataGridView2.DataSource = ls_ETH_USD)); }