public User(IShipperDAL shipperDAL, IItemDAL itemDAL, ICustomerDAL customerDAL, IOrderDAL orderDAL, IAddToOrderDAL addtoorderDAL) { _shipperDAL = shipperDAL; _itemDAL = itemDAL; _customerDAL = customerDAL; _orderDAL = orderDAL; _addtoorderDAL = addtoorderDAL; }
/// <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"); } }
public ShipperService(IShipperDAL shipperDAL) { _shipperDAL = shipperDAL; }
public Shipper(IShipperDAL shipperDAL) { _shipperDAL = shipperDAL; }