示例#1
0
        public void m_mthSave()
        {
            if (m_objViewer.m_lsvResultUnite.Items.Count <= 0 || m_objResultLog == null)
            {
                return;
            }
            m_objDeviceResultArr = new clsDeviceReslutVO[m_objViewer.m_lsvResultUnite.Items.Count];
            for (int i = 0; i < m_objViewer.m_lsvResultUnite.Items.Count; i++)
            {
                m_objDeviceResultArr[i] = new clsDeviceReslutVO();
                clsDeviceReslutVO objTemp = (clsDeviceReslutVO)m_objViewer.m_lsvResultUnite.Items[i].Tag;
                m_objDeviceResultArr[i].m_strAbnormalFlag        = objTemp.m_strAbnormalFlag;
                m_objDeviceResultArr[i].m_strCheckDat            = m_objResultLog.m_strCheckDat;
                m_objDeviceResultArr[i].m_strDeviceCheckItemName = objTemp.m_strDeviceCheckItemName;
                m_objDeviceResultArr[i].m_strDeviceID            = objTemp.m_strDeviceID;
                m_objDeviceResultArr[i].m_strDeviceSampleID      = m_objResultLog.m_strDeviceSampleID;
                m_objDeviceResultArr[i].m_strMaxVal   = objTemp.m_strMaxVal;
                m_objDeviceResultArr[i].m_strMinVal   = objTemp.m_strMinVal;
                m_objDeviceResultArr[i].m_strPstatus  = "1";
                m_objDeviceResultArr[i].m_strRefRange = objTemp.m_strRefRange;
                m_objDeviceResultArr[i].m_strResult   = objTemp.m_strResult;
                m_objDeviceResultArr[i].m_strUnit     = objTemp.m_strUnit;
            }

            long lngRes = 0;

            lngRes = m_objManage.m_lngAddNewDeviceCheckResultArrANDLog(m_objDeviceResultArr, m_objResultLog);

            if (lngRes > 0 && !this.m_blnShowDialog)
            {
                m_objViewer.m_lsvSampleList.Items.Clear();
                m_mthGetDeviceSampleListByCondition(m_objResultLog.m_strDeviceSampleID, m_objResultLog.m_strDeviceID,
                                                    DateTime.Parse(m_objResultLog.m_strCheckDat).ToShortDateString());
                for (int i = 0; i < m_objViewer.m_lsvSampleList.Items.Count; i++)
                {
                    clsResultLogVO objTemp = (clsResultLogVO)m_objViewer.m_lsvSampleList.Items[i].Tag;
                    if (objTemp.m_strUseFlag == "1")
                    {
                        m_objViewer.m_lsvSampleList.Items[i].Selected = true;
                    }
                }
                m_mthSetToBaseSample();
            }
        }