private void btnReactionProcess_Click(object sender, EventArgs e)
        {
            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                if (reactionProcessQC == null)
                {
                    reactionProcessQC = new ReactionProcessQC();
                    reactionProcessQC.StartPosition = FormStartPosition.CenterScreen;
                }
                QCResultForUIInfo qcResInfoFirst = new QCResultForUIInfo();

                DataRow dr = this.gridView1.GetDataRow(this.gridView1.GetSelectedRows()[0]);
                qcResInfoFirst.QCName       = (string)dr.ItemArray[0];
                qcResInfoFirst.ProjectName  = (string)dr.ItemArray[1];
                qcResInfoFirst.SampleType   = (string)dr.ItemArray[2];
                qcResInfoFirst.LotNum       = (string)dr.ItemArray[3];
                qcResInfoFirst.Pos          = (string)dr.ItemArray[4];
                qcResInfoFirst.HorizonLevel = (string)dr.ItemArray[5];
                qcResInfoFirst.TargetMean   = (float)(System.Convert.ToDouble(dr.ItemArray[6]));
                qcResInfoFirst.TargetSD     = (float)(System.Convert.ToDouble(dr.ItemArray[7]));
                qcResInfoFirst.ConcResult   = (float)(System.Convert.ToDouble(dr.ItemArray[8]));
                string datetime = dr.ItemArray[9].ToString();
                qcResInfoFirst.Manufacturer = (string)dr.ItemArray[10];

                qcResInfoFirst.QCTimeStartTS  = System.Convert.ToDateTime(dtpQCStartTime.Text);
                qcResInfoFirst.QCTimeEndTS    = System.Convert.ToDateTime(dtpQCEndTime.Text).AddDays(1);
                reactionProcessQC.QCResInfo   = qcResInfoFirst;
                reactionProcessQC.StrDateTime = datetime;
                reactionProcessQC.ReactionProcessQC_Load(null, null);
                reactionProcessQC.ShowDialog();
            }
        }
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                if (frmEditQCRes == null)
                {
                    frmEditQCRes = new frmEditQCResult();
                    frmEditQCRes.StartPosition = FormStartPosition.CenterParent;
                }
                QCResultForUIInfo qcResInfoFirst = new QCResultForUIInfo();

                DataRow dr = this.gridView1.GetDataRow(this.gridView1.GetSelectedRows()[0]);
                qcResInfoFirst.QCName           = (string)dr.ItemArray[0];
                qcResInfoFirst.ProjectName      = (string)dr.ItemArray[1];
                qcResInfoFirst.SampleType       = (string)dr.ItemArray[2];
                qcResInfoFirst.LotNum           = (string)dr.ItemArray[3];
                qcResInfoFirst.Pos              = (string)dr.ItemArray[4];
                qcResInfoFirst.HorizonLevel     = (string)dr.ItemArray[5];
                qcResInfoFirst.TargetMean       = (float)(System.Convert.ToDouble(dr.ItemArray[6]));
                qcResInfoFirst.TargetSD         = (float)(System.Convert.ToDouble(dr.ItemArray[7]));
                qcResInfoFirst.ConcResult       = (float)(System.Convert.ToDouble(dr.ItemArray[8]));
                qcResInfoFirst.SampleCreateTime = (DateTime)(System.Convert.ToDateTime(dr.ItemArray[9]));
                qcResInfoFirst.Manufacturer     = (string)dr.ItemArray[10];

                frmEditQCRes.QCResInfo = qcResInfoFirst;
                frmEditQCRes.frmEditQCResult_Load(null, null);
                frmEditQCRes.ShowDialog();
            }
            else
            {
                MessageBox.Show("请选择至少一条记录!");
                return;
            }
        }
        private void loadQualityControlState()
        {
            //frmEditQCRes = new frmEditQCResult();
            //reactionProcessQC = new ReactionProcessQC();

            QCResultForUIInfo qcResultForUI = new QCResultForUIInfo();

            qcResultForUI.QCTimeStartTS = DateTime.Now.Date;
            qcResultForUI.QCTimeEndTS   = DateTime.Now.Date.AddDays(1);
            qcStateDic.Clear();
            qcStateDic.Add("QueryQCResultInfo", new object[] { XmlUtility.Serializer(typeof(QCResultForUIInfo), qcResultForUI) });
            qcStateDic.Add("QueryProjectName", null);      //获取项目名称
            qcStateDic.Add("GetsQCRelationProInfo", null); //获取项目、质控品关联信息
            qcStateDic.Add("QueryQCAllInfo", null);        //获取所有质控品信息
            ClientSendToServices(qcStateDic);
        }
        /// <summary>
        /// 重复性点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnRepeat_Click(object sender, EventArgs e)
        {
            List <float>      lstConcResults = new List <float>();
            QCResultForUIInfo qcResInfoFirst = new QCResultForUIInfo();

            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                DataRow dr = this.gridView1.GetDataRow(this.gridView1.GetSelectedRows()[0]);
                qcResInfoFirst.QCName           = (string)dr.ItemArray[0];
                qcResInfoFirst.ProjectName      = (string)dr.ItemArray[1];
                qcResInfoFirst.SampleType       = (string)dr.ItemArray[2];
                qcResInfoFirst.LotNum           = (string)dr.ItemArray[3];
                qcResInfoFirst.Pos              = (string)dr.ItemArray[4];
                qcResInfoFirst.HorizonLevel     = (string)dr.ItemArray[5];
                qcResInfoFirst.TargetMean       = (float)(System.Convert.ToDouble(dr.ItemArray[6]));
                qcResInfoFirst.TargetSD         = (float)(System.Convert.ToDouble(dr.ItemArray[7]));
                qcResInfoFirst.ConcResult       = (float)(System.Convert.ToDouble(dr.ItemArray[8]));
                qcResInfoFirst.SampleCreateTime = (DateTime)(System.Convert.ToDateTime(dr.ItemArray[9]));
                qcResInfoFirst.Manufacturer     = (string)dr.ItemArray[10];

                foreach (int i in this.gridView1.GetSelectedRows())
                {
                    DataRow dataRow = this.gridView1.GetDataRow(i);

                    if (qcResInfoFirst.ProjectName == (string)dataRow.ItemArray[1] ||
                        qcResInfoFirst.QCName == (string)dataRow.ItemArray[0] ||
                        qcResInfoFirst.SampleType == (string)dataRow.ItemArray[2] ||
                        qcResInfoFirst.LotNum == (string)dataRow.ItemArray[3] ||
                        qcResInfoFirst.Manufacturer == (string)dataRow.ItemArray[10])
                    {
                        lstConcResults.Add((float)(System.Convert.ToDouble(dataRow.ItemArray[8])));
                    }
                }
                if (frmRepeat == null)
                {
                    frmRepeat = new frmRepeat();
                    frmRepeat.StartPosition = FormStartPosition.CenterParent;
                }
                else
                {
                    frmRepeat.ClearFrmRepeatParam();
                }
                frmRepeat.frmRepeat_Load(qcResInfoFirst, lstConcResults);
                frmRepeat.ShowDialog();
            }
        }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            QCResultForUIInfo qcResInfo = new QCResultForUIInfo();

            if (txtQCName.Text != "")
            {
                qcResInfo.QCName = txtQCName.SelectedItem.ToString();
            }
            if (txtProjectName.Text != "")
            {
                qcResInfo.ProjectName = txtProjectName.SelectedItem.ToString();
            }
            qcResInfo.LotNum        = txtLotNum.Text;
            qcResInfo.QCTimeStartTS = System.Convert.ToDateTime(dtpQCStartTime.Text);
            qcResInfo.QCTimeEndTS   = System.Convert.ToDateTime(dtpQCEndTime.Text).AddDays(1);
            qcStateDic.Clear();
            qcStateDic.Add("QueryQCResultInfo", new object[] { XmlUtility.Serializer(typeof(QCResultForUIInfo), qcResInfo) });
            ClientSendToServices(qcStateDic);
        }
