private void fXRiskMenuItem_Click(object sender, EventArgs e) { try { List <SQLFunc.SubResults> myData = mySQL.GetData(DBTables["FXRisk"].ToString(), "*"); List <SQLFunc.SubResults> Headers = mySQL.Get_TblFields(DBTables["FXRisk"].ToString()); if (myData.Count == 0) { MessageBox.Show("No data for this table"); return; } Parameters myParam = new Parameters(Headers, myData, false, "Period for deviation are: [0, 6M], [6M, 1Y], [1Y, 2Y], ..."); myParam.ShowDialog(); if (myParam != null && myParam.IsSaved) { mySQL.ClearTable(DBTables["FXRisk"].ToString()); for (int i = 0; i < myParam.Data2Write.Count; i++) { mySQL.InsertData(DBTables["FXRisk"].ToString(), myParam.Data2Write[i]); } myParam.Close(); } } catch { MessageBox.Show("Issue while getting data for FX Risk management"); } }
public DepositRateDecrease(SQLFunc sql, Hashtable TblData) { InitializeComponent(); List <SQLFunc.SubResults> data = sql.GetData(TblData["pCur"].ToString(), "*"); for (int i = 0; i < data.Count; i++) { currencyBox.Items.Add(data[i]._SubResults[0].ToString()); } this.sql = sql; this.DecreaseRateTable = TblData["DepositRateDecrease"].ToString(); }
private void DataGrid_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) { if (e.RowIndex == 0) { return; } DataGridViewComboBoxCell cellBox = dataGrid.Rows[e.RowIndex].Cells[1] as DataGridViewComboBoxCell; List <SQLFunc.SubResults> data = sql.GetData(SectorTbl, "*"); for (int j = 0; j < data.Count; j++) { cellBox.Items.Add(data[j]._SubResults[0].ToString()); } }