Exemple #1
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string surgery_no, string time_stamp, string in_blood_pressure, string plasma_inlet_pressure, string arterial_pressure, string venous_pressure, string plasma_pressure, string transmembrane_pressure, string plasma2_pressure)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from pressure_data");
            strSql.Append(" where surgery_no=@surgery_no and time_stamp=@time_stamp and in_blood_pressure=@in_blood_pressure and plasma_inlet_pressure=@plasma_inlet_pressure and arterial_pressure=@arterial_pressure and venous_pressure=@venous_pressure and plasma_pressure=@plasma_pressure and transmembrane_pressure=@transmembrane_pressure and plasma2_pressure=@plasma2_pressure ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@surgery_no",             MySqlDbType.VarChar, 255),
                new MySqlParameter("@time_stamp",             MySqlDbType.VarChar, 255),
                new MySqlParameter("@in_blood_pressure",      MySqlDbType.VarChar, 255),
                new MySqlParameter("@plasma_inlet_pressure",  MySqlDbType.VarChar, 255),
                new MySqlParameter("@arterial_pressure",      MySqlDbType.VarChar, 255),
                new MySqlParameter("@venous_pressure",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@plasma_pressure",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@transmembrane_pressure", MySqlDbType.VarChar, 255),
                new MySqlParameter("@plasma2_pressure",       MySqlDbType.VarChar, 255)
            };
            parameters[0].Value = surgery_no;
            parameters[1].Value = time_stamp;
            parameters[2].Value = in_blood_pressure;
            parameters[3].Value = plasma_inlet_pressure;
            parameters[4].Value = arterial_pressure;
            parameters[5].Value = venous_pressure;
            parameters[6].Value = plasma_pressure;
            parameters[7].Value = transmembrane_pressure;
            parameters[8].Value = plasma2_pressure;

            return(DbHelperMySQL_Data.Exists(strSql.ToString(), parameters));
        }
Exemple #2
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string surgery_no)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from pump_speed_data");
            strSql.Append(" where surgery_no=@surgery_no ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@surgery_no", MySqlDbType.VarChar, 255)
            };
            parameters[0].Value = surgery_no;

            return(DbHelperMySQL_Data.Exists(strSql.ToString(), parameters));
        }