Esempio n. 1
0
 /// <summary>
 /// constructor optionally calls method to init the column information structure 
 /// and return the itself - singleton
 /// </summary>
 /// <param name="dt">table</param>
 /// <param name="init">if true, initialize; for example, on import</param>
 /// <returns></returns>
 public static dtColumnInformation getdtCI(DataTable dt, bool init)
 {
     //pass null after initialization to access the DTcolInfo property
     //or pass init=true (after import) to initialize
     if (dtCI == null || init) dtCI = new dtColumnInformation(dt);
     return dtCI;
 }
Esempio n. 2
0
        /// <summary>
        /// Constructor takes the datagridview to show changes implemented in this class
        /// </summary>
        /// <param name="dgv">datasheet grid reference</param>
        /// <param name="dt">datasource for the grid</param>
        public frmMissingValues(DataGridView dgv, DataTable dt)
        {
            InitializeComponent();

            _tu = new Utilities.TableUtils(dt);
            _dtRI = dtRowInformation.getdtRI(_dt, false);
            _dtCI = dtColumnInformation.getdtCI(dt, false);

            //get a working copy of the dataset
            _dt = dt.Copy();
            _dgv = dgv;

            cboCols.DataSource = strArrDdlReplaceWith;
            btnReturn.Enabled = false;
        }
Esempio n. 3
0
 public void registerNewCols(DataTable dt)
 {
     _dtCI = dtColumnInformation.getdtCI(dt, false);
     foreach (DataColumn c in dt.Columns)
     {
         if (!_dtCI.getColStatus(c.ColumnName))
         {
             _dtCI.addColumnNameToDic(c.ColumnName);
         }
     }
 }
Esempio n. 4
0
 public TableUtils(DataTable dt)
 {
     _dt = dt;
     _dtCI = dtColumnInformation.getdtCI(dt, false);
     _dtRI = dtRowInformation.getdtRI(dt, false);
 }