public void UT_Copy() { supl = boot.ssInit[2]; Assert.AreEqual("", supl.name); var supl_I = new SupplierInit(boot); var v = supl_I.Copy(supl); }
private void ssInit(string name, string url, string city, string streetAdr, string country = "", string index = "", string tel = "", string note = "") { bool newSupl = false, newSupl_I = false; var AllSupl = boot.Suppliers.AllSuppliers; supl = AllSupl.Find(x => x.name == name); if (supl == null) { newSupl = true; supl = new Supplier(boot); } supl = new Supplier(boot); supl.name = name; supl.URL = url; supl.city = city; supl.Country = country; supl.Index = index; supl.Tel = tel; supl.Note = note; supl.productSets = new List <ProductSet>(); if (newSupl) { AllSupl.Add(supl); } var supl_I = boot.ssInit.Find(x => x.name == name); if (supl_I == null) { newSupl_I = true; supl_I = new SupplierInit(boot); supl_I.name = name; } supl_I.pssInit = new List <psInit>(); if (newSupl_I) { boot.ssInit.Add(supl_I); } }
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); } }