Example #1
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                int selectedHandle;
                selectedHandle = this.gridView1.GetSelectedRows()[0];
                QualityControlInfo qcInfo = new QualityControlInfo();
                qcInfo.QCName       = this.gridView1.GetRowCellValue(selectedHandle, "质控品名称").ToString();
                qcInfo.Pos          = this.gridView1.GetRowCellValue(selectedHandle, "位置").ToString();
                qcInfo.LotNum       = this.gridView1.GetRowCellValue(selectedHandle, "批号").ToString();
                qcInfo.HorizonLevel = this.gridView1.GetRowCellValue(selectedHandle, "水平浓度").ToString();
                qcInfo.InvalidDate  = System.Convert.ToDateTime(this.gridView1.GetRowCellValue(selectedHandle, "失效日期").ToString());
                qcInfo.Manufacturer = this.gridView1.GetRowCellValue(selectedHandle, "生产厂家").ToString();
                qcInfo.IsLocked     = this.gridView1.GetRowCellValue(selectedHandle, "冻结").ToString() == "是" ? true : false;
                qcInfo.QCID         = Convert.ToInt32(this.gridView1.GetRowCellValue(selectedHandle, "质控品ID").ToString());
                if (qcInfo.IsLocked == false)
                {
                    MessageBoxDraw.ShowMsg("此质控品在激活情况下无法删除,请冻结后尝试删除!", MsgType.Warning);
                    return;
                }

                qcMaintainDic.Clear();
                qcMaintainDic.Add("DeleteQualityControl", new object[] { XmlUtility.Serializer(typeof(QualityControlInfo), qcInfo) });
                SendToServices(qcMaintainDic);
            }
        }
Example #2
0
        /// <summary>
        /// 冻结点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLock_Click(object sender, EventArgs e)
        {
            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                int selectedHandle;
                selectedHandle = this.gridView1.GetSelectedRows()[0];
                QualityControlInfo qcInfo = new QualityControlInfo();
                qcInfo.QCName       = this.gridView1.GetRowCellValue(selectedHandle, "质控品名称").ToString();
                qcInfo.Pos          = this.gridView1.GetRowCellValue(selectedHandle, "位置").ToString();
                qcInfo.LotNum       = this.gridView1.GetRowCellValue(selectedHandle, "批号").ToString();
                qcInfo.HorizonLevel = this.gridView1.GetRowCellValue(selectedHandle, "水平浓度").ToString();
                qcInfo.InvalidDate  = System.Convert.ToDateTime(this.gridView1.GetRowCellValue(selectedHandle, "失效日期").ToString());
                qcInfo.Manufacturer = this.gridView1.GetRowCellValue(selectedHandle, "生产厂家").ToString();
                qcInfo.IsLocked     = this.gridView1.GetRowCellValue(selectedHandle, "冻结").ToString() == "是" ? true : false;

                if (qcInfo.IsLocked == true)
                {
                    return;
                }
                else
                {
                    qcInfo.IsLocked = true;
                }

                qcMaintainDic.Clear();
                qcMaintainDic.Add("LockQualityControl", new object[] { XmlUtility.Serializer(typeof(QualityControlInfo), qcInfo) });
                SendToServices(qcMaintainDic);
            }
        }
Example #3
0
        /// <summary>
        /// 激活点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUnLock_Click(object sender, EventArgs e)
        {
            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                int selectedHandle;
                selectedHandle = this.gridView1.GetSelectedRows()[0];
                QualityControlInfo qcInfo = new QualityControlInfo();
                qcInfo.QCName       = this.gridView1.GetRowCellValue(selectedHandle, "质控品名称").ToString();
                qcInfo.Pos          = this.gridView1.GetRowCellValue(selectedHandle, "位置").ToString();
                qcInfo.LotNum       = this.gridView1.GetRowCellValue(selectedHandle, "批号").ToString();
                qcInfo.HorizonLevel = this.gridView1.GetRowCellValue(selectedHandle, "水平浓度").ToString();
                qcInfo.InvalidDate  = System.Convert.ToDateTime(this.gridView1.GetRowCellValue(selectedHandle, "失效日期").ToString());
                qcInfo.Manufacturer = this.gridView1.GetRowCellValue(selectedHandle, "生产厂家").ToString();
                qcInfo.IsLocked     = this.gridView1.GetRowCellValue(selectedHandle, "冻结").ToString() == "是" ? true : false;

                if (qcInfo.IsLocked == false)
                {
                    return;
                }
                else
                {
                    qcInfo.IsLocked = false;
                }

                //
                foreach (QualityControlInfo qc in lstQualityControlInfo)
                {
                    if (qc.Pos == qcInfo.Pos)
                    {
                        if (qc.IsLocked == false)
                        {
                            MessageBoxDraw.ShowMsg(string.Format("在{0}位置已存在被激活的质控品,无法激活!", qc.Pos), MsgType.Warning);
                            return;
                        }
                    }
                }


                qcMaintainDic.Clear();
                qcMaintainDic.Add("UnLockQualityControl", new object[] { XmlUtility.Serializer(typeof(QualityControlInfo), qcInfo) });
                SendToServices(qcMaintainDic);
            }
        }
