Ejemplo n.º 1
0
        /// <summary>
        /// SupplReport() - Debugging report: output list of Supplier companies in TSmatch.xlsx/Suppliers
        /// </summary>
        public static void SupplReport()
        {
            List <Supplier> Suppliers = new List <Supplier>();
            Docs            docSupl   = Docs.getDoc(Decl.SUPPLIERS);

            for (int i = docSupl.i0; i <= docSupl.il; i++)
            {
                Suppliers.Add(new Supplier(i));
            }
            Docs doc = Docs.getDoc("SupplReport");

            doc.Reset("Now");
            foreach (var s in Suppliers)
            {
                doc.wrDoc(1, s.date, s.name, s.Url, s.City, s.index, s.street, s.telephone, s.CompSets.Count);
                foreach (var cs in s.CompSets)
                {
                    //11.1.17                    cs.getCompSet();
                    //////CmpSet.getCompSet(cs.name, s);
                    //////Docs w = Docs.getDoc(cs.doc.name);
                    //////cs.doc = w;
                    Docs   w  = cs.doc;
                    string nm = w.Wb.Name + "/" + w.Sheet.Name;
                    doc.wrDoc(2, w.name, nm, w.i0, w.il, w.LoadDescription);
                }
                foreach (var cs in s.CompSets)
                {
                    cs.doc.Close();
                }
            }
            doc.saveDoc();
            doc.Close();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// saveModel(Model md)  - записываем измененную модель в файловую систему
 /// </summary>
 /// <param name="name">имя модели для записи.</param>
 /// <history>6.8.16 -- nonstatic method</history>
 public Model saveModel(string name)
 {
     Log.set("saveModel(\"" + name + "\")");
     Docs doc = Docs.getDoc(Decl.MODELS);
     doc.Reset("Now");
     Models.Sort();
     foreach (var m in Models)
     {
         string t = Lib.timeStr(m.date);
         doc.wrDoc(1, t, m.name, m.dir, m.Made, m.Phase, m.MD5, m.strListRules);
     }
     doc.isChanged = true;
     Docs.saveDoc(doc);
     Log.exit();
     return getModel(name);
 }