/// <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)); }
public static void UpdateUserIP(int eID) { string sqlstr = "UPDATE B_UserIP SET Valid = 0 WHERE Valid=1 AND eID=" + eID; YKDataClass.SqlCommand(sqlstr); }
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); }