//更新信息 public string UpdGameInfo(string svstr, string id) { string[] svarr = svstr.Split('@'); string mSql = string.Format("update tb_game set console = @console,name=@name,price=@price,buydate=@buydate,remark=@remark where id=@id;"); SqlParameter[] sp = new SqlParameter[svarr.Length + 3]; for (int i = 0; i < svarr.Length; i++) { sp[i] = new SqlParameter("@" + svarr[i].Split('|')[0], svarr[i].Split('|')[1]); } sp[svarr.Length] = new SqlParameter("@userid", "MguliN"); sp[svarr.Length + 1] = new SqlParameter("@remark", ""); sp[svarr.Length + 2] = new SqlParameter("@id", id); return(sh.getNonQuery(mSql, sp).ToString()); }