Exemplo n.º 1
0
        public static bool EditeCumul(CCumulCroise cumul)
        {
            CFormEditCumulCroise form = new CFormEditCumulCroise();

            form.m_cumul = cumul;
            bool bResult = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bResult);
        }
Exemplo n.º 2
0
 /// //////////////////////////////////////////
 private void m_wndListeCumuls_DoubleClick(object sender, System.EventArgs e)
 {
     if (m_wndListeCumuls.SelectedItems.Count == 1)
     {
         ListViewItem item  = m_wndListeCumuls.SelectedItems[0];
         CCumulCroise cumul = (CCumulCroise)item.Tag;
         if (CFormEditCumulCroise.EditeCumul(cumul))
         {
             item.SubItems[1].Text = cumul.TypeCumul.ToString();
             item.SubItems[2].Text = cumul.PrefixFinal;
         }
     }
 }
Exemplo n.º 3
0
        private void m_wndListeCumuls_DragDrop(object sender, DragEventArgs e)
        {
            DataColumn colonne = e.Data.GetData(typeof(DataColumn)) as DataColumn;

            if (colonne != null)
            {
                CCumulCroise cumul = new CCumulCroise(colonne.ColumnName, TypeCumulCroise.Somme, colonne.DataType);
                if (CFormEditCumulCroise.EditeCumul(cumul))
                {
                    m_tableauCroise.AddCumul(cumul);
                    InitChamps(m_tableSource, m_tableauCroise);
                    e.Effect = DragDropEffects.Copy;
                    return;
                }
            }
            e.Effect = DragDropEffects.None;
        }
Exemplo n.º 4
0
 /// //////////////////////////////////////////
 private void m_btnAddCumul_Click(object sender, System.EventArgs e)
 {
     if (m_wndListeChampsOrigine.SelectedItems.Count == 1)
     {
         ListViewItem item = m_wndListeChampsOrigine.SelectedItems[0];
         DataColumn   col  = item.Tag as DataColumn;
         if (col != null)
         {
             CCumulCroise cumul = new CCumulCroise(col.ColumnName, TypeCumulCroise.Somme, col.DataType);
             if (CFormEditCumulCroise.EditeCumul(cumul))
             {
                 m_tableauCroise.AddCumul(cumul);
                 InitChamps(m_tableSource, m_tableauCroise);
             }
         }
     }
 }