Exemple #1
0
 public OrdersController(IOrderDAL oDAL, ICustomerDAL cDAL, ILocationDAL lDAL, ILogger <OrdersController> logger)
 {
     _context     = oDAL;
     _custContext = cDAL;
     _locContext  = lDAL;
     this.logger  = logger;
 }
Exemple #2
0
 public Customer(ICustomerDAL customerDAL, IAddToOrderDAL addtoorderDAL, IItemDAL itemDAL, IOrderDAL orderDAL)
 {
     _customerDAL   = customerDAL;
     _addtoorderDAL = addtoorderDAL;
     _itemDAL       = itemDAL;
     _orderDAL      = orderDAL;
 }
Exemple #3
0
 public User(IShipperDAL shipperDAL, IItemDAL itemDAL, ICustomerDAL customerDAL, IOrderDAL orderDAL, IAddToOrderDAL addtoorderDAL)
 {
     _shipperDAL    = shipperDAL;
     _itemDAL       = itemDAL;
     _customerDAL   = customerDAL;
     _orderDAL      = orderDAL;
     _addtoorderDAL = addtoorderDAL;
 }
        public CustomerMgr(IConfiguration config, LocationMgr lm, OrderMgr om)
        {
            CustomerDAL specifc_DAL = new CustomerDAL();

            DAL         = specifc_DAL;
            _ordManager = om;
            _locManager = lm;
        }
        static void Main(string[] args)
        {
            ICustomerDAL[] customerDals = new ICustomerDAL[2]
            {
                new SQLServer(),
                new OracleServer()
            };

            foreach (var item in customerDals)
            {
                item.Add();
            }
            Console.ReadKey();
        }
Exemple #6
0
 /// <summary>
 /// Khởi tạo tính năng tác nghiệp (Hàm này phải được gọi nếu muốn sử dụng các tính năng của lớp)
 /// </summary>
 /// <param name="dbType"></param>
 /// <param name="connectionString"></param>
 public static void Init(DatabaseTypes dbType, string connectionString)
 {
     switch (dbType)
     {
         case DatabaseTypes.SQLServer:
             CountryDB = new DataLayers.SQLServer.CountryDAL(connectionString);
             CityDB = new DataLayers.SQLServer.CityDAL(connectionString);
             SupplierDB = new DataLayers.SQLServer.SupplierDAL(connectionString);
             CategoryDB = new DataLayers.SQLServer.CategoryDAL(connectionString);
             CustomerDB = new DataLayers.SQLServer.CustomerDAL(connectionString);
             EmployeeDB = new DataLayers.SQLServer.EmployeeDAL(connectionString);
             ShipperDB = new DataLayers.SQLServer.ShipperDAL(connectionString);
             break;
         default:
             throw new Exception("Database Type is not Supported");
     }
 }
        static void Main(string[] args)
        {
            //InterfacePart2();

            /* Polymorphisim(çok biçimlilik), bir nesneyi farklı amaçlarla implement edip,
             * o implementationların belirli bir kısmına veya tamamına ulaşmaktır.
             */
            // Polymorphisim:
            ICustomerDAL[] customerDALs = new ICustomerDAL[]
            {
                new SqlServerCustomerDAL(),
                new OracleCustomerDAL(),
                new MySqlCustomerDAL()
            };

            foreach (var customerDAL in customerDALs)
            {
                customerDAL.Add(); // Veritabanları gezilip, herbiri için Add() çağırılır.
            }
            // Yeni bir veritabanı desteği eklenmek istenirse, kodlara dokunulmadan yeni kısımlar eklenir.
        }
Exemple #8
0
 public CustomersController(ICustomerDAL customerDAL)
 {
     this.customerDAL = customerDAL;
 }
Exemple #9
0
 public OrderService(IOrderDAL orderDAL, ICustomerDAL customerDAL, IEmployeeDAL employeeDAL)
 {
     _orderDAL    = orderDAL;
     _customerDAL = customerDAL;
     _employeeDAL = employeeDAL;
 }
