Пример #1
0
        private void Fill()
        {
            CWCarModelsLogic models = new CWCarModelsLogic(manager);

            DataGV.AutoGenerateColumns = false;
            if (brandId != null)
            {
                DataGV.DataSource = models.GetAll(Convert.ToInt32(brandId));
            }
            else
            {
                DataGV.DataSource = models.GetAll();
            }
            DataGV.Update();
        }
Пример #2
0
        private void FillModels()
        {
            CWCarModelsLogic models = new CWCarModelsLogic(manager);

            ModelsDataGV.AutoGenerateColumns = false;
            int?brandId = null;

            if (BrandsDataGV.SelectedRows.Count > 0)
            {
                brandId = Convert.ToInt32(BrandsDataGV.CurrentRow.Cells["BrandID"].Value);
            }
            if (brandId != null)
            {
                ModelsDataGV.DataSource = models.GetAll(Convert.ToInt32(brandId));
            }
            else
            {
                ModelsDataGV.DataSource = models.GetAll();
            }
            ModelsDataGV.Update();
        }
Пример #3
0
 private void FillModels()
 {
     CWCarModelsLogic models = new CWCarModelsLogic(manager);
     ModelsDataGV.AutoGenerateColumns = false;
     int? brandId = null;
     if (BrandsDataGV.SelectedRows.Count > 0)
     {
         brandId = Convert.ToInt32(BrandsDataGV.CurrentRow.Cells["BrandID"].Value);
     }
     if (brandId != null)
         ModelsDataGV.DataSource = models.GetAll(Convert.ToInt32(brandId));
     else
         ModelsDataGV.DataSource = models.GetAll();
     ModelsDataGV.Update();
 }
Пример #4
0
 private void Fill()
 {
     CWCarModelsLogic models = new CWCarModelsLogic(manager);
     DataGV.AutoGenerateColumns = false;
     if(brandId != null)
         DataGV.DataSource = models.GetAll(Convert.ToInt32(brandId));
     else
         DataGV.DataSource = models.GetAll();
     DataGV.Update();
 }