Exemplo n.º 1
0
        private void m_btnDelCheckItem_Click(object sender, EventArgs e)
        {
            if (m_dgCheckItemResult.Rows.Count > 0)
            {
                MessageBox.Show(this, "ÇëÏÈɾ³ýʵÑé½á¹ûÅжÏ", "MK3ø±êÒDzÙ×÷Ìáʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            long lngRes = 0;

            if (m_txtCutoff.Tag != null)
            {
                string strDeviceCheckItemID = m_cboDeviceCheckItem.SelectedValue.ToString();
                clsLisCheckItemCustomOrder objCheckItemCustomOrder = null;
                lngRes = m_objController.m_lngQueryChcekItemCustomOrder(strDeviceCheckItemID, out objCheckItemCustomOrder);
                if (lngRes > 0 && objCheckItemCustomOrder == null)
                {
                    m_objController.m_mthDeleteCheckItemCustom(strDeviceCheckItemID);
                }
                else
                {
                    MessageBox.Show(this, "ÇëÏÈɾ³ýÉèÖõÄÒÇÆ÷·¢ËÍÃüÁî", "MK3ø±êÒDzÙ×÷Ìáʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取自定义项目的发送命令
        /// </summary>
        /// <param name="p_strCheckItemID"></param>
        /// <param name="p_objCheckItemCustomOrderVO"></param>
        /// <returns></returns>
        public long m_lngQueryChcekItemCustomOrder(string p_strCheckItemID, out clsLisCheckItemCustomOrder p_objCheckItemCustomOrderVO)
        {
            p_objCheckItemCustomOrderVO = null;
            long lngRes = 0;

            lngRes = new clsDomainController_MK3DeviceCommunications().m_lngQueryChcekItemCustomOrder(p_strCheckItemID, out p_objCheckItemCustomOrderVO);
            return(lngRes);
        }
Exemplo n.º 3
0
        public long m_lngQueryChcekItemCustomOrder(System.Security.Principal.IPrincipal p_objPrincipal, string p_strCheckItemID, out clsLisCheckItemCustomOrder p_objCheckItemCustomOrder)
        {
            p_objCheckItemCustomOrder = null;
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, strClassName, "m_lngQueryChcekItemCustomOrder");
            if (lngRes <= 0)
            {
                return(lngRes);
            }
            string             strSQL    = null;
            clsHRPTableService objHRPSvc = null;

            try
            {
                strSQL = @"select t.air_blank_chr,
       t.jin_plate_way_chr,
       t.shock_speed_chr,
       t.shock_time_chr,
       t.wavelength_chr,
       t.filter_chr,
       t.deputy_filter_chr
  from t_bse_lis_check_item_cutomorde t
 where t.check_item_id_chr = ?
";
                IDataParameter[] objDPArr = null;
                objHRPSvc = new clsHRPTableService();
                objHRPSvc.CreateDatabaseParameter(1, out objDPArr);
                objDPArr[0].Value = p_strCheckItemID;
                DataTable dtResult = null;
                lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref dtResult, objDPArr);
                if (lngRes > 0 && dtResult != null && dtResult.Rows.Count > 0)
                {
                    DataRow drTemp = dtResult.Rows[0];
                    p_objCheckItemCustomOrder = new clsLisCheckItemCustomOrder();
                    p_objCheckItemCustomOrder.m_strAir_blank         = drTemp["air_blank_chr"].ToString().Trim();
                    p_objCheckItemCustomOrder.m_strJin_plate_way_chr = drTemp["jin_plate_way_chr"].ToString().Trim();
                    p_objCheckItemCustomOrder.m_strShock_speed_chr   = drTemp["shock_speed_chr"].ToString().Trim();
                    p_objCheckItemCustomOrder.m_strShock_time_chr    = drTemp["shock_time_chr"].ToString().Trim();
                    p_objCheckItemCustomOrder.m_strWavelength_chr    = drTemp["wavelength_chr"].ToString().Trim();
                    p_objCheckItemCustomOrder.m_strFilter_chr        = drTemp["filter_chr"].ToString().Trim();
                    p_objCheckItemCustomOrder.m_strDeputy_filter_chr = drTemp["deputy_filter_chr"].ToString().Trim();
                }
            }
            catch (Exception objEx)
            {
                clsLogText objLogger = new clsLogText();
                objLogger.LogDetailError(objEx, true);
            }
            finally
            {
                strSQL       = null;
                objPrivilege = null;
                objHRPSvc    = null;
            }
            return(lngRes);
        }
        /// <summary>
        /// 添加自定义项目的发送命令
        /// </summary>
        /// <param name="p_objCheckItemCustomOrderVO"></param>
        /// <returns></returns>
        public long m_lngInsertCheckItemCustomOrder(clsLisCheckItemCustomOrder p_objCheckItemCustomOrderVO)
        {
            long lngRes = 0;
            clsMK3DeviceCommunications objSvc =
                (clsMK3DeviceCommunications)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMK3DeviceCommunications));

            lngRes = objSvc.m_lngInsertCheckItemCustomOrder(objPrincipal, p_objCheckItemCustomOrderVO);
            return(lngRes);
        }
        /// <summary>
        /// 获取自定义项目的发送命令
        /// </summary>
        /// <param name="p_strCheckItemID"></param>
        /// <param name="p_objCheckItemCustomOrderArr"></param>
        /// <returns></returns>
        public long m_lngQueryChcekItemCustomOrder(string p_strCheckItemID, out clsLisCheckItemCustomOrder p_objCheckItemCustomOrder)
        {
            p_objCheckItemCustomOrder = null;
            long lngRes = 0;
            clsMK3DeviceCommunications objSvc =
                (clsMK3DeviceCommunications)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMK3DeviceCommunications));

            lngRes = objSvc.m_lngQueryChcekItemCustomOrder(objPrincipal, p_strCheckItemID, out p_objCheckItemCustomOrder);
            return(lngRes);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 获取和设置自定义项目的发送命令
        /// </summary>
        public void m_mthGetCheckItemCustomOrder()
        {
            long lngRes = 0;
            clsLisCheckItemCustomOrder m_objCheckItemCustomOrder = null;

            lngRes = m_objDomain.m_lngQueryChcekItemCustomOrder(m_objViewer.m_strCheckItemID, out m_objCheckItemCustomOrder);
            if (lngRes > 0 && m_objCheckItemCustomOrder != null)
            {
                if (m_objCheckItemCustomOrder.m_strAir_blank == "0")
                {
                    m_objViewer.m_chAirBlank.Checked = false;
                }
                else
                {
                    m_objViewer.m_chAirBlank.Checked = true;
                }
                if (m_objCheckItemCustomOrder.m_strJin_plate_way_chr == "E0")
                {
                    m_objViewer.m_cboJinPlateWay.Text = "持续进板";
                }
                else
                {
                    m_objViewer.m_cboJinPlateWay.Text = "逐步进板";
                }
                switch (m_objCheckItemCustomOrder.m_strShock_speed_chr)
                {
                case "X1":
                    m_objViewer.m_cboShockSpeed.Text = "快速震荡";
                    break;

                case "X2":
                    m_objViewer.m_cboShockSpeed.Text = "中速震荡";
                    break;

                case "X3":
                    m_objViewer.m_cboShockSpeed.Text = "慢速震荡";
                    break;
                }
                if (!string.IsNullOrEmpty(m_objCheckItemCustomOrder.m_strShock_time_chr))
                {
                    string m_strShockTime = m_objCheckItemCustomOrder.m_strShock_time_chr.Substring(1);
                    m_strShockTime = m_strShockTime.Trim();
                    m_objViewer.m_txtShockTime.Text = m_strShockTime;
                }
                if (m_objCheckItemCustomOrder.m_strWavelength_chr == "0")
                {
                    m_objViewer.m_chWavelength.Checked = false;
                }
                else
                {
                    m_objViewer.m_chWavelength.Checked = true;
                }
                if (!string.IsNullOrEmpty(m_objCheckItemCustomOrder.m_strFilter_chr))
                {
                    string m_strFilter = m_objCheckItemCustomOrder.m_strFilter_chr.Substring(1);
                    m_objViewer.m_cboFilter.Text = m_strFilter;
                }
                if (!string.IsNullOrEmpty(m_objCheckItemCustomOrder.m_strDeputy_filter_chr))
                {
                    string m_strDeputy_filter = m_objCheckItemCustomOrder.m_strDeputy_filter_chr.Substring(1);
                    m_objViewer.m_cboDeputyFilter.Text = m_strDeputy_filter;
                }
                m_objViewer.m_txtShockTime.Tag = m_objCheckItemCustomOrder;
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 添加或者修改发送给仪器的命令
        /// </summary>
        public void m_mthOperationCheckItemCustomOrder()
        {
            clsLisCheckItemCustomOrder m_objCheckItemCustomOrderVO = new clsLisCheckItemCustomOrder();

            if (m_objViewer.m_chAirBlank.Checked)
            {
                m_objCheckItemCustomOrderVO.m_strAir_blank = "1";
            }
            else
            {
                m_objCheckItemCustomOrderVO.m_strAir_blank = "0";
            }
            if (m_objViewer.m_cboJinPlateWay.Text == "持续进板")
            {
                m_objCheckItemCustomOrderVO.m_strJin_plate_way_chr = "E0";
            }
            else
            {
                m_objCheckItemCustomOrderVO.m_strJin_plate_way_chr = "E1";
            }
            if (m_objViewer.m_cboShockSpeed.Text == "快速震荡")
            {
                m_objCheckItemCustomOrderVO.m_strShock_speed_chr = "X1";
            }
            if (m_objViewer.m_cboShockSpeed.Text == "中速震荡")
            {
                m_objCheckItemCustomOrderVO.m_strShock_speed_chr = "X2";
            }
            if (m_objViewer.m_cboShockSpeed.Text == "慢速震荡")
            {
                m_objCheckItemCustomOrderVO.m_strShock_speed_chr = "X3";
            }
            int intShockTime;

            try
            {
                intShockTime = Convert.ToInt32(m_objViewer.m_txtShockTime.Text.Trim());
                if (intShockTime < 10)
                {
                    m_objCheckItemCustomOrderVO.m_strShock_time_chr = "Z" + "0" + intShockTime.ToString();
                }
                else
                {
                    m_objCheckItemCustomOrderVO.m_strShock_time_chr = "Z" + intShockTime.ToString();
                }
            }
            catch
            { }
            if (m_objViewer.m_chWavelength.Checked)
            {
                m_objCheckItemCustomOrderVO.m_strWavelength_chr = "1";
            }
            else
            {
                m_objCheckItemCustomOrderVO.m_strWavelength_chr = "0";
            }
            m_objCheckItemCustomOrderVO.m_strFilter_chr        = "F" + m_objViewer.m_cboFilter.Text;
            m_objCheckItemCustomOrderVO.m_strDeputy_filter_chr = "F" + m_objViewer.m_cboDeputyFilter.Text;
            m_objCheckItemCustomOrderVO.m_strCheckItemID       = m_objViewer.m_strCheckItemID;
            long lngRes = 0;

            if (m_objViewer.m_txtShockTime.Tag == null)
            {
                lngRes = m_objDomain.m_lngInsertCheckItemCustomOrder(m_objCheckItemCustomOrderVO);
            }
            else
            {
                lngRes = m_objDomain.m_lngUpdateChcekItemCustomOrder(m_objCheckItemCustomOrderVO);
            }
        }
Exemplo n.º 8
0
        public long m_lngUpdateChcekItemCustomOrder(System.Security.Principal.IPrincipal p_objPrincipal, clsLisCheckItemCustomOrder p_objCheckItemCustomOrderVO)
        {
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, strClassName, "m_lngUpdateChcekItemCustomOrder");
            if (lngRes <= 0)
            {
                return(lngRes);
            }
            string             strSQL    = null;
            clsHRPTableService objHRPSvc = null;

            try
            {
                strSQL = @"update t_bse_lis_check_item_cutomorde t
   set t.air_blank_chr     = ?,
       t.jin_plate_way_chr = ?,
       t.shock_speed_chr   = ?,
       t.shock_time_chr    = ?,
       t.wavelength_chr    = ?,
       t.filter_chr        = ?,
       t.deputy_filter_chr = ?
 where t.check_item_id_chr = ?

";
                IDataParameter[] objDPArr = null;
                objHRPSvc = new clsHRPTableService();
                objHRPSvc.CreateDatabaseParameter(8, out objDPArr);
                objDPArr[0].Value = p_objCheckItemCustomOrderVO.m_strAir_blank;
                objDPArr[1].Value = p_objCheckItemCustomOrderVO.m_strJin_plate_way_chr;
                objDPArr[2].Value = p_objCheckItemCustomOrderVO.m_strShock_speed_chr;
                objDPArr[3].Value = p_objCheckItemCustomOrderVO.m_strShock_time_chr;
                objDPArr[4].Value = p_objCheckItemCustomOrderVO.m_strWavelength_chr;
                objDPArr[5].Value = p_objCheckItemCustomOrderVO.m_strFilter_chr;
                objDPArr[6].Value = p_objCheckItemCustomOrderVO.m_strDeputy_filter_chr;
                objDPArr[7].Value = p_objCheckItemCustomOrderVO.m_strCheckItemID;
                long lngEff = 0;
                lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr);
            }
            catch (Exception objEx)
            {
                clsLogText objLogger = new clsLogText();
                objLogger.LogDetailError(objEx, true);
            }
            finally
            {
                strSQL       = null;
                objPrivilege = null;
                objHRPSvc    = null;
            }
            return(lngRes);
        }