public static bool UpdateByID(M_Base data, int id) { SqlModel model = new SqlModel() { cmd = SqlCmd.Update, tbName = data.TbName, pk = data.PK }; model.AddSpToList(data.GetParameters()); model.sql = "UPDATE " + data.TbName + " SET " + DB.GetFieldAndParam(data) + " WHERE " + data.PK + "=" + id; PreSPList(model); DB.ExecuteNonQuery(model); return(true); }