Exemplo n.º 1
0
        private static void ColorAddTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                Id = 4, ColorName = "Siyah"
            });
        }
Exemplo n.º 2
0
        private static void ColorAdd()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorName = "Gri"
            });
        }
Exemplo n.º 3
0
        private static void ColorAdded()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                Id = 2, ColorName = "Beyaz"
            });
        }
Exemplo n.º 4
0
        private static void ColorAddedTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorId = 7, ColorName = "Yeşil"
            });
        }
Exemplo n.º 5
0
        private static void ColorTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorId = 33, ColorName = "Red"
            });
        }
Exemplo n.º 6
0
        // ------------------------------- Case 5 : AddNewColor ----------------------------------------
        private static void AddNewColor(ColorManager colorManager)
        {
            Color color1 = new Color();

            Console.WriteLine("Color Name: ");
            color1.ColorName = Console.ReadLine();
            colorManager.Add(color1);
        }
Exemplo n.º 7
0
        private static void ColorTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorName = "Siyah"
            });
            colorManager.Add(new Color {
                ColorName = "Kırmızı"
            });
            Console.WriteLine("---color---");

            foreach (var color in colorManager.GetAll())
            {
                Console.WriteLine(color.ColorId + " " + color.ColorName);
            }
        }
Exemplo n.º 8
0
        private protected static void AddColorTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorName = "Purple"
            });
        }
Exemplo n.º 9
0
        // ************ Color ************
        private static void AddColorTest(Color color)
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            var result = colorManager.Add(color);

            Console.WriteLine(result.Message);
        }
Exemplo n.º 10
0
        private static void AddColor()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                Name = "Bulut Gri"
            });
        }
Exemplo n.º 11
0
        private static void AddColor()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorId = "5", ColorName = "Kırmızı"
            });
        }
Exemplo n.º 12
0
        private static void ColorManagerTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color()
            {
                ColorId = 1, ColorName = "Dark Gray"
            });
            colorManager.Add(new Color()
            {
                ColorId = 2, ColorName = "Light Gray"
            });
            colorManager.Add(new Color()
            {
                ColorId = 3, ColorName = "Black"
            });
        }
Exemplo n.º 13
0
        private static void AddColor(string colorName)
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                Name = colorName
            });
        }
Exemplo n.º 14
0
        private static void ColorAdd()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                Name = "Orrange"
            });
        }
Exemplo n.º 15
0
        private static void AddTest(ColorManager colorManager)
        {
            var result = colorManager.Add(new Color {
                ID = 4, ColorName = "Blue"
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 16
0
        static void Main(string[] args)
        {
            // ***** Car Class manager ******
            CarManager car1 = new CarManager(new EfCarDal());

            car1.Add(new Car
            {
                CarId       = 30,
                BrandId     = 20,
                ColorId     = 10,
                ModelYear   = new DateTime(2010, 2, 2),
                DailyPrice  = 20000,
                Description = "test"
            });
            foreach (var car in car1.GetAll())
            {
                Console.WriteLine("Car ID : " + car.CarId);
                Console.WriteLine("BrandId : " + car.BrandId);
                Console.WriteLine("Color ID : " + car.ColorId);
                Console.WriteLine("Model year : " + car.ModelYear);
                Console.WriteLine("Daily Price : " + car.DailyPrice);
                Console.WriteLine("Description : " + car.Description);
            }

            foreach (var car in car1.GetAllByBrandId(5))
            {
                Console.WriteLine("BrandId : " + car.BrandId);
            }

            foreach (var car in car1.GetByDailyPrice(20, 50))
            {
                Console.WriteLine("Daily Price : " + car.DailyPrice);
            }

            // ***** Color Class manager ******
            ColorManager color1 = new ColorManager(new EfColorDal());

            color1.Add(new Color {
                ColorId = 88, ColorName = "Mavi"
            });
            foreach (var color in color1.GetAll())
            {
                Console.WriteLine("Color ID : " + color.ColorId);
                Console.WriteLine("Color Name : " + color.ColorName);
            }

            // ***** Brand Class manager ******
            BrandManager brand1 = new BrandManager(new EfBrandDal());

            brand1.Add(new Brand {
                BrandId = 50, BrandName = "Toyota"
            });
            foreach (var brand in brand1.GetAll())
            {
                Console.WriteLine("Brand ID : " + brand.BrandId);
                Console.WriteLine("Brand Name : " + brand.BrandName);
            }
        }
Exemplo n.º 17
0
        private static void RunColorManager()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());
            int          options      = -1;

            while (options != 0)
            {
                Console.WriteLine("1)List All Color\n" +
                                  "2)Get Color By ID\n" +
                                  "3)Add Color\n" +
                                  "4)Delete Color\n" +
                                  "5)Update Color\n" +
                                  "0)Exit Menu" +
                                  "");
                options = Convert.ToInt32(Console.ReadLine());
                switch (options)
                {
                case 1:
                    foreach (var color in colorManager.GetAll().Data)
                    {
                        Console.WriteLine("Color ID: {0} = {1}", color.ColorID, color.ColorName);
                    }
                    Console.WriteLine(colorManager.GetAll().Message);
                    break;

                case 2:
                    Console.WriteLine(colorManager.GetID(2).Data.ColorName);
                    break;

                case 3:
                    Console.WriteLine("-Enter Color Name-");
                    string addedColor = Console.ReadLine();
                    colorManager.Add(new Color {
                        ColorName = addedColor
                    });
                    break;

                case 4:
                    Console.WriteLine("-Enter Color ID-");
                    int deletedColor = Convert.ToInt32(Console.ReadLine());
                    colorManager.Delete(new Color {
                        ColorID = deletedColor
                    });
                    break;

                case 5:
                    Console.WriteLine("-Enter Color ID-");
                    int updatedColor = Convert.ToInt32(Console.ReadLine());
                    colorManager.Update(new Color {
                        ColorID = updatedColor, ColorName = "Sarı"
                    });
                    break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 18
0
        private static void ColorTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorName = "white"
            });
            colorManager.Add(new Color {
                ColorName = "black"
            });



            foreach (var color in colorManager.GetAll().Data)
            {
                System.Console.WriteLine(color.ColorName);
            }
        }
Exemplo n.º 19
0
        private static void AddColor()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());
            var          result       = colorManager.Add(new Color {
                ColorName = "Kırmızı"
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 20
0
        private static void AddColor()
        {
            Color color = new Color();

            color.ColorName = "Kahverengi";
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(color);
        }
Exemplo n.º 21
0
        private static void ColorAdd()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());
            Color        color        = new Color();

            color.ColorName = "Pembe";
            colorManager.Add(color);
            ColorGetAll();
        }
