Exemple #1
0
        public long m_lngInsert(System.Security.Principal.IPrincipal p_objPrincipal, clsLisQCSampleLotParaVO clsLisQCSamplePara)
        {
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngInsert");
            if (lngRes <= 0)
            {
                return(-1);
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();

            try
            {
                lngRes = 0;
                System.Data.IDataParameter[] objODPArr = GetInsertDataParameterArr(clsLisQCSamplePara);

                long lngRecEff = -1;
                //往表增加记录
                lngRes = 0;
                lngRes = objHRPSvc.lngExecuteParameterSQL(m_strInsertSql, ref lngRecEff, objODPArr);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Exemple #2
0
        public long m_lngFind(System.Security.Principal.IPrincipal p_objPrincipal, string p_strCheckItemId, int p_intQCSmplotSeq, out clsLisQCSampleLotParaVO objQCSamplePara)
        {
            long lngRes = 0;

            objQCSamplePara = null;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngFind");
            if (lngRes <= 0)
            {
                return(-1);
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            try
            {
                System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(p_strCheckItemId, p_intQCSmplotSeq);
                DataTable dtbResult = null;
                lngRes = 0;
                lngRes = objHRPSvc.lngGetDataTableWithParameters(m_strFindSql, ref dtbResult, objODPArr);
                objHRPSvc.Dispose();
                if (lngRes == 1 && dtbResult != null && dtbResult.Rows.Count > 0)
                {
                    objQCSamplePara = new clsLisQCSampleLotParaVO();
                    this.ConstructVO(dtbResult.Rows[0], ref objQCSamplePara);
                }
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
        public long m_lngUpdate(clsLisQCSampleLotParaVO p_objRecord)
        {
            long lngRes = 0;

            try
            {
                lngRes = m_objSvc.m_lngUpdate(m_objPrincipal, p_objRecord);
            }
            catch { lngRes = 0; }
            return(lngRes);
        }
Exemple #4
0
        public void ConstructVO(DataRow p_dtrSource, ref clsLisQCSampleLotParaVO objQCSamplePara)
        {
            // CHECK_ITEM_ID_CHR, QCSMPLOT_SEQ_INT, AVG_NUM, SD_NUM,
            // CV_NUM

            objQCSamplePara.m_strCheckItemId = p_dtrSource["CHECK_ITEM_ID_CHR"].ToString();
            objQCSamplePara.m_intQCSmplotSeq = DBAssist.ToInt32(p_dtrSource["QCSMPLOT_SEQ_INT"]);
            objQCSamplePara.m_dblAVG         = DBAssist.ToDouble(p_dtrSource["AVG_NUM"]);
            objQCSamplePara.m_dblSD          = DBAssist.ToDouble(p_dtrSource["SD_NUM"]);
            objQCSamplePara.m_dblCV          = DBAssist.ToDouble(p_dtrSource["CV_NUM"]);
        }
        public long m_lngFind(string p_strCheckItemId, int p_intQCSmplotSeq, out clsLisQCSampleLotParaVO p_objRecord)
        {
            long lngRes = 0;

            p_objRecord = null;
            try
            {
                lngRes = m_objSvc.m_lngFind(m_objPrincipal, p_strCheckItemId, p_intQCSmplotSeq, out p_objRecord);
            }
            catch { lngRes = 0; }
            return(lngRes);
        }
        public long m_lngInsert(clsLisQCSampleLotParaVO p_objRecord)
        {
            int  intID  = -1;
            long lngRes = 0;

            try
            {
                lngRes = m_objSvc.m_lngInsert(m_objPrincipal, p_objRecord);
            }
            catch { lngRes = 0; }
            return(lngRes);
        }
Exemple #7
0
 private System.Data.IDataParameter[] GetUpdateDataParameterArr(clsLisQCSampleLotParaVO objQCSamplePara)
 {
     System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr
                                              (
         objQCSamplePara.m_dblAVG,
         objQCSamplePara.m_dblSD,
         objQCSamplePara.m_dblCV,
         objQCSamplePara.m_strCheckItemId,
         objQCSamplePara.m_intQCSmplotSeq
                                              );
     return(objODPArr);
 }
Exemple #8
0
        private System.Data.IDataParameter[] GetInsertDataParameterArr(clsLisQCSampleLotParaVO objQCSamplePara)
        {
            // CHECK_ITEM_ID_CHR, QCSMPLOT_SEQ_INT, AVG_NUM, SD_NUM,
            // CV_NUM

            IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(
                objQCSamplePara.m_strCheckItemId,
                objQCSamplePara.m_intQCSmplotSeq,
                objQCSamplePara.m_dblAVG,
                objQCSamplePara.m_dblSD,
                objQCSamplePara.m_dblCV
                );
            return(objODPArr);
        }