Exemplo n.º 1
0
 private static void ListCars(CarDtoManager carDtoManager, CarManager carManager, BrandManager brandManager)
 {
     foreach (var car in carDtoManager.GetCarDto(carManager.GetAll(), brandManager.GetAllBrands()))
     {
         Console.WriteLine($"{car.Id}. Marka: {car.BrandName.PadRight(10,' ')}     Fiyat: {car.DailyPrice.ToString().PadRight(10, ' ')}     Açıklama: {car.Description}");
     }
 }
Exemplo n.º 2
0
 private static void ListBrands(BrandManager brandManager)
 {
     foreach (var brand in brandManager.GetAllBrands())
     {
         Console.WriteLine($"{brand.BrandId}. {brand.BrandName}");
     }
 }
Exemplo n.º 3
0
        private static void AllBrandsTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var car in brandManager.GetAllBrands().Data)
            {
                Console.WriteLine(car.BrandId + " " + car.BrandName);
            }
        }
Exemplo n.º 4
0
        private void LoadAllBrandInComboBox()
        {
            List <Brand> brands = aBrandManager.GetAllBrands();

            brandComboBox.DisplayMember = "Name";
            brandComboBox.ValueMember   = "Id";
            brandComboBox.DataSource    = null;
            brandComboBox.DataSource    = brands;
        }
Exemplo n.º 5
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            var          result       = brandManager.GetAllBrands();

            foreach (var brand in result.Data)
            {
                Console.WriteLine(brand.BrandName);
            }
        }
Exemplo n.º 6
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAllBrands().Data)
            {
                Console.WriteLine(brand.BrandName);
            }
            Console.WriteLine(brandManager.GetByBrandId(2).Data);
        }
Exemplo n.º 7
0
        private static void brandtest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            //Brand brand = new Brand() { Id = 2, Name = "Fiat" };
            //brandManager.Add(brand);
            foreach (var b in brandManager.GetAllBrands())
            {
                Console.WriteLine(b.Id + " / " + b.Name);
            }
        }
Exemplo n.º 8
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EFBrandDal());
            Brand        brand        = new Brand
            {
                BrandId = 2,
            };

            brandManager.Add(brand);
            foreach (var brands in brandManager.GetAllBrands().Data)
            {
                Console.WriteLine(brands.BrandName);
            }
        }
Exemplo n.º 9
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            var          result       = brandManager.GetAllBrands();

            if (result.Success == true)
            {
                foreach (var brand in result.Data)
                {
                    Console.WriteLine(brand.BrandName);
                }
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }