Exemple #1
0
        /// <summary>
        /// 添加或者修改自定义项目的结果判断
        /// </summary>
        public void m_mthOperationCheckItemCustomRes()
        {
            clsLisCheckItemCustomRes m_objCheckItemCustomRes = new clsLisCheckItemCustomRes();

            m_objCheckItemCustomRes.m_strCheckItemID = m_objViewer.m_cboDeviceCheckItem.SelectedValue.ToString();
            m_objCheckItemCustomRes.m_strConditions  = m_objViewer.m_txtConditions.Text;
            m_objCheckItemCustomRes.m_strResult      = m_objViewer.m_cboResult.Text;
            m_objCheckItemCustomRes.m_strSeq         = m_objViewer.m_txtNo.Text;
            clsLisCheckItemCustomRes m_objCheckItemCustomResVO = (clsLisCheckItemCustomRes)m_objViewer.m_txtConditions.Tag;
            long lngRes = 0;

            if (m_objCheckItemCustomResVO != null)
            {
                lngRes = m_objDomain.m_lngUpdateCheckItemCustomRes(m_objCheckItemCustomRes);
                if (lngRes > 0)
                {
                    m_objViewer.m_dgCheckItemResult.SelectedRows[0].Cells["m_chSeq"].Value        = m_objCheckItemCustomRes.m_strSeq;
                    m_objViewer.m_dgCheckItemResult.SelectedRows[0].Cells["m_chconditions"].Value = m_objCheckItemCustomRes.m_strConditions;
                    m_objViewer.m_dgCheckItemResult.SelectedRows[0].Cells["m_cheresult"].Value    = m_objCheckItemCustomRes.m_strResult;
                    m_objViewer.m_dgCheckItemResult.SelectedRows[0].Cells["m_chCheckiteid"].Value = m_objCheckItemCustomRes.m_strCheckItemID;
                    m_objViewer.m_dgCheckItemResult.SelectedRows[0].Cells["DataSource"].Value     = m_objCheckItemCustomRes;
                }
            }
            else
            {
                lngRes = m_objDomain.m_lngInsertCheckItemCustomRes(m_objCheckItemCustomRes);
                m_objViewer.m_dgCheckItemResult.Rows.Add(new object[] { m_objCheckItemCustomRes.m_strSeq, m_objCheckItemCustomRes.m_strConditions,
                                                                        m_objCheckItemCustomRes.m_strResult, m_objCheckItemCustomRes.m_strCheckItemID, m_objCheckItemCustomRes });
            }
        }
        /// <summary>
        /// 删除自定义结果判断
        /// </summary>
        /// <param name="p_objCheckItemCustomResVO"></param>
        /// <returns></returns>
        public long m_lngDeleteCheckItemCustomRes(clsLisCheckItemCustomRes p_objCheckItemCustomResVO)
        {
            long          lngRes = 0;
            clsItemSetSvc objSvc = (clsItemSetSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsItemSetSvc));

            lngRes = objSvc.m_lngDeleteCheckItemCustomRes(objPrincipal, p_objCheckItemCustomResVO);
            return(lngRes);
        }
Exemple #3
0
        private void m_dgCheckItemResult_SelectionChanged(object sender, EventArgs e)
        {
            m_txtConditions.Tag = null;
            if (m_dgCheckItemResult.SelectedRows.Count <= 0)
            {
                return;
            }
            clsLisCheckItemCustomRes m_objCheckItemCustomRes = (clsLisCheckItemCustomRes)m_dgCheckItemResult.SelectedRows[0].Cells["DataSource"].Value;

            m_txtNo.Text         = m_objCheckItemCustomRes.m_strSeq;
            m_txtConditions.Text = m_objCheckItemCustomRes.m_strConditions;
            m_cboResult.Text     = m_objCheckItemCustomRes.m_strResult;
            m_txtConditions.Tag  = m_objCheckItemCustomRes;
        }
Exemple #4
0
        /// <summary>
        /// 删除自定义项目结果判断
        /// </summary>
        public void m_mhDeleteCheckItemCustomRes()
        {
            long lngRes = 0;
            clsLisCheckItemCustomRes m_objLisCheckItemCustomRes = (clsLisCheckItemCustomRes)m_objViewer.m_txtConditions.Tag;

            if (string.IsNullOrEmpty(m_objLisCheckItemCustomRes.m_strCheckItemID))
            {
                return;
            }
            lngRes = m_objDomain.m_lngDeleteCheckItemCustomRes(m_objLisCheckItemCustomRes);
            if (lngRes > 0)
            {
                int idx = m_objViewer.m_dgCheckItemResult.SelectedRows[0].Index;
                m_objViewer.m_dgCheckItemResult.Rows.RemoveAt(idx);
            }
        }