private void button1_Click(object sender, EventArgs e)//получаем информацию о валютах { RBKServise.DailyInfo di = new RBKServise.DailyInfo(); System.DateTime DateFrom, DateTo; DateFrom = dateTimePicker1.Value; DateTo = dateTimePicker2.Value; DataSet ds = (System.Data.DataSet)di.GetCursDynamic(DateFrom, DateTo, "R01235"); ds.Tables[0].Columns[0].ColumnName = "Дата"; ds.Tables[0].Columns[1].ColumnName = "Вн.код валюты"; ds.Tables[0].Columns[2].ColumnName = "Номинал"; ds.Tables[0].Columns[3].ColumnName = "Курс"; dataGridView1.DataSource = ds.Tables[0]; DataSet DSC = (System.Data.DataSet)di.EnumValutes(false); System.Data.DataTable tb1 = DSC.Tables["EnumValutes"]; dataGridView2.DataSource = tb1; label4.Text = dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[3].Value.ToString(); }
static DataRowCollection GetValutesTable(RBKServise.DailyInfo info) { var DSC = info.EnumValutes(false); return(DSC.Tables["EnumValutes"].Rows); }