Exemple #1
0
 private void FillDataGrid(dynamic list)
 {
     foreach (var item in list)
     {
         var r = new CustomControls.DataRow();
         DVValues.Add(r.CreateRow(item), item._id);
     }
 }
Exemple #2
0
        /// <summary>
        /// Refreshes the DataGridView based on given last type choosen, from database
        /// </summary>
        private void RefreshDataGridView()
        {
            dynamic comps = GetCRUD(_lastType);
            var     list  = comps.GetAll();

            DVValues.Init(_lastType);
            FillDataGrid(list);
        }
Exemple #3
0
        /// <summary>
        /// Refreshes the DataGridView based on given Type, from database.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        private void RefreshDataGridView <T>() where T : DbObject, new()
        {
            dynamic comps = new CRUD <T>();
            var     list  = comps.GetAll();

            DVValues.Init <T>();
            FillDataGrid(list);
        }