コード例 #1
0
        public static bool EditPivot(CColonneePivot colonne)
        {
            CFormEditColonnePivot form = new CFormEditColonnePivot();

            form.m_colonne = colonne;
            bool bResult = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bResult);
        }
コード例 #2
0
 /// //////////////////////////////////////////
 private void m_wndListeColonnes_DoubleClick(object sender, System.EventArgs e)
 {
     if (m_wndListeColonnes.SelectedItems.Count == 1)
     {
         ListViewItem   item    = m_wndListeColonnes.SelectedItems[0];
         CColonneePivot colonne = (CColonneePivot)item.Tag;
         if (CFormEditColonnePivot.EditPivot(colonne))
         {
             item.SubItems[1].Text = colonne.Prefixe;
         }
     }
 }
コード例 #3
0
 /// //////////////////////////////////////////
 private void m_btnAddPivot_Click(object sender, System.EventArgs e)
 {
     if (m_wndListeChampsOrigine.SelectedItems.Count == 1)
     {
         ListViewItem   item    = m_wndListeChampsOrigine.SelectedItems[0];
         CColonneePivot colonne = new CColonneePivot(((DataColumn)item.Tag).ColumnName, "");
         if (CFormEditColonnePivot.EditPivot(colonne))
         {
             m_tableauCroise.AddChampColonne(colonne);
             InitChamps(m_tableSource, m_tableauCroise);
         }
     }
 }
コード例 #4
0
 /// //////////////////////////////////////////
 private void m_btnDeletePivot_Click(object sender, System.EventArgs e)
 {
     if (m_wndListeColonnes.SelectedItems.Count == 1)
     {
         ListViewItem   item    = m_wndListeColonnes.SelectedItems[0];
         CColonneePivot colonne = (CColonneePivot)item.Tag;
         if (CFormAlerte.Afficher(I.T("Do not use the column @1 as a pivot column|30001", colonne.NomChamp),
                                  EFormAlerteType.Question) == DialogResult.Yes)
         {
             m_tableauCroise.RemoveChampColonne(colonne);
             InitChamps(m_tableSource, m_tableauCroise);
         }
     }
 }
コード例 #5
0
        private void m_wndListeColonnes_DragDrop(object sender, DragEventArgs e)
        {
            DataColumn colonne = e.Data.GetData(typeof(DataColumn)) as DataColumn;

            if (colonne != null)
            {
                if (m_tableauCroise.ChampsColonne.Count(a => a.NomChamp == colonne.ColumnName) == 0)
                {
                    CColonneePivot pivot = new CColonneePivot(colonne.ColumnName, "");
                    if (CFormEditColonnePivot.EditPivot(pivot))
                    {
                        m_tableauCroise.AddChampColonne(pivot);
                        InitChamps(m_tableSource, m_tableauCroise);
                        e.Effect = DragDropEffects.Move;
                        return;
                    }
                }
            }
            e.Effect = DragDropEffects.None;
        }