Ejemplo n.º 1
0
 virtual protected void FillComboBox <T>(IDataReaderUpdater dr, IColumn code, IColumn description)
 {
     dr.Find();
     for (int t = 0; t < dr.Count; t++)
     {
         cbbManager.AddValue(dr.GetValue <T>(code, t), dr.GetValue <string>(description, t));
     }
 }
        virtual public void RefreshDataReader(IDataReaderUpdater dr, IColumn code, IColumn description)
        {
            cbbManager.Clear <string>();
            dr.Find();
            for (int t = 0; t < dr.Count; t++)
            {
                cbbManager.AddValue(dr.GetValue <string>(code, t), dr.GetValue <string>(description, t));
            }

            cbbManager.Refresh();
        }
Ejemplo n.º 3
0
 virtual public void AttachDataReader <T>(IDataReaderUpdater dr, IColumn code, IColumn description, bool alsoNull)
 {
     CreateList <T>();
     if (GlobalInfo.DBaseInfo.dbManager != null)
     {
         if (alsoNull)
         {
             AddValue <T>(default(T), string.Empty);
         }
         dr.Find();
         for (int t = 0; t < dr.Count; t++)
         {
             AddValue <T>(dr.GetValue <T>(code, t), dr.GetValue <string>(description, t));
         }
     }
 }
Ejemplo n.º 4
0
 virtual public void AttachDataReader(IDataReaderUpdater dr, IColumn code, IColumn description)
 {
     if (GlobalInfo.DBaseInfo.dbManager != null)
     {
         dr.Find();
         for (int t = 0; t < dr.Count; t++)
         {
             Items.Add(new GenericList <string>(dr.GetValue <string>(code, t), dr.GetValue <string>(description, t), true));
         }
     }
 }