Exemplo n.º 1
0
 private void Insert_BTC_USD()
 {
     try
     {
         BTC_USD_DTO dto = new BTC_USD_DTO();
         dto.open   = double.Parse(dataGridView1.Rows[0].Cells[8].Value.ToString());
         dto.last   = double.Parse(dataGridView1.Rows[0].Cells[1].Value.ToString());
         dto.high   = double.Parse(dataGridView1.Rows[0].Cells[0].Value.ToString());
         dto.low    = double.Parse(dataGridView1.Rows[0].Cells[5].Value.ToString());
         dto.volume = double.Parse(dataGridView1.Rows[0].Cells[4].Value.ToString());
         BTC_USD_BUS bus = new BTC_USD_BUS();
         bus.Insert_BTC_USD(dto);
     }
     catch (Exception)
     {
         //timer1.Stop();
         //MessageBox.Show("BTC/USD API connect has been stopped");
         return;
     }
     finally
     {
         timer1.Start();
     }
 }
Exemplo n.º 2
0
        private async void Loadding_BTC_USD()
        {
            List <BTC_USD_DTO> ls_BTC_USD = await BTC_USD_BUS.List_BTC_USD();

            dataGridView1.Invoke(new Action(() => dataGridView1.DataSource = ls_BTC_USD));
        }