/// <summary> /// Tạo 1 PacificCode có giá trị amountBuy /// Lấy 12/16 lưu lại trong PartPacificCode /// </summary> internal static PartPacificCode GetNewPacificCode(Guid storeGuid, Guid customerGuid, int amountBuy) { BlackBoxServiceClient clientService = new BlackBoxServiceClient(); PartPacificCode newPartPacificCode = new PartPacificCode(); string codeNumber = clientService.NewPacificCode(amountBuy); newPartPacificCode.PartCodeNumber = GetPartCodeNumber(codeNumber); newPartPacificCode.StoreUserId = storeGuid; newPartPacificCode.CustomerId = customerGuid; PartPacificCodeDAO.AddNew(newPartPacificCode); ///clientService.Close(); // Lỗi khi đang gọi bị đóng seviceClient return newPartPacificCode; }