/// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tMisMonitorQcSt">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TMisMonitorQcStVo tMisMonitorQcSt)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tMisMonitorQcSt, TMisMonitorQcStVo.T_MIS_MONITOR_QC_ST_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tMisMonitorQcSt.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tMisMonitorQcSt_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tMisMonitorQcSt_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TMisMonitorQcStVo tMisMonitorQcSt_UpdateSet, TMisMonitorQcStVo tMisMonitorQcSt_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tMisMonitorQcSt_UpdateSet, TMisMonitorQcStVo.T_MIS_MONITOR_QC_ST_TABLE);

            strSQL += this.BuildWhereStatement(tMisMonitorQcSt_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tMisMonitorQcSt">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TMisMonitorQcStVo tMisMonitorQcSt, int iIndex, int iCount)
        {
            string strSQL = " select * from T_MIS_MONITOR_QC_ST {0} ";

            strSQL = String.Format(strSQL, BuildWhereStatement(tMisMonitorQcSt));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TMisMonitorQcStVo tMisMonitorQcSt)
        {
            string strSQL = "delete from T_MIS_MONITOR_QC_ST ";

            strSQL += this.BuildWhereStatement(tMisMonitorQcSt);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tMisMonitorQcSt">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TMisMonitorQcStVo tMisMonitorQcSt)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tMisMonitorQcSt, TMisMonitorQcStVo.T_MIS_MONITOR_QC_ST_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Example #6
0
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TMisMonitorQcStVo tMisMonitorQcSt)
 {
     return(access.Create(tMisMonitorQcSt));
 }
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tMisMonitorQcSt">对象条件</param>
        /// <returns>对象</returns>
        public TMisMonitorQcStVo Details(TMisMonitorQcStVo tMisMonitorQcSt)
        {
            string strSQL = String.Format("select * from  T_MIS_MONITOR_QC_ST " + this.BuildWhereStatement(tMisMonitorQcSt));

            return(SqlHelper.ExecuteObject(new TMisMonitorQcStVo(), strSQL));
        }
Example #8
0
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tMisMonitorQcSt">对象条件</param>
 /// <returns>对象</returns>
 public TMisMonitorQcStVo Details(TMisMonitorQcStVo tMisMonitorQcSt)
 {
     return(access.Details(tMisMonitorQcSt));
 }
Example #9
0
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tMisMonitorQcSt">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TMisMonitorQcStVo> SelectByObject(TMisMonitorQcStVo tMisMonitorQcSt, int iIndex, int iCount)
 {
     return(access.SelectByObject(tMisMonitorQcSt, iIndex, iCount));
 }
Example #10
0
 public TMisMonitorQcStLogic(TMisMonitorQcStVo _tMisMonitorQcSt)
 {
     tMisMonitorQcSt = _tMisMonitorQcSt;
     access          = new TMisMonitorQcStAccess();
 }
Example #11
0
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tMisMonitorQcSt">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TMisMonitorQcStVo tMisMonitorQcSt)
 {
     return(access.GetSelectResultCount(tMisMonitorQcSt));
 }
Example #12
0
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TMisMonitorQcStVo tMisMonitorQcSt)
 {
     return(access.Delete(tMisMonitorQcSt));
 }
Example #13
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tMisMonitorQcSt_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tMisMonitorQcSt_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TMisMonitorQcStVo tMisMonitorQcSt_UpdateSet, TMisMonitorQcStVo tMisMonitorQcSt_UpdateWhere)
 {
     return(access.Edit(tMisMonitorQcSt_UpdateSet, tMisMonitorQcSt_UpdateWhere));
 }
