コード例 #1
0
 public static void ListBrands(BrandManager brandManager)
 {
     Console.Clear();
     Console.WriteLine("--Tüm Markalar--");
     foreach (var brand in brandManager.GetAll())
     {
         Console.WriteLine($"{brand.Id}. {brand.Name}");
     }
 }
コード例 #2
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAll())
            {
                Console.WriteLine(brand.Name);
            }
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: fatihsahin3/ReCapProject
        private static void TestGetAllBrands(BrandManager brandManager)
        {
            var result = brandManager.GetAll();

            foreach (var brand in result.Data)
            {
                Console.WriteLine(brand.Id + "-" + brand.BrandName);
            }
        }
コード例 #4
0
 private static void DeleteBrand(BrandManager brandManager)
 {
     // Brand brand = new Brand { BrandId = 1002, BrandName = "Bentley" };
     brandManager.Delete(1002);
     foreach (var brand1 in brandManager.GetAll().Data)
     {
         Console.WriteLine(brand1.BrandName);
     }
 }
コード例 #5
0
        private static void GetallBrands()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAll())
            {
                Console.WriteLine("Id " + brand.BrandId + " Name " + brand.BrandName);
            }
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: mertsyilmaz/CarRental
        private static void GetBrands()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine("{0} - {1} ", brand.Id, brand.Name);
            }
        }
コード例 #7
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine($"{brand.Id} - {brand.BrandName}");
            }
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: onurgoz/ReCapProject
 private static void ListedBrand(BrandManager brandManager)
 {
     Console.WriteLine("\n \n \n \n************************************* \n\n\n");
     foreach (var brand in brandManager.GetAll().Data)
     {
         Console.WriteLine(brand.Id + " -- " + brand.Name);
     }
     Console.WriteLine("\n \n \n \n************************************* \n\n\n");
 }
コード例 #9
0
        private static void GetBrand()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandName);
            }
        }
コード例 #10
0
ファイル: Program.cs プロジェクト: hasanbakirci/ReCapProject
        private static void BrandGetAll()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            var          result       = brandManager.GetAll();

            foreach (var b in result.Data)
            {
                Console.WriteLine("--> " + b.BrandName);
            }
        }
コード例 #11
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            var          result       = brandManager.GetAll();

            if (result.Success)
            {
                foreach (var brand in brandManager.GetAll().Data)
                {
                    Console.WriteLine(brand.BrandName);
                }
                Console.WriteLine();
                Console.WriteLine(result.Message);
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }
コード例 #12
0
        private static void GetBrands()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            AddBrand();
            foreach (var item in brandManager.GetAll().Data)
            {
                Console.WriteLine(item.Name);
            }
        }
コード例 #13
0
ファイル: Program.cs プロジェクト: bariskabal/ReCapProject
        private static void BrandManagerTest()
        {
            BrandManager brandManager = new BrandManager(new EFBrandRepository());
            var          brands       = brandManager.GetAll().Data;

            foreach (var item in brands)
            {
                Console.WriteLine(item.BrandName);
            }
        }
コード例 #14
0
        private static void BrandManagerTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            var          brandList    = brandManager.GetAll();

            foreach (Brand brand in brandList.Data)
            {
                Console.WriteLine(" Marka bilgisi: " + brand.Name);
            }
        }
コード例 #15
0
        public ActionResult Create()
        {
            ViewBag.ClaimCreate  = "first active";
            ViewBag.ProductTypes = ProductTypeManager.GetAll();
            ViewBag.Brands       = BrandManager.GetAll();

            BookingClaimViewModel model = new BookingClaimViewModel();

            return(View(model));
        }
コード例 #16
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var item in brandManager.GetAll().Data)
            {
                Console.WriteLine(item.Id + "\t" + item.Name);
                Console.WriteLine(" ");
            }
        }
