コード例 #1
0
        private static bool AddNewTypeF(string c, Color cl, string name, string t, string sn = "", string fdName = "")
        {
            string fdn             = (fdName.Length > 0) ? fdName : name.FDName();
            MaterialCommodityDB mc = new MaterialCommodityDB(c, name, fdn, t, sn, cl, 0);

            mc.SetCache();
            return(true);
        }
コード例 #2
0
        public static MaterialCommodityDB EnsurePresent(string cat, string fdname, SQLiteConnectionUser conn)  // By FDNAME
        {
            if (!cachelist.ContainsKey(fdname.ToLower()))
            {
                MaterialCommodityDB mcdb = new MaterialCommodityDB(cat, fdname.SplitCapsWordFull(), fdname, "", "", Color.Green, 0);
                mcdb.SetCache();
                System.Diagnostics.Debug.WriteLine("Material not present: " + cat + "," + fdname);
            }

            return(cachelist[fdname.ToLower()]);
        }