//--------------------------------------------------------------- private void m_btnOk_Click(object sender, EventArgs e) { if (m_txtNomTable.Text.Length == 0) { MessageBox.Show(I.T("Please enter a table name|20004")); return; } m_tableFromDataHotel.NomFinal = m_txtNomTable.Text; m_tableFromDataHotel.UseCache = m_chkUseCache.Checked; List <IColumnDeEasyQuery> lst = new List <IColumnDeEasyQuery>(); foreach (ListViewItem item in m_wndListeColonnes.Items) { if (item.Checked) { IColumnDefinition colFromSource = item.Tag as IColumnDefinition; if (colFromSource != null) { IColumnDeEasyQuery newCol = m_tableFromDataHotel.GetColonneFor(colFromSource); if (newCol == null) { newCol = new CColumnEQFromSource(colFromSource); } newCol.ColumnName = item.Text; lst.Add(newCol); } CColonneCalculeeDataHotel colCalc = item.Tag as CColonneCalculeeDataHotel; if (colCalc != null) { colCalc.ColumnName = item.Text; lst.Add(colCalc); } } } m_tableFromDataHotel.SetColonnesOrCalculees(lst); List <CColonneEQCalculee> colsCalc = new List <CColonneEQCalculee>(); foreach (CColonneEQCalculee col in m_ctrlFormulesNommees.GetFormules()) { colsCalc.Add(col); } m_tableFromDataHotel.ColonnesCalculees = colsCalc; CResultAErreur result = m_panelOptions.MajChamps(m_tableFromDataHotel); if (!result) { CFormAlerte.Afficher(result.Erreur); return; } DialogResult = DialogResult.OK; Close(); }