public void Initialyze() { path = Path.Combine(boot.DebugDir, "Prices"); ps = new ProductSet(boot); psi = new psInit(boot); _U = new _UT_ProductSet(boot); _I = new _UT_psInit(boot); ////////////if (boot.Suppliers == null) System.Threading.Thread.Sleep(1000); //18/2//////Assert.IsNotNull(boot.Suppliers); ////////////gs.Init(boot); }
private void PSU(string name, string FileName, string validDate, int i0, string LoadDescr, params string[] rl) { var ps = new ProductSet(boot); var psi = new psInit(boot); ps.name = psi.name = psi.SheetN = name; ps.SuplName = supl.name; psi.FileName = FileName; // psi.SheetN = SheetN; if (!DateTime.TryParse(validDate, out ps.ValidUntil)) { ps.ValidUntil = Declaration.MinDate; } psi.i0 = i0; psi.LoadDescriptor = LoadDescr; ps.RuleText = rl.ToList(); ps.Update(psi); }
private void si(string suplName, string psName, string FileName, string SheetN, string LoadDescriptor) { Supplier supl = boot.Suppliers.AllSuppliers.Find(x => x.name == suplName); Assert.IsNotNull(supl, $"UT: Bad suplName={suplName}"); suplInit = boot.ssInit.Find(x => x.name == suplName); if (suplInit == null) { suplInit = new SupplierInit(boot); ProductSet ps = supl.productSets.Find(x => x.name == psName); if (ps == null) { ps = new ProductSet(boot); ps.name = psName; } psInit psi = new psInit(boot); psi.Copy(ps, FileName, SheetN, LoadDescriptor); suplInit.Copy(supl); suplInit.productSets.Add(psi); } }