Ejemplo n.º 1
0
        public long m_lngInsert(clsST360CheckResultVO deviceResult)
        {
            long lngRes = 0;

            try
            {
                lngRes = m_objSvc.m_lngInsert(deviceResult);
            }
            catch
            {
                lngRes = 0;
            }
            return(lngRes);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据微孔板编号查询

        /// </summary>
        /// <param name="boardNo"></param>
        /// <param name="arrCheckResult"></param>
        /// <returns></returns>
        public long m_lngFind(string boardNo, out clsST360CheckResultVO[] arrCheckResult)
        {
            long lngRes = 0;

            arrCheckResult = null;

            string    sql       = @"
                              select * from t_opr_lis_st360_result where boardno_vchr=?
                          ";
            DataTable dtbResult = null;

            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService hrpService = new com.digitalwave.iCare.middletier.HRPService.clsHRPTableService();
            System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(boardNo);

            try
            {
                lngRes = hrpService.lngGetDataTableWithParameters(sql, ref dtbResult, objODPArr);
                if (dtbResult != null && dtbResult.Rows.Count > 0)
                {
                    arrCheckResult = new clsST360CheckResultVO[dtbResult.Rows.Count];
                    for (int i = 0; i < dtbResult.Rows.Count; i++)
                    {
                        clsST360CheckResultVO checkResult = new clsST360CheckResultVO();
                        ConstructVO(dtbResult.Rows[i], ref checkResult);
                        arrCheckResult[i] = checkResult;
                    }
                }
                else
                {
                    arrCheckResult = new clsST360CheckResultVO[0];
                }
            }
            catch (Exception ex)
            {
                new com.digitalwave.Utility.clsLogText().LogError(ex.Message);
            }

            return(lngRes);
        }
Ejemplo n.º 3
0
        public long m_lngInsert(clsST360CheckResultVO m_objResult)
        {
            long lngRes = 0;

            string sql = @"
                            INSERT INTO t_opr_lis_st360_result
                                        (sampleid_int, sampletype_int, boardno_vchr, templateno_int,
                                         check_item_id_int, check_item_name_vchr,
                                         check_item_english_name_vchr, modify_dat, operator_dat,
                                         device_send_dat, resultnum_vchr, resulttext_vchr, status_int,
                                         deviceid_chr, operator_id_chr, summary_vchr,Positive_INT
                                        )
                                 VALUES (?, ?, ?, ?,
                                         ?, ?,
                                         ?, ?, ?,
                                         ?, ?, ?, ?,
                                         ?, ?, ?,?
                                        )
                          ";

            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService hrpService = new com.digitalwave.iCare.middletier.HRPService.clsHRPTableService();
            try
            {
                System.Data.IDataParameter[] objODPArr = GetInsertDataParameterArr(m_objResult);

                long lngRecEff = -1;
                //往表增加记录


                lngRes = 0;
                lngRes = hrpService.lngExecuteParameterSQL(sql, ref lngRecEff, objODPArr);
                hrpService.Dispose();
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Ejemplo n.º 4
0
        private void ConstructVO(DataRow p_dtrSource, ref clsST360CheckResultVO p_objResult)
        {
            //DEVICEID_CHR
            //SampleId_int
            //SampleType_int
            //BoardNo_VCHR
            //TemplateNo_int
            //CHECK_ITEM_ID_INT
            //CHECK_ITEM_NAME_VCHR
            //CHECK_ITEM_ENGLISH_NAME_VCHR
            //MODIFY_DAT
            //DEVICE_SEND_DAT
            //OPERATOR_DAT
            //ResultNum_VCHR
            //ResultText_VCHR
            //OPERATOR_ID_CHR
            //Status_int
            //Summary_VCHR

            p_objResult.m_strDeviceId        = p_dtrSource["DEVICEID_CHR"].ToString().Trim();
            p_objResult.m_intSampleId        = DBAssist.ToInt32(p_dtrSource["SampleId_int"]);
            p_objResult.m_enmSampelType      = GetSampleType(DBAssist.ToInt32(p_dtrSource["SampleType_int"]));
            p_objResult.m_strBoardNo         = p_dtrSource["BoardNo_VCHR"].ToString().Trim();
            p_objResult.m_intTemplateNo      = DBAssist.ToInt32(p_dtrSource["TemplateNo_int"]);
            p_objResult.m_strItemName        = p_dtrSource["CHECK_ITEM_NAME_VCHR"].ToString().Trim();
            p_objResult.m_strItemEnglishName = p_dtrSource["CHECK_ITEM_ENGLISH_NAME_VCHR"].ToString().Trim();
            p_objResult.m_dtModify           = DBAssist.ToDateTime(p_dtrSource["MODIFY_DAT"]);
            p_objResult.m_dtDeviceSend       = DBAssist.ToDateTime(p_dtrSource["DEVICE_SEND_DAT"]);
            p_objResult.m_dtOperator         = DBAssist.ToDateTime(p_dtrSource["OPERATOR_DAT"]);
            p_objResult.m_strResultNum       = p_dtrSource["ResultNum_VCHR"].ToString().Trim();
            p_objResult.m_strResultText      = p_dtrSource["ResultText_VCHR"].ToString().Trim();
            p_objResult.m_strOperatorId      = p_dtrSource["OPERATOR_ID_CHR"].ToString().Trim();
            p_objResult.m_blnStatus          = DBAssist.ToInt32(p_dtrSource["Status_int"]) == 1 ? true : false;
            p_objResult.m_strSummary         = p_dtrSource["Summary_VCHR"].ToString().Trim();
            p_objResult.m_IsPositive         = DBAssist.ToInt32(p_dtrSource["Positive_INT"].ToString()) == 1 ? true : false;
        }
Ejemplo n.º 5
0
 private System.Data.IDataParameter[] GetInsertDataParameterArr(clsST360CheckResultVO m_objResult)
 {
     System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr
                                              (
         m_objResult.m_intSampleId,
         GetSampleType(m_objResult.m_enmSampelType),
         m_objResult.m_strBoardNo,
         m_objResult.m_intTemplateNo,
         m_objResult.m_intItemId,
         m_objResult.m_strItemName,
         m_objResult.m_strItemEnglishName,
         m_objResult.m_dtModify,
         m_objResult.m_dtOperator,
         m_objResult.m_dtDeviceSend,
         m_objResult.m_strResultNum,
         m_objResult.m_strResultText,
         m_objResult.m_blnStatus ? 1 : 0,
         m_objResult.m_strDeviceId,
         m_objResult.m_strOperatorId,
         m_objResult.m_strSummary,
         m_objResult.m_IsPositive?1:0
                                              );
     return(objODPArr);
 }
Ejemplo n.º 6
0
        private void m_cmdSubmitData_Click(object sender, EventArgs e)
        {
            if (m_selectProject == null || m_selectProject.Name == string.Empty)
            {
                MessageBox.Show("请选择检验项目!");
                return;
            }

            if (m_selectTemplate == null || m_selectTemplate.TemplateName == string.Empty)
            {
                MessageBox.Show("请选择模板!");
                return;
            }

            if (m_lstCheckResults == null || m_lstCheckResults.Count == 0)
            {
                MessageBox.Show("没有酶标检验项目结果!");
                return;
            }

            if (MessageBox.Show(string.Format("仪器传送时间是:{0} \n   检验项目名称是:{1} \n  确认后数据将不能更改!", m_lstCheckResults[0].m_strCheckDat, m_selectProject.Name), "是否确认", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }


            string boardNo = m_txtBoardNO.Text;

            if (string.IsNullOrEmpty(boardNo))
            {
                MessageBox.Show("微孔板编号为空!");
                return;
            }

            string[] arrBoardNo = null;
            clsST360CheckResultSmp.s_object.m_lngFindBoardName(out arrBoardNo);

            if (arrBoardNo == null)
            {
                return;
            }

            foreach (string strboardNo in arrBoardNo)
            {
                if (strboardNo.Trim() == boardNo.Trim())
                {
                    MessageBox.Show("微孔板编号数据库中已存在!");
                    m_txtBoardNO.SelectAll();
                    return;
                }
            }

            foreach (clsDeviceReslutVO checkResult in m_lstCheckResults)
            {
                foreach (clsSTBoardItem boardItem in m_lstBoard)
                {
                    if (boardItem.BoardStyle.SampleStyle == enmSTSampleStyle.Common && checkResult.m_strDeviceSampleID == boardItem.Sequence.ToString())
                    {
                        checkResult.m_strUnit                = checkResult.m_strResult;
                        checkResult.m_strDeviceSampleID      = boardItem.BoardStyle.SampleStyleNo.ToString();
                        checkResult.m_strResult              = boardItem.IsPositive ? "阳" : "阴";
                        checkResult.m_strDeviceCheckItemName = this.m_selectProject.EnglishName;
                    }
                }
            }

            foreach (clsDeviceReslutVO deviceResult in m_lstCheckResults)
            {
                clsST360Smp.s_object.m_lngUpdateDeviceResult(deviceResult);
            }


            DateTime dt = DateTime.Now;

            foreach (clsSTBoardItem boardItem in m_lstBoard)
            {
                clsDeviceReslutVO checkResult = FindDeviceReslut(boardItem);
                if (checkResult == null)
                {
                    continue;
                }

                clsST360CheckResultVO checkResultVO = new clsST360CheckResultVO();

                checkResultVO.m_blnStatus          = true;
                checkResultVO.m_dtModify           = dt;
                checkResultVO.m_dtOperator         = dt;
                checkResultVO.m_enmSampelType      = boardItem.BoardStyle.SampleStyle;
                checkResultVO.m_intSampleId        = boardItem.Sequence;
                checkResultVO.m_intTemplateNo      = boardItem.BoardStyle.SampleStyleNo;
                checkResultVO.m_strBoardNo         = boardNo;
                checkResultVO.m_strDeviceId        = checkResult.m_strDeviceID;
                checkResultVO.m_strItemEnglishName = m_selectProject.EnglishName;
                checkResultVO.m_strItemName        = m_selectProject.Name;
                checkResultVO.m_strOperatorId      = this.LoginInfo.m_strEmpID;
                checkResultVO.m_strResultNum       = boardItem.DataNum;
                checkResultVO.m_strResultText      = boardItem.IsPositive ? "阳" : "阴";

                clsST360CheckResultSmp.s_object.m_lngInsert(checkResultVO);
            }
            MessageBox.Show("数据确认成功!");
        }