Beispiel #6
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSearch_Click(object sender, EventArgs e)
        {
            this.Invoke(new EventHandler(delegate { chartControl1.Series.Clear(); }));
            QCResultForUIInfo qcResForUIInfo = new QCResultForUIInfo();

            if (cboProjectName.Text != "")
            {
                qcResForUIInfo.ProjectName = cboProjectName.SelectedItem.ToString();
            }
            else
            {
                MessageBox.Show("项目名称不能为空!");
                return;
            }

            if (cboQCName.Text != "")
            {
                qcResForUIInfo.QCName = cboQCName.SelectedItem.ToString();
            }
            else
            {
                MessageBox.Show("请选择质控品名!");
                return;
            }
            this.Invoke(new EventHandler(delegate
            {
                this.btnSearch.Enabled = false;
            }));

            qcResForUIInfo.QCTimeStartTS = System.Convert.ToDateTime((dtpStartTime.Value).ToShortDateString());
            qcResForUIInfo.QCTimeEndTS   = System.Convert.ToDateTime((dtpEndTime.Value).AddDays(1).ToShortDateString());
            if (results != null)
            {
                results = null;
            }
            //qcGraphsDic.Clear();
            //qcGraphsDic.Add("QueryQCResultForQCGraphics", new object[] { XmlUtility.Serializer(typeof(QCResultForUIInfo), qcResForUIInfo) });
            //ClientSendInfoToServices(qcGraphsDic);
            results = new QCGraphics().QueryQCResultForQCGraphics("QueryQCResultForQCGraphics", qcResForUIInfo);
            QualityControlPicture(results);
        }
