From 05ecaf61af465381b83ccb2e848b883ff12d7ff1 Mon Sep 17 00:00:00 2001 From: Thomas Wiedebusch Date: Thu, 28 Oct 2021 17:58:29 +0200 Subject: [PATCH] FwUpdateBuilder: - prepared access to outstanding FW update safes, - prepared to access report files --- .gitattributes | 63 ++++ .../Common/FwUpdateDb/FwUpdateDb.cs | 1 - .../Const/ProcessState.cs | 10 + .../FrmFwUpdateBuilder.cs | 337 +++++++++++++----- .../Properties/Resources.Designer.cs | 18 + .../Properties/Resources.de.resx | 6 + .../Properties/Resources.resx | 6 + 7 files changed, 358 insertions(+), 83 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/ServiceFwUpdate/Common/FwUpdateDb/FwUpdateDb.cs b/ServiceFwUpdate/Common/FwUpdateDb/FwUpdateDb.cs index 7733418e..f5908ac0 100644 --- a/ServiceFwUpdate/Common/FwUpdateDb/FwUpdateDb.cs +++ b/ServiceFwUpdate/Common/FwUpdateDb/FwUpdateDb.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Reflection; using System.Text; diff --git a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Const/ProcessState.cs b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Const/ProcessState.cs index 75062e04..10eaad90 100644 --- a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Const/ProcessState.cs +++ b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Const/ProcessState.cs @@ -58,6 +58,16 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder.Const /// GetCordonelProductionOrdersFromDb, + /// + /// Load all Cordonel FW update safes from DB + /// + GetFwUpdateSafesFromDb, + + /// + /// Load all Cordonel FW update report files from DB + /// + GetReportFilesFromDb, + /// /// Load all Cordonel serial numbers off a specific order from DB /// diff --git a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/FrmFwUpdateBuilder.cs b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/FrmFwUpdateBuilder.cs index ea5647aa..1adb3dd1 100644 --- a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/FrmFwUpdateBuilder.cs +++ b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/FrmFwUpdateBuilder.cs @@ -176,6 +176,8 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder private Boolean _customersPropertyChanged; private Boolean _cordonelsPropertyChanged; private Boolean _fwPackagePropertyChanged; + private Boolean _fwReportFilesPropertyChanged; + private Boolean _fwUpdateSafesPropertyChanged; private Boolean _preBuildSummaryPropertyChanged; /// @@ -238,6 +240,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Sleep on equal process state to force suspend of actual thread. /// + /// + /// - Added report files and FW-Update safes load from DB. + /// private void FwUpdateBuilderStateMachine() { while (!_processToken.IsCancellationRequested) @@ -280,6 +285,14 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder LoadDbCordonelCustomersTask(); break; + case ProcessState.GetReportFilesFromDb: + LoadDbReportFilesTask(); + break; + + case ProcessState.GetFwUpdateSafesFromDb: + LoadDbOutstandingFwUpdateSafesTask(); + break; + case ProcessState.GetFwUpdateOperatorsFromDb: LoadDbFwUpdateOperatorsTask(); break; @@ -360,6 +373,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Checks exported /// + /// + /// - Added checks for FW-update safes and report files. + /// private void TmrProgressUpdate_Tick(Object sender, EventArgs e) { Thread.CurrentThread.CurrentUICulture = _cultureInfo; @@ -379,6 +395,8 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder CheckCustomerChange(); CheckCordonelChange(); CheckFwPackageChange(); + CheckFwUpdateSafesChange(); + CheckReportFilesChange(); break; case ProcessState.BuildFwUpdateSafe: SetStatusProgressBar(ProgressBarStatus.Value + 1 > 100 ? 0 : ProgressBarStatus.Value + 1); @@ -389,6 +407,8 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder case ProcessState.GetCustomersFromDb: case ProcessState.GetFwPackagesFromDb: case ProcessState.GetCordonelSerialNumbersFromDb: + case ProcessState.GetFwUpdateSafesFromDb: + case ProcessState.GetReportFilesFromDb: case ProcessState.UploadFwUpdateSafeToDb: CheckDbConnectionTimeout(); SetStatusProgressBar(ProgressBarStatus.Value + 1 > 100 ? 0 : ProgressBarStatus.Value + 1); @@ -660,6 +680,26 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// private void tabControlSelection_Selected(Object sender, TabControlEventArgs e) { + if (e.TabPage == tabPageFwUpdateSafes) + { + DisableAllControlsInvoked(); + UiInvoker.ToolStripLabelInvoker(lblStatusDbConnect, ColorSuccess, Resources.StrReadingFwUpdateSafes); + SetStatusProgressBar(); + _dbAccessDelayCtrMs = 0; + _processState = ProcessState.GetFwUpdateSafesFromDb; + + } + + if (e.TabPage == tabPageReports) + { + DisableAllControlsInvoked(); + UiInvoker.ToolStripLabelInvoker(lblStatusDbConnect, ColorSuccess, Resources.StrReadingReportFiles); + SetStatusProgressBar(); + _dbAccessDelayCtrMs = 0; + _processState = ProcessState.GetReportFilesFromDb; + + } + if (e.TabPage == tabPageCordonelSelection) { // avoid reading of DB contents and reset of selection if customer remains identical @@ -1085,6 +1125,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Added FwUpdateSafeDb preparation /// + /// + /// - Added BuildFwUpdateSwContainerFromDb, not longer taken from locally file system! + /// public Boolean BuildFwUpdateSafe() { if (string.IsNullOrEmpty(lblUpdateOperator.Text)) return false; @@ -1769,6 +1812,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder // update output information FillDataGridWithUpdateOperatorInfos(); } + /// /// Check for change of customer. /// @@ -1787,6 +1831,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder // update output information FillDataGridWithCustomerInfos(); } + /// /// Check for change of Cordonels. /// @@ -1833,6 +1878,36 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder // update output information FillDataGridWithFwPackageInfos(); } + + /// + /// Check for change of report files. + /// + /// + /// - Initial + /// + private void CheckReportFilesChange() + { + if (!_fwReportFilesPropertyChanged) return; + + _fwReportFilesPropertyChanged = false; + // update output information + FillDataGridWithReportFilesInfos(); + } + + /// + /// Check for change of Fw update safes. + /// + /// + /// - Initial + /// + private void CheckFwUpdateSafesChange() + { + if (!_fwUpdateSafesPropertyChanged) return; + + _fwUpdateSafesPropertyChanged = false; + // update output information + FillDataGridWithFwUpdateSafesInfos(); + } #endregion --------------------------------------- Checks ----------------------------------------------------- #region ------------------------------------------ Tools ------------------------------------------------------ @@ -1990,6 +2065,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder break; } } + /// /// Common message window. /// @@ -2381,6 +2457,66 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder }); } + /// + /// Acquire all report files from DB. + /// + /// + /// - Initial + /// + private void LoadDbReportFilesTask() + { + _invokerProcessState = _processState; + Task.Factory.StartNew(() => + { + Thread.CurrentThread.CurrentUICulture = _cultureInfo; + Thread.CurrentThread.CurrentCulture = _cultureInfo; + try + { + // check DB connection in advance to overcome the timing issues for DB service startup + _fwUpdateDbAccess.CheckDbConnection(); + GetReportFilesFromDb(); + } + catch (Exception) + { + _processState = ProcessState.Error; + } + }).ContinueWith(delegate + { + _fwReportFilesPropertyChanged = true; + _processState = ProcessState.Idle; + }); + } + + /// + /// Acquire all FW-Update safes from DB. + /// + /// + /// - Initial + /// + private void LoadDbOutstandingFwUpdateSafesTask() + { + _invokerProcessState = _processState; + Task.Factory.StartNew(() => + { + Thread.CurrentThread.CurrentUICulture = _cultureInfo; + Thread.CurrentThread.CurrentCulture = _cultureInfo; + try + { + // check DB connection in advance to overcome the timing issues for DB service startup + _fwUpdateDbAccess.CheckDbConnection(); + GetOutstandingFwUpdateSafesFromDb(); + } + catch (Exception) + { + _processState = ProcessState.Error; + } + }).ContinueWith(delegate + { + _fwUpdateSafesPropertyChanged = true; + _processState = ProcessState.Idle; + }); + } + /// /// Acquire all Customers specified by search mask from DB. /// @@ -2675,9 +2811,33 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder grpLanguageSelection.Enabled = true; } } - #endregion --------------------------------------- Data Grid FW Packages --------------------------------------- + #region ------------------------------------------ Data Grid Update Safes -------------------------------------- + /// + /// Build data grid for FW-Update update safes + /// + /// + /// - Initial. + /// + private void FillDataGridWithFwUpdateSafesInfos() + { + } + #endregion --------------------------------------- Data Grid Update Safes -------------------------------------- + + #region ------------------------------------------ Data Grid Report Files -------------------------------------- + /// + /// Build data grid for FW-Update report files + /// + /// + /// - Initial. + /// + private void FillDataGridWithReportFilesInfos() + { + } + + #endregion --------------------------------------- Data Grid Report Files -------------------------------------- + #region ------------------------------------------ Data Grid Pre Build Summary -------------------------------- /// /// Overwrite cell click, because edit of cells is denied (read only == true). This is needed for @@ -3740,10 +3900,10 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Getting orders directly from DB. /// - private Boolean GetAllCordonelOrdersOfCustomerFromDb() + private void GetAllCordonelOrdersOfCustomerFromDb() { // get the customer ID - if (_fwUpdateDbAccess == null || string.IsNullOrEmpty(lblCustomerNumber.Text)) return false; + if (_fwUpdateDbAccess == null || string.IsNullOrEmpty(lblCustomerNumber.Text)) return; if (Int64.TryParse(lblCustomerNumber.Text, out var customerId)) { @@ -3751,14 +3911,11 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder } _processState = ProcessState.Idle; - return _fwUpdateDbAccess?.DbCordonelCustomerOrders != null && - _fwUpdateDbAccess.DbCordonelCustomerOrders.Count > 0; } /// /// Get the Cordonel serial numbers from DB. /// - /// true if successful /// /// - Initial. /// @@ -3774,10 +3931,10 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Clear search info on new search. /// - private Boolean GetAllCordonelSerialNumbersOfOrderFromDb() + private void GetAllCordonelSerialNumbersOfOrderFromDb() { // get the customer ID - if (_fwUpdateDbAccess == null || string.IsNullOrEmpty(lblCustomerNumber.Text)) return false; + if (_fwUpdateDbAccess == null || string.IsNullOrEmpty(lblCustomerNumber.Text)) return; // remove last search infos _cordonelProductionSearchInfos.Clear(); @@ -3847,34 +4004,28 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder }// orders from customer could be acquired _processState = ProcessState.Idle; - return _cordonelProductionSearchInfos.Count > 0; } /// /// Get the Cordonel customers from DB. /// - /// true if successful /// /// - Initial. /// /// /// - Search pattern added. /// - private Boolean GetAllCordonelCustomersFromDb() + private void GetAllCordonelCustomersFromDb() { var searchPattern = tbxCustomerSearchMask.Text.Replace(" ", ""); - var returnValue = _fwUpdateDbAccess != null && - _fwUpdateDbAccess.GetAllCordonelCustomersFromDb(searchPattern) && - _fwUpdateDbAccess.DbSearchedCordonelCustomers.Count > 0; + _fwUpdateDbAccess?.GetAllCordonelCustomersFromDb(searchPattern); _processState = ProcessState.Idle; - return returnValue; } /// /// Get Cordonel FW packages from DB end extract all needed information to select a package to the /// CordonelFwPackageInfo search list. /// - /// true if successful /// /// - Initial. /// @@ -3884,11 +4035,11 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Configuration files loading from DB: - MeterFwUpdateRuler, configuration.json and MeterEraseRestore. /// - private Boolean GetCordonelFwPackagesFromDb() + private void GetCordonelFwPackagesFromDb() { if (_fwUpdateDbAccess == null || !_fwUpdateDbAccess.GetAllCordonelFwInfoFilesFromDb() || _fwUpdateDbAccess.DbCordonelFwPackages.Count == 0 || _cordonelFwPackageInfoSearch == null) - return false; + return; _cordonelFwPackageInfoSearch.Clear(); // The configuration files contain the latest MeterFwUpdateRuler.json (needed for the FwUpdateBuilder), @@ -3908,65 +4059,65 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder fwPackageFilesInfo != null && fwPackageFilesInfo.Count > 0) { // parse file information - var fwPackInfo = new CordonelFwPackageInfo + if (dbCordonelFwFile.CordonelFwFile_Dn != null) { - ReleaseNameVersion = dbCordonelFwFile.FileName, - Region = dbCordonelFwFile.FileName.Contains("EMEA") ? "EMEA" : "NA", - RadioFrequencyMhz = dbCordonelFwFile.FileName.Contains("433") ? "433" : - dbCordonelFwFile.FileName.Contains("868") ? "868" : "-", - FileIsLatest = dbCordonelFwFile.FileIsLatest, - MeterSize = MeterSizeConverter.ConvertOrderSizeNumberToSizeName( - MeterSizeConverter.ConvertToOrder((MeterSize)dbCordonelFwFile.CordonelFwFile_Dn)), - ReleaseDate = dbCordonelFwFile.FileDate, - ReleaseVersion = $"{nameSplit[nameSplit.Length - 1].Substring(0, 3)}." + - $"{nameSplit[nameSplit.Length - 1].Substring(3, 2)}" - }; - // the release version is always the last element of the name split - foreach (var binfile in fwPackageFilesInfo) - { - // extract metrology version - if (binfile.FileName.Contains("binfile0F_")) + var fwPackInfo = new CordonelFwPackageInfo { - var msb = binfile.FileName.Substring(10, 2); - // remove leading 0 - var msbMsb = msb.Substring(0, 1); - if (msbMsb == "0") msb = msb.Remove(0, 1); - var lsb = binfile.FileName.Substring(12, 2); - fwPackInfo.MetrologyVersion = $"{msb}.{lsb}"; - break; - } - } - // take the meter fw update ruler to extract core min /max and released - foreach (var rule in _meterFwUpdateRuler) - { - var releaseVersion = $"{rule.Release.Substring(0, 3)}." + - $"{rule.Release.Substring(3, 2)}"; - if (releaseVersion == fwPackInfo.ReleaseVersion) + ReleaseNameVersion = dbCordonelFwFile.FileName, + Region = dbCordonelFwFile.FileName.Contains("EMEA") ? "EMEA" : "NA", + RadioFrequencyMhz = dbCordonelFwFile.FileName.Contains("433") ? "433" : + dbCordonelFwFile.FileName.Contains("868") ? "868" : "-", + FileIsLatest = dbCordonelFwFile.FileIsLatest, + MeterSize = MeterSizeConverter.ConvertOrderSizeNumberToSizeName( + MeterSizeConverter.ConvertToOrder((MeterSize)dbCordonelFwFile.CordonelFwFile_Dn)), + ReleaseDate = dbCordonelFwFile.FileDate, + ReleaseVersion = $"{nameSplit[nameSplit.Length - 1].Substring(0, 3)}." + + $"{nameSplit[nameSplit.Length - 1].Substring(3, 2)}" + }; + // the release version is always the last element of the name split + foreach (var binfile in fwPackageFilesInfo) { - int.TryParse(rule.CoreVersionMin, out var x); - fwPackInfo.CoreVersionMin = x; - x = 0; - int.TryParse(rule.CoreVersionMax, out x); - fwPackInfo.CoreVersionMax = x; - fwPackInfo.FwIsReleased = !string.IsNullOrEmpty(rule.ApproverName); + // extract metrology version + if (binfile.FileName.Contains("binfile0F_")) + { + var msb = binfile.FileName.Substring(10, 2); + // remove leading 0 + var msbMsb = msb.Substring(0, 1); + if (msbMsb == "0") msb = msb.Remove(0, 1); + var lsb = binfile.FileName.Substring(12, 2); + fwPackInfo.MetrologyVersion = $"{msb}.{lsb}"; + break; + } + } + // take the meter fw update ruler to extract core min /max and released + foreach (var rule in _meterFwUpdateRuler) + { + var releaseVersion = $"{rule.Release.Substring(0, 3)}." + + $"{rule.Release.Substring(3, 2)}"; + if (releaseVersion == fwPackInfo.ReleaseVersion) + { + int.TryParse(rule.CoreVersionMin, out var x); + fwPackInfo.CoreVersionMin = x; + int.TryParse(rule.CoreVersionMax, out x); + fwPackInfo.CoreVersionMax = x; + fwPackInfo.FwIsReleased = !string.IsNullOrEmpty(rule.ApproverName); + } } - } - _cordonelFwPackageInfoSearch.Add(fwPackInfo); + _cordonelFwPackageInfoSearch.Add(fwPackInfo); + } } } - return _cordonelFwPackageInfoSearch.Count > 0; } /// /// Get the license information from DB. In DEBUG mode the license of the software will be skipped, /// but user license is of importance. /// - /// true if successful /// /// - Initial. /// - private Boolean GetLicenseFromDb() + private void GetLicenseFromDb() { // FW-Update Builder validation with DB access var access = false; @@ -3990,7 +4141,6 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder _licenseUnchecked = false; CheckUserRegistration(); - return true; } /// @@ -4006,10 +4156,38 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder return _fwUpdateDbAccess != null && _fwUpdateDbAccess.UploadFwUpdateSafeToDb(_fwUpdateSafeDb, pcbIds); } + /// + /// Get all FW update report files from DB. + /// + /// + /// - Initial. + /// + private void GetReportFilesFromDb() + { + var fwUpdateReports = new List(); + _fwUpdateDbAccess?.DownloadFwUpdateReportsFromDb(out fwUpdateReports); + } + /// + /// Get all active FW update safes from DB. Outdated safes cannot be accessed. + /// + /// + /// - Initial. + /// + private void GetOutstandingFwUpdateSafesFromDb() + { + var fwUpdateSafes= new List(); + if (_fwUpdateDbAccess != null) + { + foreach (var user in _fwUpdateDbAccess.DbFullQualifiedUpdateOperators) + { + _fwUpdateDbAccess.ListAllFwUpdateSafesOfUserFromDb(user.Id, out var fwUpdateSafesOfUser); + fwUpdateSafes.AddRange(fwUpdateSafesOfUser); + } + } + } /// /// Get the full qualified user information from DB to generate the primary key for encryption. /// - /// true if successful /// /// - Initial. /// @@ -4022,10 +4200,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Removed DB status. /// - private Boolean GetAllUpdateOperatorsFromDb() + private void GetAllUpdateOperatorsFromDb() { - return _fwUpdateDbAccess != null && _fwUpdateDbAccess.GetAllUpdateOperatorsFromDb() && - _fwUpdateDbAccess.DbFullQualifiedUpdateOperators.Count > 0; + _fwUpdateDbAccess?.GetAllUpdateOperatorsFromDb(); } /// @@ -4034,7 +4211,6 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// HW Id, the domain, the LogInName and the users password hash. /// The user registration has to be done in advance in the FW-Update Loader! /// - /// true if successful /// /// - Initial. /// @@ -4044,18 +4220,16 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Replaced userInfo by name of update operator. /// - private Boolean BuildPrimaryKey(String updateOperator) + private void BuildPrimaryKey(String updateOperator) { if (_fwUpdateDbAccess == null || !_fwUpdateDbAccess.GetFullQualifiedUserByFullName(updateOperator, out var userInfo)) { - return false; + return; } _primaryKey = FwUpdateCrypt.BuildPrimaryKey(userInfo.HardwareId, userInfo.Domain, userInfo.LogInName, userInfo.PasswordHash); - return true; - } /// @@ -4110,16 +4284,15 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// the latest configuration.json and the latest MeterEraseRestore.json (needed for the FwUpdateSw). /// Copies the MeterFwUpdateRuler.json to the [exe-root] or [exe-root]/Library of the FwUpdateBuilder. /// - /// true if successful /// /// - Initial. /// - private Boolean GetFwUpdateConfigFilesFromDb() + private void GetFwUpdateConfigFilesFromDb() { if (_fwUpdateDbAccess == null || !_fwUpdateDbAccess.DownloadFwUpdateConfigurationFilesFromDb() || _fwUpdateDbAccess.DbFwUpdateConfigFiles.Count == 0) - return false; + return; try { @@ -4147,9 +4320,8 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder catch (Exception) { - return false; + // nothing to do } - return true; } /// @@ -4377,13 +4549,13 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Modified for flexible licenses. /// - private Boolean SetFwUpdateSwLicenseToDb(SoftwareLicense license) + private void SetFwUpdateSwLicenseToDb(SoftwareLicense license) { if (_fwUpdateDbAccess != null && _fwUpdateDbAccess.SetSwLicenseToDb(license)) { LogSuccessText($"{Resources.StrSwLicenseSetSuccessfully} {license.Program} " + $"{license.Major}.{license.Minor}.{license.Build}"); - return true; + return; } if (_fwUpdateDbAccess != null && !_fwUpdateDbAccess.DbIsConnected) @@ -4401,7 +4573,6 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder MessageBoxShow(Resources.StrSwLicenseSetFailed, Resources.StrError, MessageBoxButtons.OK, MessageBoxIcon.Error); } - return false; } /// @@ -4421,14 +4592,14 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder /// /// - Messages removed. /// - private Boolean GetFwUpdateSwLicenseFromDb(String programName, out SoftwareLicense license) + private void GetFwUpdateSwLicenseFromDb(String programName, out SoftwareLicense license) { if (_fwUpdateDbAccess != null && - _fwUpdateDbAccess.GetSwLicenseFromDb(programName, out license)) return true; + _fwUpdateDbAccess.GetSwLicenseFromDb(programName, out license)) + return; license = null; - return false; } /// @@ -4623,6 +4794,8 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder _customersPropertyChanged = true; _cordonelsPropertyChanged = true; _fwPackagePropertyChanged = true; + _fwReportFilesPropertyChanged = true; + _fwUpdateSafesPropertyChanged = true; _preBuildSummaryPropertyChanged = true; lblFwUpdateDutyDate.Text = _datePicker.Value.ToShortDateString(); diff --git a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.Designer.cs b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.Designer.cs index 4f663353..cc286d53 100644 --- a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.Designer.cs +++ b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.Designer.cs @@ -341,6 +341,15 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder.Properties { } } + /// + /// Looks up a localized string similar to Acquiring FW Update Safes..... + /// + internal static string StrReadingFwUpdateSafes { + get { + return ResourceManager.GetString("StrReadingFwUpdateSafes", resourceCulture); + } + } + /// /// Looks up a localized string similar to Acquiring Production Orders..... /// @@ -350,6 +359,15 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder.Properties { } } + /// + /// Looks up a localized string similar to Acquiring Report Files..... + /// + internal static string StrReadingReportFiles { + get { + return ResourceManager.GetString("StrReadingReportFiles", resourceCulture); + } + } + /// /// Looks up a localized string similar to Acquiring update operators..... /// diff --git a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.de.resx b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.de.resx index bdf86aa6..9883451d 100644 --- a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.de.resx +++ b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.de.resx @@ -153,6 +153,12 @@ Ermittelle FW-Pakete.... + + Ermittelle FW Update Safes.... + + + Ermittelle Berichte.... + Ermittelle Kunden.... diff --git a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.resx b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.resx index 30254d81..8a9730b5 100644 --- a/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.resx +++ b/ServiceFwUpdate/Ui/ServiceFwUpdateBuilder/Properties/Resources.resx @@ -159,6 +159,12 @@ Acquiring FW packages.... + + Acquiring FW Update Safes.... + + + Acquiring Report Files.... + Acquiring Cordonels....