Beispiel #1
0
 private void cbbSubCate_SelectionChangeCommitted(object sender, EventArgs e)
 {
     if (cbbSubCate.SelectedValue != null)
     {
         int           subId    = int.Parse(cbbSubCate.SelectedValue.ToString());
         List <Series> lstSerie = cbbSerie.DataSource as List <Series>;
         if (lstSerie != null)
         {
             ComboboxUtility.BindSerie(cbbSerie, subId);
             cbbSerie.SelectedValue = -1;
         }
     }
 }
Beispiel #2
0
        private void frmProductDemo_Load(object sender, EventArgs e)
        {
            IList <Category> lstCate;
            IList <Series>   lstSerie;

            using (IUnitOfWork uow = new UnitOfWork())
            {
                lstCate  = uow.CategoryRepository.All();
                lstSerie = uow.SeriesRepository.All();
                uow.Commit();
            }
            ComboboxUtility.BindCategory(cbbCategory);
            ComboboxUtility.BindSerie(cbbSerie, 0);
            cbbCategory.SelectedValue = -1;
        }
Beispiel #3
0
 private void frmCreateProd_Load(object sender, EventArgs e)
 {
     ComboboxUtility.BindCategory(cbbCategory);
     ComboboxUtility.BindSerie(cbbSerie, 0);
     //ComboboxUtility.BindClassProduct(cbbClassProduct);
     //ComboboxUtility.BindStandard(cbbStandard);
     //ComboboxUtility.BindSafety(cbbClassSafety);
     //ComboboxUtility.BindLampType(cbbLamptype);
     cbbCategory.SelectedValue     = m_treeTag.CateId;
     cbbSubCate.SelectedValue      = m_treeTag.LineId;
     cbbSerie.SelectedValue        = m_treeTag.SerieId;
     cbbClassProduct.SelectedValue = -1;
     cbbClassSafety.SelectedValue  = -1;
     cbbStandard.SelectedValue     = -1;
 }