| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 | 
							- using Comal.Classes;
 
- using InABox.Core;
 
- using InABox.Wpf;
 
- using InABox.WPF;
 
- using javax.swing;
 
- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- namespace PRSDesktop.Integrations.Logikal
 
- {
 
-     public static class LogikalCommon
 
-     {
 
-         //public static JobStatus? JobStatus { get; private set; }
 
-         //public static TaxCode? TaxCode { get; private set; }
 
-         //public static ProductDimensionUnit? ProfileUOM { get; private set; }
 
-         //public static ProductDimensionUnit? ComponentUOM { get; private set; }
 
-         //public static ProductDimensionUnit? GlassUOM { get; private set; }
 
-         public static bool CheckSettings(LogikalSettings settings)
 
-         {
 
-             // List<String> errors = new();
 
-             //
 
-             // MultiQuery query = new MultiQuery();
 
-             //
 
-             // Progress.ShowModal("Checking Settings", progress =>
 
-             // {
 
-             //
 
-             //     if (settings.ImportJobs)
 
-             //         query.Add(
 
-             //             new Filter<JobStatus>(x => x.ID).IsEqualTo(settings.JobStatus.ID),
 
-             //             Columns.All<JobStatus>()
 
-             //         );
 
-             //
 
-             //     query.Add(
 
-             //         new Filter<TaxCode>(x => x.ID).IsEqualTo(settings.TaxCode.ID),
 
-             //         Columns.All<TaxCode>()
 
-             //     );
 
-             //
 
-             //     query.Add(
 
-             //         new Filter<ProductDimensionUnit>(x => x.ID)
 
-             //             .InList([settings.ProfileUom.ID, settings.GasketUom, settings.ComponentUom.ID, settings.GlassUom.ID]),
 
-             //         Columns.All<ProductDimensionUnit>()
 
-             //     );
 
-             //
 
-             //     query.Query();
 
-             // });
 
-             //
 
-             // if (settings.ImportJobs)
 
-             // {
 
-             //     JobStatus = query.Get<JobStatus>().ToObjects<JobStatus>().FirstOrDefault();
 
-             //     if (JobStatus == null)
 
-             //         errors.Add("Job Status has not been configured correctly!");
 
-             // }
 
-             //
 
-             // TaxCode = query.Get<TaxCode>().ToObjects<TaxCode>().FirstOrDefault();
 
-             // if (TaxCode == null)
 
-             //     errors.Add("Tax Code has not been configured correctly!");
 
-             //
 
-             // var _uoms = query.Get<ProductDimensionUnit>().ToObjects<ProductDimensionUnit>().ToList();
 
-             // ProfileUOM = _uoms.FirstOrDefault(x => string.Equals(x.Code, settings.ProfileUom));
 
-             // ComponentUOM = _uoms.FirstOrDefault(x => string.Equals(x.Code, settings.ComponentUom));
 
-             // GlassUOM = _uoms.FirstOrDefault(x => string.Equals(x.Code, settings.GlassUom));
 
-             //
 
-             // if (ProfileUOM == null)
 
-             //     errors.Add("Profile UOM has not been configured correctly!");
 
-             //
 
-             // if (ComponentUOM == null)
 
-             //     errors.Add("Component UOM has not been configured correctly!");
 
-             //
 
-             // if (GlassUOM == null)
 
-             //     errors.Add("Glass UOM has not been configured correctly!");
 
-             //
 
-             // if (errors.Any())
 
-             // {
 
-             //     MessageWindow.ShowMessage(
 
-             //            $"Some Configuration Settings are incorrect:\n\n- {string.Join("\n- ", errors)}\n\nPlease correct this and try again.",
 
-             //            "Error");
 
-             //     return false;
 
-             // }
 
-             return true;
 
-         }
 
-     
 
-     }
 
- }
 
 
  |