示例#1
0
        /// <summary>
        /// 保存设置
        /// </summary>
        /// <param name="dic"></param>
        /// <returns></returns>
        public int SaveSet(Dictionary <string, string> dic)
        {
            string sql = " delete from N_NestSet ";

            foreach (var item in dic)
            {
                sql += " insert into N_NestSet (nsName,nsValue) values";
                sql += "('" + item.Key + "','" + item.Value + "') ";
            }
            return(YKDataClass.SqlCommand(sql));
        }
示例#2
0
        public static void UpdateUserIP(int eID)
        {
            string sqlstr = "UPDATE B_UserIP SET Valid = 0 WHERE Valid=1 AND eID=" + eID;

            YKDataClass.SqlCommand(sqlstr);
        }
示例#3
0
        public static void InsertUserIP(int eID, string ip, int port)
        {
            string sqlstr = "UPDATE B_UserIP SET Valid = 0 WHERE Valid=1 AND eID=" + eID + "; INSERT INTO B_UserIP(eID,buIP,buPort,buDate,Valid) VALUES(" + eID + ",'" + ip + "'," + port + ",GETDATE(),1)";

            YKDataClass.SqlCommand(sqlstr);
        }