コード例 #17
0
ファイル: Program.cs プロジェクト: oya-cakmak/ReCapProject
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            //brandManager.Add(new Brand { BrandName="Beetle"});
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandName);
            }
        }
コード例 #18
0
ファイル: Program.cs プロジェクト: elyasefkeceli/ReCapProject
        private static void BrandListText()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine("{0}/{1}", brand.BrandId.ToString(), brand.BrandName);
            }
            Console.ReadLine();
        }
コード例 #19
0
ファイル: Program.cs プロジェクト: mustafaailik/ReCapProject
        static void Main(string[] args)
        {
            CarTest();
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var brand in brandManager.GetAll())
            {
                Console.WriteLine(brand.BrandName);
            }
        }
コード例 #20
0
        private static void BrandGetAllTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            foreach (var b in brandManager.GetAll().Data)
            {
                Console.WriteLine(b.BrandName);
            }
            Console.WriteLine(Messages.BrandsListed);
        }
コード例 #21
0
ファイル: Program.cs プロジェクト: busraagul/CarRentalProject
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            Console.WriteLine(" Brand Id \tBrand Name  ");
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandId + "\t\t" + brand.BrandName);
            }
        }
コード例 #22
0
        private static void BrandGetAllTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            var          result       = brandManager.GetAll().Data;

            foreach (var brand in result)
            {
                Console.WriteLine(brand.BrandName);
            }
        }
コード例 #23
0
ファイル: Program.cs プロジェクト: nesibecetin/ReCapProject
        private static void BrandList()
        {
            BrandManager brandManager = new BrandManager((new EfBrandDal()));
            var          result       = brandManager.GetAll();

            if (result.isSuccess == true)
            {
                foreach (var brand in brandManager.GetAll().Data)
                {
                    Console.WriteLine("Marka Id:" + brand.BrandId + " Marka Adı:"
                                      + brand.BrandName);
                }
                Console.WriteLine(result.Message);
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }
コード例 #24
0
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            var          result       = brandManager.GetAll();

            foreach (var brand in result.Data)
            {
                Console.WriteLine(brand.BrandName + " / " + brand.BrandId);
            }
        }
コード例 #25
0
ファイル: Program.cs プロジェクト: fatmakart/CarRentProject
 private static void ListBrands(BrandManager brandManager)
 {
     Console.WriteLine("\nBrand Id\tBrandName");
     Console.WriteLine("_________________________________\n");
     foreach (var item in brandManager.GetAll().Data)
     {
         Console.WriteLine(item.BrandId + "\t\t" + item.BrandName);
         Console.WriteLine(" ");
     }
 }
コード例 #26
0
        static void Main(string[] args)
        {
            Console.WriteLine("Merhaba!");
            CarManager      carManager      = new CarManager(new EfCarDal());
            BrandManager    brandManager    = new BrandManager(new EfBrandDal());
            ColorManager    colorManager    = new ColorManager(new EfColorDal());
            CustomerManager customerManager = new CustomerManager(new EfCustomerDal());
            RentalManager   rentalManager   = new RentalManager(new EfRentalDal());
            UserManager     userManager     = new UserManager(new EfUserDal());

            Console.WriteLine("Renk Listesi");
            foreach (var color in colorManager.GetAll().Data)
            {
                Console.WriteLine(color.Id + " - " + color.Name);
            }
            Console.WriteLine("----------");

            Console.WriteLine("Marka Listesi");
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.Id + " - " + brand.Name);
            }
            Console.WriteLine("----------");

            Console.WriteLine("Araç Listesi");
            foreach (var car in carManager.GetAll().Data)
            {
                Console.WriteLine(car.Id + " - " + car.Description + " - " + car.ModelYear);
            }
            Console.WriteLine("----------");

            Console.WriteLine("Kullanıcı Listesi");
            foreach (var user in userManager.GetAll().Data)
            {
                Console.WriteLine(user.Id + " - " + user.FirstName + " " + user.LastName);
                //Console.WriteLine(user.Email + " " + user.Password);
            }
            Console.WriteLine("----------");

            Console.WriteLine("Müşteri Listesi");
            foreach (var customer in customerManager.GetAll().Data)
            {
                Console.WriteLine(customer.Id + " " + customer.CompanyName + " " + userManager.GetById(customer.UserId).Data.FirstName);
            }
            Console.WriteLine("----------");

            //foreach (var car in carManager.GetAll())
            //{
            //    Console.WriteLine(car.ModelYear + " " + " " + car.Description + " " + car.DailyPrice + " TL");
            //}
            //foreach (var car in carManager.GetCarDetails())
            //{
            //    Console.WriteLine(car.BrandName + " " + car.ColorName + " " + car.ModelYear + " " + car.Description);
            //}
        }