Exemplo n.º 22
0
        private static void ColorTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorId = 1, ColorName = "Siyah"
            });
            colorManager.Add(new Color {
                ColorId = 2, ColorName = "Beyaz"
            });
            colorManager.Delete(new Color {
                ColorId = 3, ColorName = "Kırmızı"
            });
            foreach (var color in colorManager.GetAll())
            {
                Console.WriteLine(color.ColorId + " " + color.ColorName);
            }
        }
Exemplo n.º 23
0
        private static void ColorTest()
        {
            ColorManager colorManager = new ColorManager(new EFColorDal());
            var          colorAdded   = colorManager.Add(new Color {
                ColorName = "Red"
            });

            Console.WriteLine(colorAdded.Message);
        }
Exemplo n.º 24
0
        public static void AddColor()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());
            Color        newColor     = new Color();

            Console.Write("Marka Giriniz:");
            newColor.Name = Console.ReadLine();
            colorManager.Add(newColor);
        }
Exemplo n.º 25
0
 private static void DeleteTest(ColorManager colorManagerEF)
 {
     colorManagerEF.Add(new Color {
         Id = 5, Name = "YanlışRenk"
     });
     colorManagerEF.Delete(new Color {
         Id = 5, Name = "YanlışRenk"
     });
 }
Exemplo n.º 26
0
        private static void AddToColor(ColorManager colorManager)
        {
            string colorName;
            Console.Write("\nEklemek istediğiniz yeni Renk Adı : ");
            colorName = Console.ReadLine();

            var result = colorManager.Add(new Color { ColorName=colorName});
            Console.WriteLine(result.Message);
        }
Exemplo n.º 27
0
        private static void ColorAdd()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());
            Color        color        = new Color {
                ColorName = "Yeşlil", ColorId = 3
            };

            colorManager.Add(color);
        }
Exemplo n.º 28
0
        private void AddColor()
        {
            Color color = new Color();

            Console.WriteLine("Name: ");
            color.Name = Console.ReadLine();

            _colorManager.Add(color);
            Console.WriteLine("Color" + Messages.AddSingular);
        }
Exemplo n.º 29
0
 private static void RenkDeneme(ColorManager colorManager)
 {
     colorManager.Add(new Color()
     {
         ColorID = 1, ColorName = "Beyaz"
     });
     colorManager.Add(new Color()
     {
         ColorID = 2, ColorName = "Siyah"
     });
     colorManager.Add(new Color()
     {
         ColorID = 3, ColorName = "Kırmızı"
     });
     colorManager.Add(new Color()
     {
         ColorID = 4, ColorName = "MAVİ"
     });
 }
Exemplo n.º 30
0
        static void Main(string[] args)
        {
            //CarTest();
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.Add(new Color {
                ColorName = "Turuncu"
            });
            Console.WriteLine(colorManager.GetAll());
        }