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