Exemplo n.º 1
0
 public void Init(SqlConnection conn, ArrayList allTreeNode)
 {
     m_AllScriptTreeNode = allTreeNode;
     Conn = conn;
     sqlDB = new SqlDb();
     sqlDB.SetConnection(Conn);           
 }
Exemplo n.º 2
0
 public void Init(SqlConnection conn, ArrayList allTreeNode)
 {
     m_AllScriptTreeNode = allTreeNode;
     Conn  = conn;
     sqlDB = new SqlDb();
     sqlDB.SetConnection(Conn);
 }
Exemplo n.º 3
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="conn"></param>
        public void init(SqlConnection conn)
        {
            this.m_conn = conn;

            sqlDB.SetConnection(conn);
            TreeNode tn = tree.Nodes.Add("表");

            tn.Tag = new tagPlus(1, "表");
            loadData();
        }
Exemplo n.º 4
0
        private void fillListBox(ListBox lb, string fieldid, string tabid, string curCode)
        {
            if (this.m_conn == null)
            {
                return;
            }
            SqlDb sdb = new SqlDb();

            sdb.SetConnection(this.m_conn);
            string sql = "";

            if (fieldid == "0")
            {
                sql = string.Format("select logid,scriptcode,logtime,reason,author from sys_scriptstore_log where (fieldid is NULL or fieldid=0) and modtabid={0} order by logtime", tabid);
            }
            else
            {
                sql = string.Format("select logid,scriptcode,logtime,reason,author from sys_scriptstore_log where fieldid={0} and modtabid={1} order by logtime", fieldid, tabid);
            }
            DataSet ds = sdb.ExeSqlDs(sql, "script");

            foreach (DataRow r in ds.Tables[0].Rows)
            {
                int     id      = int.Parse(r["logid"].ToString().Trim());
                string  logtime = r["logtime"].ToString().Trim();
                string  reason  = r["reason"].ToString().Trim();
                string  author  = r["author"].ToString().Trim();
                Byte[]  ab      = r["scriptcode"] as Byte[];
                string  strCode = ab == null? "" : Encoding.UTF8.GetString(ab);
                hisItem hi      = new hisItem(id, logtime, strCode, reason, author);
                lb.Items.Add(hi);
            }
            hisItem hi1 = new hisItem(curCode);

            lb.Items.Add(hi1);
        }
Exemplo n.º 5
0
 private void fillListBox(ListBox lb, string fieldid, string tabid, string curCode)
 {
     if (this.m_conn == null) return;
     SqlDb sdb = new SqlDb();
     sdb.SetConnection(this.m_conn);
     string sql = "";
     if(fieldid == "0")
     {
         sql = string.Format("select logid,scriptcode,logtime,reason,author from sys_scriptstore_log where (fieldid is NULL or fieldid=0) and modtabid={0} order by logtime", tabid);
     }
     else
     {
         sql = string.Format("select logid,scriptcode,logtime,reason,author from sys_scriptstore_log where fieldid={0} and modtabid={1} order by logtime", fieldid, tabid);
     }
     DataSet ds = sdb.ExeSqlDs(sql, "script");
     foreach (DataRow r in ds.Tables[0].Rows)
     {
         int id = int.Parse(r["logid"].ToString().Trim());
         string logtime = r["logtime"].ToString().Trim();
         string reason = r["reason"].ToString().Trim();
         string author = r["author"].ToString().Trim();
         Byte[] ab = r["scriptcode"] as Byte[];
         string strCode = ab == null? "" : Encoding.UTF8.GetString(ab);
         hisItem hi = new hisItem(id, logtime, strCode, reason, author);
         lb.Items.Add(hi);
     }
     hisItem hi1 = new hisItem(curCode);
     lb.Items.Add(hi1);
 }