Example #14
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tMisMonitorQcSt">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TMisMonitorQcStVo tMisMonitorQcSt)
 {
     return(access.Edit(tMisMonitorQcSt));
 }
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tMisMonitorQcSt"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TMisMonitorQcStVo tMisMonitorQcSt)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tMisMonitorQcSt)
            {
                //ID
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tMisMonitorQcSt.ID.ToString()));
                }
                //原始样分析结果 ID
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.RESULT_ID_SRC.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND RESULT_ID_SRC = '{0}'", tMisMonitorQcSt.RESULT_ID_SRC.ToString()));
                }
                //空白样分析结果 ID
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.RESULT_ID_ST.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND RESULT_ID_ST = '{0}'", tMisMonitorQcSt.RESULT_ID_ST.ToString()));
                }
                //实验室标准样标准值
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.SRC_RESULT.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SRC_RESULT = '{0}'", tMisMonitorQcSt.SRC_RESULT.ToString()));
                }
                //不确定度
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.UNCERTAINTY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND UNCERTAINTY = '{0}'", tMisMonitorQcSt.UNCERTAINTY.ToString()));
                }
                //实验室标准样结果值
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.ST_RESULT.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ST_RESULT = '{0}'", tMisMonitorQcSt.ST_RESULT.ToString()));
                }
                //空白是否合格
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.ST_ISOK.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ST_ISOK = '{0}'", tMisMonitorQcSt.ST_ISOK.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tMisMonitorQcSt.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tMisMonitorQcSt.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tMisMonitorQcSt.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tMisMonitorQcSt.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tMisMonitorQcSt.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tMisMonitorQcSt.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
Example #16
0
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tMisMonitorQcSt">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TMisMonitorQcStVo tMisMonitorQcSt, int iIndex, int iCount)
 {
     return(access.SelectByTable(tMisMonitorQcSt, iIndex, iCount));
 }
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tMisMonitorQcSt">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TMisMonitorQcStVo tMisMonitorQcSt)
        {
            string strSQL = "select Count(*) from T_MIS_MONITOR_QC_ST " + this.BuildWhereStatement(tMisMonitorQcSt);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Example #18
0
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tMisMonitorQcSt"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TMisMonitorQcStVo tMisMonitorQcSt)
 {
     return(access.SelectByTable(tMisMonitorQcSt));
 }
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tMisMonitorQcSt">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TMisMonitorQcStVo> SelectByObject(TMisMonitorQcStVo tMisMonitorQcSt, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_MIS_MONITOR_QC_ST " + this.BuildWhereStatement(tMisMonitorQcSt));

            return(SqlHelper.ExecuteObjectList(tMisMonitorQcSt, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
    /// <summary>
    /// 保存质控数据
    /// </summary>
    /// <returns></returns>
    public string saveQcValue()
    {
        bool isSuccess = false;

        if (this.hidQC_TYPE.Value == "5")
        {
            //空白数据
            string strEmptyValue1 = Request["QC_EMPTY_IN_VALUE1"] == "" ? "0" : Request["QC_EMPTY_IN_VALUE1"].ToString();
            string strEmptyValue2 = Request["QC_EMPTY_IN_VALUE2"] == "" ? "0" : Request["QC_EMPTY_IN_VALUE2"].ToString();
            string strEmptyValue3 = Request["QC_EMPTY_IN_VALUE3"] == "" ? "0" : Request["QC_EMPTY_IN_VALUE3"].ToString();
            string strEmptyValue  = Request["QC_EMPTY_IN_RESULT"] == "" ? "0" : Request["QC_EMPTY_IN_RESULT"].ToString();
            string strEmptyCount  = this.dEmptyCount.Value.Trim() == "" ? "0" : this.dEmptyCount.Value.Trim();

            TMisMonitorQcEmptyBatVo QcEmptyBatVo = new TMisMonitorQcEmptyBatVo();
            QcEmptyBatVo.ID = this.hidID.Value;
            QcEmptyBatVo.QC_EMPTY_IN_RESULT = strEmptyValue;
            QcEmptyBatVo.REMARK1            = strEmptyValue1;
            QcEmptyBatVo.REMARK2            = strEmptyValue2;
            QcEmptyBatVo.REMARK3            = strEmptyValue3;
            QcEmptyBatVo.QC_EMPTY_IN_COUNT  = strEmptyCount;
            isSuccess = new TMisMonitorQcEmptyBatLogic().Edit(QcEmptyBatVo);
        }
        if (this.hidQC_TYPE.Value == "8")
        {
            //标准样数据
            string strSRC_IN_VALUE1 = Request["SRC_IN_VALUE1"] == "" ? "0" : Request["SRC_IN_VALUE1"].ToString();
            string strSRC_IN_VALUE2 = Request["SRC_IN_VALUE2"] == "" ? "0" : Request["SRC_IN_VALUE2"].ToString();
            string strSRC_IN_VALUE3 = Request["SRC_IN_VALUE3"] == "" ? "0" : Request["SRC_IN_VALUE3"].ToString();
            string strStResult      = this.dSrcCount.Value.Trim() == "" ? "0" : this.dSrcCount.Value.Trim();

            TMisMonitorQcStVo QcStVo = new TMisMonitorQcStVo();
            QcStVo.ID        = this.hidID.Value;
            QcStVo.REMARK1   = strSRC_IN_VALUE1;
            QcStVo.REMARK2   = strSRC_IN_VALUE2;
            QcStVo.REMARK3   = strSRC_IN_VALUE3;
            QcStVo.ST_RESULT = strStResult;
            isSuccess        = new TMisMonitorQcStLogic().Edit(QcStVo);
        }
        if (this.hidQC_TYPE.Value == "6")
        {
            //实验室加标数据
            string strAddResultEx = Request["ADD_RESULT_EX"] == "" ? "0" : Request["ADD_RESULT_EX"].ToString();
            string strQcAdd       = Request["QC_ADD"] == "" ? "0" : Request["QC_ADD"].ToString();
            string strAddBack     = Request["ADD_BACK"] == "" ? "0" : Request["ADD_BACK"].ToString();

            TMisMonitorQcAddVo QcAddVo = new TMisMonitorQcAddVo();
            QcAddVo.ID            = this.hidID.Value;
            QcAddVo.ADD_RESULT_EX = strAddResultEx;
            QcAddVo.QC_ADD        = strQcAdd;
            QcAddVo.ADD_BACK      = strAddBack;
            isSuccess             = new TMisMonitorQcAddLogic().Edit(QcAddVo);
        }
        if (this.hidQC_TYPE.Value == "7")
        {
            //实验室明码平行
            string strTwinResult1 = Request["TWIN_RESULT1"] == "" ? "0" : Request["TWIN_RESULT1"].ToString();
            string strTwinResult2 = Request["TWIN_RESULT2"] == "" ? "0" : Request["TWIN_RESULT2"].ToString();
            string strTwinAvg     = Request["TWIN_AVG"] == "" ? "0" : Request["TWIN_AVG"].ToString();
            string strTwinOffSet  = Request["TWIN_OFFSET"] == "" ? "0" : Request["TWIN_OFFSET"].ToString();

            TMisMonitorQcTwinVo QcTwinVo = new TMisMonitorQcTwinVo();
            QcTwinVo.ID           = this.hidID.Value;
            QcTwinVo.TWIN_RESULT1 = strTwinResult1;
            QcTwinVo.TWIN_RESULT2 = strTwinResult2;
            QcTwinVo.TWIN_AVG     = strTwinAvg;
            QcTwinVo.TWIN_OFFSET  = strTwinOffSet;
            isSuccess             = new TMisMonitorQcTwinLogic().Edit(QcTwinVo);
            if (isSuccess)
            {
                TMisMonitorResultVo ResultVo = new TMisMonitorResultVo();
                ResultVo.ID          = this.hidSrcResultID.Value;
                ResultVo.ITEM_RESULT = strTwinAvg;
                isSuccess            = new TMisMonitorResultLogic().Edit(ResultVo);
            }
        }
        return(isSuccess == true ? "1" : "0");
    }
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tMisMonitorQcSt"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TMisMonitorQcStVo tMisMonitorQcSt)
        {
            string strSQL = "select * from T_MIS_MONITOR_QC_ST " + this.BuildWhereStatement(tMisMonitorQcSt);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
Example #22
0
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tMisMonitorQcSt">对象</param>
 /// <returns></returns>
 public TMisMonitorQcStVo SelectByObject(TMisMonitorQcStVo tMisMonitorQcSt)
 {
     return(access.SelectByObject(tMisMonitorQcSt));
 }