Example #4
0
        public List <string[]> QueryProjectNameInfoByQC(string strDBMethod, QualityControlInfo qcInfo, string strSampleType)
        {
            List <string> lstProjectByQC = myBatis.QueryProjectNameInfoByQC(strDBMethod, qcInfo, strSampleType, out qcId);

            //判断该项目下的任务是否已完成
            int QCcount = myBatis.QueryQCTaskByProjectAndSamType("QueryQCTaskByProjectAndSamType", qcId);

            List <string[]> lstProjectInfo = new List <string[]>();

            foreach (string project in lstProjectByQC)
            {
                string[] projectInfo = new string[6];
                projectInfo[0] = project;
                AssayProjectParamInfo assayProParam = myBatis.GetAssayProjectParamInfoByNameAndType("GetAssayProjectParamInfoByNameAndType", new AssayProjectInfo()
                {
                    ProjectName = project, SampleType = strSampleType
                });
                ReagentStateInfoR1R2 reagentState = myBatis.QueryReagentStateInfoByProjectName("QueryReagentStateInfoByProjectName", new ReagentSettingsInfo()
                {
                    ProjectName = project, ReagentType = strSampleType
                });
                // 3.判断校准曲线是否可用
                bool bExist = myBatis.CalibCurveBeExistByProNameAndType("CalibCurveBeExistByProNameAndType", new string[] { project, strSampleType });

                if (assayProParam != null)
                {
                    if (assayProParam.AnalysisMethod == "" || assayProParam.AnalysisMethod == null)
                    {
                        projectInfo[2] = "该项目参数录入有误!";
                    }

                    if (reagentState == null)
                    {
                        projectInfo[3] = "该项目没有对应试剂!";
                    }
                    else if (reagentState.ReagentName == "" || reagentState.ReagentName == null || reagentState.ValidPercent < 3)
                    {
                        projectInfo[3] = "此项目对应的试剂1余量不足!";
                    }
                    else if (reagentState.ReagentName2 == "" || reagentState.ReagentName2 == null || reagentState.ValidPercent2 < 3)
                    {
                        projectInfo[3] = "此项目对应的试剂2余量不足!";
                    }
                    else if (reagentState.Locked == true)
                    {
                        projectInfo[3] = "该项目对应试剂被锁定,无法使用!";
                    }

                    if (bExist == false)
                    {
                        projectInfo[4] = "该项目没有对应的较准曲线";
                    }
                    if (QCcount != 0)
                    {
                        projectInfo[5] = "此项目已下任务,请做完此项目任务后才能继续下该项目任务!";
                    }
                    if (projectInfo[2] == null && projectInfo[3] == null && projectInfo[4] == null && projectInfo[5] == null)
                    {
                        projectInfo[1] = "true";
                    }
                    else
                    {
                        projectInfo[1] = "false";
                    }
                }
                else
                {
                    projectInfo[1] = "false";
                    projectInfo[2] = "该项目参数录入有误!";
                    projectInfo[4] = "该项目没有对应的较准曲线";

                    if (reagentState == null)
                    {
                        projectInfo[3] = "该项目没有对应试剂!";
                    }
                    else if (reagentState.Locked == true)
                    {
                        projectInfo[3] = "该项目对应试剂被锁定,无法使用!";
                    }
                }
                lstProjectInfo.Add(projectInfo);
            }
            return(lstProjectInfo);
        }
Example #5
0
 public int UnLockQualityControl(string strDBMethod, QualityControlInfo QCInfo)
 {
     return myBatis.UnLockQualityControl(strDBMethod, QCInfo);
 }
Example #6
0
 public string EditQualityControl(string strDBMethod, QualityControlInfo oldQCInfo, QualityControlInfo newQCInfo, List<QCRelationProjectInfo> lstQCRelationProInfo, List<QCRelationProjectInfo> QCRelationProInfo)
 {
     return myBatis.EditQualityControl(strDBMethod, oldQCInfo, newQCInfo, lstQCRelationProInfo, QCRelationProInfo);
 }
Example #7
0
 public int EditQCRelateProInfo(string strDBMethod, QualityControlInfo QCInfo, List<QCRelationProjectInfo> lstQCRelationProInfo)
 {
     return myBatis.EditQCRelateProInfo(strDBMethod, QCInfo, lstQCRelationProInfo);
 }
Example #8
0
 public string DeleteQualityControl(string strDBMethod, QualityControlInfo QCInfo)
 {
     return myBatis.DeleteQualityControl(strDBMethod, QCInfo);
 }
Example #9
0
 public string AddQualityControl(string strDBMethod, QualityControlInfo qcInfo, List<QCRelationProjectInfo> lstQCRelationProInfo)
 {
     return myBatis.AddQualityControl(strDBMethod, qcInfo, lstQCRelationProInfo);
 }