コード例 #27
0
        private static void Example2()
        {
            CarManager   carManager   = new CarManager(new EfCarDal(), new CustomerManager(new EfCustomerDal()));
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            ColorManager colorManager = new ColorManager(new EfColorDal());

            Console.WriteLine("Arabaların Açıklamaları");

            var result = carManager.GetAll();

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

            Console.WriteLine("----------------");
            Console.WriteLine("Renklerin Adı");
            var result1 = colorManager.GetAll();

            if (result1.Success == true)
            {
                foreach (var color in result1.Data)
                {
                    Console.WriteLine(color.ColorName);
                }
            }
            else
            {
                Console.WriteLine(result1.Message);
            }

            Console.WriteLine("-----------------");
            Console.WriteLine("Markaların Adı");

            var result2 = brandManager.GetAll();

            if (result2.Success == true)
            {
                foreach (var brand in result2.Data)
                {
                    Console.WriteLine(brand.BrandName);
                }
            }
            else
            {
                Console.WriteLine(result2.Message);
            }
        }
コード例 #28
0
        private static void BrandTest(BrandManager brandManager)
        {
            Console.WriteLine("BrandId'ye göre markalar (2)");
            var brandGetById = brandManager.GetById(2).Data;

            Console.WriteLine("BrandId={0} BrandName={1}", brandGetById.BrandId, brandGetById.BrandName);



            Console.WriteLine("Bütün markalar");
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandId + "  " + brand.BrandName);
            }
            brandManager.Add(new Brand {
                BrandName = "Alfa Romeo"
            });

            Console.WriteLine("Eklemeden sonra bütün markalar");
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandId + "  " + brand.BrandName);
            }

            brandManager.Update(new Brand {
                BrandId = 4, BrandName = "Cadillac"
            });
            Console.WriteLine("Güncellemeden sonra bütün markalar");
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandId + "  " + brand.BrandName);
            }

            brandManager.Delete(new Brand {
                BrandId = 5
            });
            Console.WriteLine("Silmeden sonra bütün markalar");
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandId + "  " + brand.BrandName);
            }
        }
コード例 #29
0
ファイル: Program.cs プロジェクト: mitra47/ReCapProject-
 public static void ListByPrice(CarManager carManager, BrandManager brandManager)
 {
     Console.Clear();
     foreach (var car in carManager.GetAll().Data)
     {
         foreach (var brand in brandManager.GetAll().Data.Where(p => p.BrandId == car.BrandId))
         {
             Console.WriteLine(" Marka:{0} Çıkış Yılı:{1} Fiyat:{2}\n", brand.BrandName, car.ModelYear, car.DailyPrice);
         }
     }
 }
コード例 #30
0
ファイル: Program.cs プロジェクト: ilaydamert/RentCar
        private static void BrandTest()
        {
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            //Console.WriteLine(brandManager.GetById(1).Data.BrandName);
            Console.WriteLine(brandManager.GetById(1).Message);
            foreach (var brand in brandManager.GetAll().Data)
            {
                Console.WriteLine(brand.BrandId + "/ " + brand.BrandName);
            }
        }