Example #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select surgery_no,time_stamp,cumulative_time,blood_pump,separation_pump,dialysis_pump,tripe_pump,filtration_pump,circulating_pump,heparin_pump,warmer,blood_pump_t,separation_pump_t,dialysis_pump_t,tripe_pump_t,filtration_pump_t,circulating_pump_t,heparin_pump_t ");
            strSql.Append(" FROM pump_speed_data ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbHelperMySQL_Data.Query(strSql.ToString()));
        }
Example #2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select surgery_no,time_stamp,in_blood_pressure,plasma_inlet_pressure,arterial_pressure,venous_pressure,plasma_pressure,transmembrane_pressure,plasma2_pressure ");
            strSql.Append(" FROM pressure_data ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbHelperMySQL_Data.Query(strSql.ToString()));
        }
Example #3
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ALS.Model.pressure_data GetModel(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 surgery_no,time_stamp,in_blood_pressure,plasma_inlet_pressure,arterial_pressure,venous_pressure,plasma_pressure,transmembrane_pressure,plasma2_pressure 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;

            ALS.Model.pressure_data model = new ALS.Model.pressure_data();
            DataSet ds = DbHelperMySQL_Data.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Example #4
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT * FROM ( ");
            strSql.Append(" SELECT ROW_NUMBER() OVER (");
            if (!string.IsNullOrEmpty(orderby.Trim()))
            {
                strSql.Append("order by T." + orderby);
            }
            else
            {
                strSql.Append("order by T.surgery_no desc");
            }
            strSql.Append(")AS Row, T.*  from pump_speed_data T ");
            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                strSql.Append(" WHERE " + strWhere);
            }
            strSql.Append(" ) TT");
            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
            return(DbHelperMySQL_Data.Query(strSql.ToString()));
        }
Example #5
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ALS.Model.pump_speed_data GetModel(string surgery_no)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select surgery_no,time_stamp,cumulative_time,blood_pump,separation_pump,dialysis_pump,tripe_pump,filtration_pump,circulating_pump,heparin_pump,warmer,blood_pump_t,separation_pump_t,dialysis_pump_t,tripe_pump_t,filtration_pump_t,circulating_pump_t,heparin_pump_t 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;

            ALS.Model.pump_speed_data model = new ALS.Model.pump_speed_data();
            DataSet ds = DbHelperMySQL_Data.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Example #6
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ALS.Model.pressure_data GetModel(string surgery_no)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select surgery_no,time_stamp,in_blood_pressure,plasma_inlet_pressure,arterial_pressure,venous_pressure,plasma_pressure,transmembrane_pressure from pressure_data ");
            strSql.Append(" where surgery_no=@surgery_no ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@surgery_no", MySqlDbType.VarChar, 255)
            };
            parameters[0].Value = surgery_no;

            ALS.Model.pressure_data model = new ALS.Model.pressure_data();
            DataSet ds = DbHelperMySQL_Data.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }