Ejemplo n.º 1
0
        /// <summary>
        /// 加载变量表
        /// </summary>
        public void loadValList()
        {
            var    db  = new DbHelp("192.168.36.162", "cmsdb", "sa", "xgmes");
            string sql = "select id,L1name as name,scanrate from  L1OPC_TAG_MES where used=1 order by id ";
            var    dt  = db.Query(sql);

            listTag = dt_to_list(dt);
        }
Ejemplo n.º 2
0
        public void savedata(int i, double val)
        {
            var db = new DbHelp("192.168.36.162", "cmsdb", "sa", "xgmes");

            string sql = "insert into l1_tag_value(id,val) values(" + i + "," + val + ")";

            db.ExeSql(sql);
        }