Beispiel #7
0
 /// <summary>
 /// 获取质控图结果数据
 /// </summary>
 /// <param name="strDBMethod"></param>
 /// <param name="qcResForUIInfo"></param>
 /// <returns></returns>
 public List <QCResultForUIInfo> QueryQCResultForQCGraphics(string strDBMethod, QCResultForUIInfo qcResForUIInfo)
 {
     return(myBatis.QueryQCResultForQCGraphics(strDBMethod, qcResForUIInfo));
 }
Beispiel #8
0
 public void frmRepeat_Load(QCResultForUIInfo qcResInfo, List <float> lstConcResult)
 {
     lstConcResults = lstConcResult;
     qcResultInfo   = qcResInfo;
     this.loadFrmRepeat();
 }
Beispiel #9
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (cboQCName.SelectedItem.ToString() == "请选择" ||
                cboSampleType.SelectedItem.ToString() == "请选择" ||
                cboProjectName.SelectedItem.ToString() == "请选择" ||
                cboPosition.SelectedItem.ToString() == "请选择" ||
                cboHorizonLevel.SelectedItem.ToString() == "请选择" ||
                cboManufacturer.SelectedItem.ToString() == "请选择" ||
                !Regex.IsMatch(txtConcResult.Text.Trim(), @"^\d+(\.\d+)?$"))
            {
                MessageBox.Show("请正确填写信息!");
                return;
            }

            if (!Regex.IsMatch(txtConcResult.Text.Trim(), @"^\d+(\.\d+)?$"))
            {
                MessageBox.Show("请正确填写浓度值!");
                return;
            }

            if (dtpQCStartTime.Value > DateTime.Now)
            {
                MessageBox.Show("请选择小于当前时间的质控时间!");
                return;
            }

            QCResultForUIInfo qcResEditOrAdd = new QCResultForUIInfo();

            qcResEditOrAdd.QCName           = cboQCName.SelectedItem.ToString();
            qcResEditOrAdd.SampleType       = cboSampleType.SelectedItem.ToString();
            qcResEditOrAdd.ProjectName      = cboProjectName.SelectedItem.ToString();
            qcResEditOrAdd.LotNum           = cboLotNum.SelectedItem.ToString();
            qcResEditOrAdd.Pos              = cboPosition.SelectedItem.ToString();
            qcResEditOrAdd.HorizonLevel     = cboHorizonLevel.SelectedItem.ToString();
            qcResEditOrAdd.ConcResult       = (float)System.Convert.ToDouble(txtConcResult.Text);
            qcResEditOrAdd.SampleCreateTime = dtpQCStartTime.Value;
            qcResEditOrAdd.Manufacturer     = cboManufacturer.SelectedItem.ToString();

            switch (editModel)
            {
            case EditModel.Edit:
                frmEditQCResultDic.Clear();
                //修改质控结果信息
                frmEditQCResultDic.Add("EditQCResultForManual", new object[] { XmlUtility.Serializer(typeof(QCResultForUIInfo), qCResInfo), XmlUtility.Serializer(typeof(QCResultForUIInfo), qcResEditOrAdd) });
                SendInfoToService(frmEditQCResultDic);
                break;

            case EditModel.Add:
                frmEditQCResultDic.Clear();
                //新增质控结果信息
                frmEditQCResultDic.Add("AddQCResultForManual", new object[] { XmlUtility.Serializer(typeof(QCResultForUIInfo), qcResEditOrAdd) });
                SendInfoToService(frmEditQCResultDic);
                break;

            case EditModel.Delete:
                break;

            default:
                break;
            }
        }
Beispiel #10
0
 public TimeCourseInfo QueryTimeCourseByQCInfo(string strDBMethod, QCResultForUIInfo qcResInfo, string dateTime)
 {
     return(myBatis.QueryTimeCourseByQCInfo(strDBMethod, qcResInfo, dateTime));
 }
Beispiel #11
0
 public string DeleteQCResult(string strDBMethod, QCResultForUIInfo qcResInfo)
 {
     return(myBatis.DeleteQCResult(strDBMethod, qcResInfo));
 }
Beispiel #12
0
 public string AddQCResultForManual(string strDBMethod, QCResultForUIInfo qcResNewInfo)
 {
     return(myBatis.AddQCResultForManual(strDBMethod, qcResNewInfo));
 }
Beispiel #13
0
 /// <summary>
 /// 用户手动修改质控结果信息
 /// </summary>
 /// <param name="strDBMethod">访问数据库方法名</param>
 /// <param name="qcResOldInfo">老数据</param>
 /// <param name="qcResNewInfo">新数据</param>
 /// <returns></returns>
 public string EditQCResultForManual(string strDBMethod, QCResultForUIInfo qcResOldInfo, QCResultForUIInfo qcResNewInfo)
 {
     return(myBatis.EditQCResultForManual(strDBMethod, qcResOldInfo, qcResNewInfo));
 }
Beispiel #14
0
 public List <QCResultForUIInfo> QueryQCResultInfo(string strDBMethod, QCResultForUIInfo qCResForUIInfo)
 {
     return(myBatis.QueryQCResultInfo(strDBMethod, qCResForUIInfo));
 }