Exemple #10
0
 public CustomerBLL(ICustomerDAL dal, Logger logger)
 {
 }
 public CustomerBLL(ICustomerDAL stub)
 {
     _customer = stub;
 }
 public CustomerBLLConstructor(ICustomerDAL dal, Logger logger)
 {
 }
 public CustomerUsersLogic()
 {
     CustomerDAL = new CustomerDAL();
 }
 public ImporterConstructor(ICustomerDAL dal, Logger log)
 {
     this.dal = dal;
     this.log = log;
 }
Exemple #15
0
 public ReviewController(IActorDAL adal, ICustomerDAL cdal, IFilmDAL fdal)
 {
     _actors    = adal;
     _customers = cdal;
     _films     = fdal;
 }
 public CustomerBLL()
 {
     this.customerDAL = new CustomerDAL();
 }
 public CustomerBLL(ICustomerDAL stub)
 {
     _customer = stub;
 }
Exemple #18
0
 public CustomersController(ICustomerDAL customerDal)
 {
     _customerDAL = customerDal;
 }
Exemple #19
0
 public OrderBLL(IOrderDAL stub)
 {
     _order    = stub;
     _product  = new ProductDALStub();
     _customer = new CustomerDALStub();
 }
Exemple #20
0
 public OrderBLL()
 {
     _order    = new OrderDAL();
     _product  = new ProductDAL();
     _customer = new CustomerDAL();
 }
Exemple #21
0
 public Customer(ICustomerDAL customerDAL)
 {
     _customerDAL = customerDAL;
 }
 public OrderBLL()
 {
     _order = new OrderDAL();
     _product = new ProductDAL();
     _customer = new CustomerDAL();
 }
 public CustomerManager(ICustomerDAL customerDal)
 {
     _iCustomerDal = customerDal;
 }
 public OrderBLL(IOrderDAL stub)
 {
     _order = stub;
     _product = new ProductDALStub();
     _customer = new CustomerDALStub();
 }
 /// <summary>
 /// The MVC framework with the assistance of Ninject, automatically passes in a CustomerDAL.
 /// </summary>
 /// <param name="dal"></param>
 public CustomerController(ICustomerDAL dal)
 {
     this.dal = dal;
 }
Exemple #26
0
 public CustomerBLL(ICustomerDAL ic, Logger logger)
 {
     CustomerDAL = ic;
     Logger      = logger;
 }
 public CustomerUsersLogic(ICustomerDAL stub)
 {
     CustomerDAL = stub;
 }
Exemple #28
0
 public CustomerBLL(ICustomerDAL dal, Logger logger)
 {
     this.dal    = dal;
     this.logger = logger;
 }
 public CustomerBLL()
 {
     _customer = new CustomerDAL();
 }
 public CustomerBLL()
 {
     _customer = new CustomerDAL();
 }
Exemple #31
0
 public CustomerBLL(ICustomerDAL dal, Logger logger)
 {
     CustomerDAL = dal;
     Logger      = logger;
 }
Exemple #32
0
 public CustomerBLL()
 {
     _ICustomerDAL = new CustomerDAL();
 }
 public RentalManager(IRentalDAL rentalDAL, ICarDAL carDAL, ICustomerDAL customerDAL)
 {
     _rentalDAL   = rentalDAL;
     _carDAL      = carDAL;
     _customerDAL = customerDAL;
 }
 public CustomerBLL(ICustomerDAL iCustomerDAL)
 {
     _customerDAL = iCustomerDAL;
     _loggingBLL = new LoggingBLL();
 }
Exemple #35
0
 public void Update(ICustomerDAL customerDAL) // ICustomerDAL veri tipi ile onu kullanan her tipin kullanılması sağlanır.
 {
     customerDAL.Update();                    // Seçilen, gönderilen tipin Update()'i çalışır.
 }
 public CustomerBLL()
 {
     _customerDAL = new CustomerDAL();
     _loggingBLL = new LoggingBLL();
 }