Exemple #1
0
        public int UpdateEnvironmentParamInfo(string strDBMethod, EnvironmentParamInfo environmentParamInfo, RunningStateInfo running)
        {
            int intResult = myBatis.UpdateEnvironmentParamInfo(strDBMethod, environmentParamInfo, running);

            LogInfo.WriteProcessLog("UpdateEnvironmentParamInfo(string strDBMethod, EnvironmentParamInfo environmentParamInfo, RunningStateInfo running)" + intResult.ToString(), Module.WindowsService);

            return(intResult);
        }
Exemple #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            RunningStateInfo     running = new RunningStateInfo();
            EnvironmentParamInfo environmentParamInfo = new EnvironmentParamInfo();

            if (!Regex.IsMatch(txtLowCuvette.Text.Trim(), @"^(-?\d+)(\.\d+)?$") || !Regex.IsMatch(txtHighCuvette.Text.Trim(), @"^(-?\d+)(\.\d+)?$"))
            {
                MessageBoxDraw.ShowMsg("比色杯空白最低值或最高值输入格式有误!", MsgType.Warning);
                return;
            }

            if ((float)Convert.ToDouble(txtLowCuvette.Text) > (float)Convert.ToDouble(txtHighCuvette.Text))
            {
                MessageBoxDraw.ShowMsg("比色杯空白最低值应小于或等于最高值!", MsgType.Warning);
                return;
            }

            if (!Regex.IsMatch(txtReaLowestVol.Text.Trim(), @"^(-?\d+)(\.\d+)?$") || !Regex.IsMatch(txtReaSurplusWarn.Text.Trim(), @"^(-?\d+)(\.\d+)?$"))
            {
                MessageBoxDraw.ShowMsg("试剂设置输入格式有误!", MsgType.Warning);
                return;
            }

            if ((float)Convert.ToDouble(txtReaLowestVol.Text) > (float)Convert.ToDouble(txtReaSurplusWarn.Text))
            {
                MessageBoxDraw.ShowMsg("试剂最小体积应小于试剂余量报警体积!", MsgType.Warning);
                return;
            }

            if (!Regex.IsMatch(txtWashLowestVol.Text.Trim(), @"^(-?\d+)(\.\d+)?$") || !Regex.IsMatch(txtWashSurplusWarn.Text.Trim(), @"^(-?\d+)(\.\d+)?$"))
            {
                MessageBoxDraw.ShowMsg("清洗剂设置输入格式有误!", MsgType.Warning);
                return;
            }

            if ((float)Convert.ToDouble(txtWashLowestVol.Text) > (float)Convert.ToDouble(txtWashSurplusWarn.Text))
            {
                MessageBoxDraw.ShowMsg("清洗剂最小体积应小于清洗剂余量报警体积!", MsgType.Warning);
                return;
            }
            if (!Regex.IsMatch(txthatchtemp.Text.Trim(), @"^(-?\d+)(\.\d+)?$"))
            {
                MessageBoxDraw.ShowMsg("孵育槽温控输入格式有误!", MsgType.Warning);
                return;
            }
            if (Convert.ToDouble(txthatchtemp.Text.Trim()) > 5)
            {
                MessageBoxDraw.ShowMsg("孵育槽温控不能超过5!", MsgType.Warning);
                return;
            }
            environmentParamInfo.ReagentSurplus   = (float)Convert.ToDouble(txtReaSurplusWarn.Text);
            environmentParamInfo.ReagentLeastVol  = (float)Convert.ToDouble(txtReaLowestVol.Text);
            environmentParamInfo.CuvetteBlankLow  = (float)Convert.ToDouble(txtLowCuvette.Text);
            environmentParamInfo.CuvetteBlankHigh = (float)Convert.ToDouble(txtHighCuvette.Text);
            environmentParamInfo.AbluentSurplus   = (float)Convert.ToDouble(txtWashSurplusWarn.Text);
            environmentParamInfo.AbluentLeastVol  = (float)Convert.ToDouble(txtWashLowestVol.Text);
            running.QCSMPContainerType            = comboBoxQCDCon.Text;
            running.SDTSMPContainerType           = comboBoxCalbDCon.Text;
            running.TempOffset = (float)Convert.ToDouble(txthatchtemp.Text);

            if (chkReagentMarginLock.Checked == true)
            {
                environmentParamInfo.AutoFreezeTask = true;
            }
            else
            {
                environmentParamInfo.AutoFreezeTask = false;
            }
            envmentDataDic.Clear();
            envmentDataDic.Add("UpdateEnvironmentParamInfo", new object[] { XmlUtility.Serializer(typeof(EnvironmentParamInfo), environmentParamInfo), XmlUtility.Serializer(typeof(RunningStateInfo), running) });
            EnvironmentDataLoad(envmentDataDic);
        }