Beispiel #1
0
        /// <summary>
        /// 新增(稀释比例)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddDilutionRatio_Click(object sender, EventArgs e)
        {
            dilutionRatio = null;
            dilutionRatio = textEdit2.Text.Trim();
            int result;

            if (isNumberic(dilutionRatio, out result))
            {
            }
            else
            {
                MessageBoxDraw.ShowMsg("稀释比例输入格式有误!", MsgType.Exception);
                return;
            }


            if (dilutionRatio != "")
            {
                dataConfigDic.Clear();
                //添加稀释比例
                dataConfigDic.Add("DilutionRatioAdd", new object[] { dilutionRatio });
                DataConfigLoad(dataConfigDic);
            }
            else
            {
                MessageBoxDraw.ShowMsg("请输入稀释比例!", MsgType.Exception);
                return;
            }
            textEdit2.Text = "";
        }
Beispiel #2
0
 /// <summary>
 /// 删除校准品点击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     lstCalibProjectInfo = new List <CalibratorProjectinfo>();
     if (gridView1.SelectedRowsCount > 0)
     {
         int selectedHandle;
         selectedHandle = this.gridView1.GetSelectedRows()[0];
         DialogResult result = MessageBoxDraw.ShowMsg("请确认是否删除!", MsgType.YesNo);
         if (result == DialogResult.Yes)
         {
             string calibName = this.gridView1.GetRowCellValue(selectedHandle, "校准品名称").ToString();
             for (int i = 0; i < gridView2.RowCount; i++)
             {
                 CalibratorProjectinfo calibProjectInfo = new CalibratorProjectinfo();
                 calibProjectInfo.ProjectName = this.gridView2.GetRowCellValue(i, "项目名称").ToString();
                 calibProjectInfo.SampleType  = this.gridView2.GetRowCellValue(i, "样本类型").ToString();
                 calibProjectInfo.CalibName   = calibName;
                 lstCalibProjectInfo.Add(calibProjectInfo);
             }
             calibMainDictionary.Clear();
             calibMainDictionary.Add("DeleteCalibrationMaintain", new object[] { XmlUtility.Serializer(typeof(List <CalibratorProjectinfo>), lstCalibProjectInfo) });
             CalibrationMaintainSend(calibMainDictionary);
         }
         else
         {
             return;
         }
     }
 }
Beispiel #3
0
        /// <summary>
        /// 修改(结果单位)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdateResultUnit_Clik(object sender, EventArgs e)
        {
            resultUnit = null;
            resultUnit = textEdit1.Text;
            if (resultUnitParam != null)
            {
                if (resultUnit != "")
                {
                    dataConfigDic.Clear();
                    //修改数据结果单位
                    dataConfigDic.Add("UpdataDataConfig", new object[] { resultUnit, resultUnitParam });
                    DataConfigLoad(dataConfigDic);
                }
                else
                {
                    MessageBoxDraw.ShowMsg("您的输入有误,请重新输入!", MsgType.Exception);
                    return;
                }
            }
            else
            {
                MessageBoxDraw.ShowMsg("请选择您要修改的结果单位中的某一列!", MsgType.Exception);
                return;
            }

            textEdit1.Text = "";
        }
Beispiel #4
0
        /// <summary>
        /// 删除(结果单位)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDelete_Click(object sender, EventArgs e)
        {
            resultUnit = null;
            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                DialogResult yesorno = MessageBoxDraw.ShowMsg("是否确认删除", MsgType.YesNo);
                if (yesorno == DialogResult.No)
                {
                    return;
                }
                int selectedHandle;

                selectedHandle = this.gridView1.GetSelectedRows()[0];
                resultUnit     = this.gridView1.GetRowCellValue(selectedHandle, "结果单位").ToString();
                if (resultUnit != null)
                {
                    textEdit1.Text = resultUnit;
                    dataConfigDic.Clear();
                    //删除结果单位
                    dataConfigDic.Add("DeleteDataConfig", new object[] { resultUnit });
                    DataConfigLoad(dataConfigDic);
                    textEdit1.Text = "";
                }
            }
        }
Beispiel #5
0
        /// <summary>
        /// 卸载试剂2
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (gridView2.SelectedRowsCount > 0)
            {
                DialogResult result = MessageBoxDraw.ShowMsg("是否确认卸载试剂!", MsgType.YesNo);
                if (result == DialogResult.Yes)
                {
                }
                else
                {
                    return;
                }
                reagentSettingsInfo = new ReagentSettingsInfo();
                int selectedHandle;

                selectedHandle = this.gridView2.GetSelectedRows()[0];
                reagentSettingsInfo.ProjectName = this.gridView2.GetRowCellValue(selectedHandle, "检测项目").ToString();
                reagentSettingsInfo.ReagentName = this.gridView2.GetRowCellValue(selectedHandle, "试剂名称").ToString();
                reagentSettingsInfo.ReagentType = this.gridView2.GetRowCellValue(selectedHandle, "试剂类型").ToString();
                reagentSettingsInfo.Pos         = this.gridView2.GetRowCellValue(selectedHandle, "位置").ToString();
                reagentDictionary.Clear();
                reagentDictionary.Add("DeleteReagentSettingsR2", new object[] { XmlUtility.Serializer(typeof(ReagentSettingsInfo), reagentSettingsInfo) });
                ClientSendToServicer(reagentDictionary);
                dt2.Rows.Remove(dt2.Rows[selectedHandle]);
            }
        }
Beispiel #6
0
        public void DataTransfer_Event(string strMethod, object sender)
        {
            switch (strMethod)
            {
            case "QueryUserInfo":
                lstuserInfo = (List <UserInfo>)XmlUtility.Deserialize(typeof(List <UserInfo>), sender as string);
                UserInfoAdd(lstuserInfo);
                break;

            case "AddUserInfo":
                QueryUserInfo();
                break;

            case "EditUserInfo":
                QueryUserInfo();
                break;

            case "DeleteUserInfo":
                int count = Convert.ToInt32(sender);
                if (count != 0)
                {
                    MessageBoxDraw.ShowMsg("删除失败!请先删除检验医师中的用户名!", MsgType.Exception);
                }
                QueryUserInfo();
                break;

            case "QueryUserCeation":
                userCeation.AddUserCeation((UserInfo)XmlUtility.Deserialize(typeof(UserInfo), sender as string));

                break;
            }
        }
Beispiel #7
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);
            }
        }
Beispiel #8
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                if (MessageBoxDraw.ShowMsg("是否确认删除该防污策略?", MsgType.Question) == DialogResult.OK)
                {
                    CommunicationEntity ReagentNeedle = new CommunicationEntity();
                    ReagentNeedleAntifoulingStrategyInfo reagentNeedleAntifoulingStrategyInfo = new ReagentNeedleAntifoulingStrategyInfo();
                    int selectedHandle;
                    selectedHandle = this.gridView1.GetSelectedRows()[0];
                    reagentNeedleAntifoulingStrategyInfo.ReagentNeedle        = this.gridView1.GetRowCellValue(selectedHandle, "试剂针").ToString();
                    reagentNeedleAntifoulingStrategyInfo.PolluteProName       = this.gridView1.GetRowCellValue(selectedHandle, "污染项目名称").ToString();
                    reagentNeedleAntifoulingStrategyInfo.PolluteProType       = this.gridView1.GetRowCellValue(selectedHandle, "污染项目类型").ToString();
                    reagentNeedleAntifoulingStrategyInfo.BePollutedProName    = this.gridView1.GetRowCellValue(selectedHandle, "被污染项目名称").ToString();
                    reagentNeedleAntifoulingStrategyInfo.BePollutedProType    = this.gridView1.GetRowCellValue(selectedHandle, "被污染项目类型").ToString();
                    reagentNeedleAntifoulingStrategyInfo.CleaningLiquidName   = this.gridView1.GetRowCellValue(selectedHandle, "清洗剂类型").ToString();
                    reagentNeedleAntifoulingStrategyInfo.CleaningLiquidUseVol = (float)Convert.ToDouble(this.gridView1.GetRowCellValue(selectedHandle, "清洗剂体积").ToString());
                    reagentNeedleAntifoulingStrategyInfo.CleanTimes           = Convert.ToInt32(this.gridView1.GetRowCellValue(selectedHandle, "清洗次数").ToString());

                    reagentNeedleDic.Clear();
                    reagentNeedleDic.Add("DeleteReagentNeedle", new object[] { XmlUtility.Serializer(typeof(ReagentNeedleAntifoulingStrategyInfo), reagentNeedleAntifoulingStrategyInfo) });
                    SendReagentNeedle(reagentNeedleDic);
                }
            }
        }
Beispiel #9
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     if (MessageBoxDraw.ShowMsg("确认要关闭系统吗?", MsgType.Question) == System.Windows.Forms.DialogResult.OK)
     {
         this.Close();
         this.Dispose();
         System.Environment.Exit(System.Environment.ExitCode);
     }
 }
Beispiel #10
0
 /// <summary>
 /// 确定保存按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     if (txtProShortName.Text.Trim() == "")
     {
         MessageBoxDraw.ShowMsg("项目名称为必填项,请填写项目名称!", MsgType.Warning);
         return;
     }
     else if (cboSampleType.SelectedIndex < 0)
     {
         MessageBoxDraw.ShowMsg("请选择项目样本类型!", MsgType.Warning);
         return;
     }
     else
     {
         AssayProjectInfo assayProInfo = new AssayProjectInfo();
         assayProInfo.ProjectName = txtProShortName.Text.Trim();
         assayProInfo.SampleType  = cboSampleType.SelectedItem.ToString();
         if (txtProLongName.Text.Trim() != null)
         {
             assayProInfo.ProFullName = txtProLongName.Text.Trim();
         }
         if (txtChannelNumber.Text.Trim() != null)
         {
             assayProInfo.ChannelNum = txtChannelNumber.Text.Trim();
         }
         if (this.Text == "新建项目")
         {
             if (!_LstAssayProjectInfo.Exists(x => x.ProjectName == assayProInfo.ProjectName && x.SampleType == assayProInfo.SampleType))
             {
                 if (DataHandleEvent != null)
                 {
                     cheProAddOrEditDic.Clear();
                     cheProAddOrEditDic.Add("AssayProjectAdd", new object[] { XmlUtility.Serializer(typeof(AssayProjectInfo), assayProInfo) });
                     DataHandleEvent(cheProAddOrEditDic);
                 }
             }
             else
             {
                 MessageBox.Show("该项目已存在,请重新输入!");
                 txtProShortName.Focus();
             }
         }
         if (this.Text == "编辑项目")
         {
             if (DataHandleEvent != null)
             {
                 cheProAddOrEditDic.Clear();
                 cheProAddOrEditDic.Add("AssayProjectEdit", new object[] { XmlUtility.Serializer(typeof(AssayProjectInfo), assayProInfoOld), XmlUtility.Serializer(typeof(AssayProjectInfo), assayProInfo) });
                 DataHandleEvent(cheProAddOrEditDic);
             }
         }
     }
 }
Beispiel #11
0
        /// <summary>
        /// 清除样本
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButClearSample_Click(object sender, EventArgs e)
        {
            if (getOPID != null && !getOPID())
            {
                MessageBoxDraw.ShowMsg("机器正在运行中,不能清除样本信息!", MsgType.OK);
            }
            else
            {
                try
                {
                    int[]           rows        = this.gridView1.GetSelectedRows();
                    List <TaskInfo> lstTaskInfo = new List <TaskInfo>();
                    TaskInfo        task;
                    for (int i = 0; i < rows.Length; i++)
                    {
                        string samplelNum = this.gridView1.GetRowCellValue(rows[i], "样本编号").ToString();
                        if (samplelNum != "" && samplelNum != null)
                        {
                            task           = new TaskInfo();
                            task.SampleNum = Convert.ToInt32(samplelNum);

                            task.CreateDate = Convert.ToDateTime(this.gridView1.GetRowCellValue(rows[i], "样本申请时间"));
                            lstTaskInfo.Add(task);
                        }
                    }
                    if (lstTaskInfo.Count > 0)
                    {
                        string result = new WorkAreaApplyTask().DeleteTaskAndSampleInfo("DeleteTaskAndSampleInfo", lstTaskInfo);
                        if (result.Substring(0, 1) == "1")
                        {
                            result = "选取样本信息清除成功!";
                            ComSampleNum_SelectedIndexChanged(null, null);
                        }
                        else if (result.Substring(0, 1) == "2")
                        {
                            result = result.Remove(0, 1) + ":样本信息清除成功!";
                            ComSampleNum_SelectedIndexChanged(null, null);
                        }
                        else
                        {
                            result = result.Remove(0, 1);
                        }
                        MessageBoxDraw.ShowMsg(result, MsgType.OK);
                    }
                }
                catch (FormatException fx)
                {
                    Console.WriteLine(fx.Message);
                }
            }
        }
Beispiel #12
0
 /// <summary>
 /// 申请科室(添加)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSPAdd_Click(object sender, EventArgs e)
 {
     if (TxtDepartmentName.Text.Trim() != "")
     {
         dePartManageDic.Clear();
         dePartManageDic.Add("AddDepartmentInfo", new object[] { TxtDepartmentName.Text });
         DepartmentManageSend(dePartManageDic);
         TxtDepartmentName.Text = string.Empty;
     }
     else
     {
         MessageBoxDraw.ShowMsg("请输入申请科室名称!", MsgType.OK);
     }
 }
Beispiel #13
0
 /// <summary>
 /// 申请科室(修改)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSPSave_Click(object sender, EventArgs e)
 {
     if (this.gridView1.GetSelectedRows().Count() > 0)
     {
         dePartManageDic.Clear();
         dePartManageDic.Add("UpDataDepartment", new object[] { TxtDepartmentName.Text, DataDepartment.ObjLastestParam });
         DepartmentManageSend(dePartManageDic);
         TxtDepartmentName.Text = string.Empty;
     }
     else
     {
         MessageBoxDraw.ShowMsg("没有可修改的科室,无法进行修改!", MsgType.OK);
     }
 }
Beispiel #14
0
 /// <summary>
 /// 关闭系统
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     if (MessageBoxDraw.ShowMsg("确认要关闭系统吗?", MsgType.Question) == System.Windows.Forms.DialogResult.OK)
     {
         ILogin login = new ILogin();
         login.SaveUserExitInfo("QueryUserAuthority", UserName);
         System.Diagnostics.Process[] ps = Process.GetProcessesByName("BioA.PLCController");
         foreach (System.Diagnostics.Process p in ps)
         {
             p.Kill();
         }
         this.Dispose();
         System.Environment.Exit(System.Environment.ExitCode);
     }
 }
Beispiel #15
0
 /// <summary>
 /// 审核医生(添加按钮)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void simpleButton12_Click(object sender, EventArgs e)
 {
     if (comboBoxEdit2.SelectedIndex >= 0)
     {
         dePartManageDic.Clear();
         dePartManageDic.Add("AddAuditPhysician", new object[] { comboBoxEdit2.Text });
         DepartmentManageSend(dePartManageDic);
         comboBoxEdit2.SelectedIndex = -1;
         comboBoxEdit2.Text          = "请选择";
     }
     else
     {
         MessageBoxDraw.ShowMsg("请选择待添加的审核医师!", MsgType.OK);
     }
 }
Beispiel #16
0
        /// <summary>
        /// 试剂1探测余量
        /// </summary>
        private void ResidueR1()
        {
            if (this.gridView1.SelectedRowsCount > 0)
            {
                if (SendNetworkCommandEvent != null)
                {
                    Command cmd = MachineInfo.GetCommandByName("RGTPanel1VolScan");

                    string pos = "";

                    for (int i = 0; i < this.gridView1.SelectedRowsCount; i++)
                    {
                        int    selectedHandle = this.gridView1.GetSelectedRows()[i];
                        string position       = this.gridView1.GetRowCellValue(selectedHandle, "试剂1位置").ToString().Trim();

                        if (position == "" || position == null)
                        {
                            continue;
                        }
                        else
                        {
                            pos += position + "|";
                        }
                    }

                    if (pos == "")
                    {
                        return;
                    }



                    cmd.Para  = "1:" + pos.TrimEnd('|');
                    cmd.State = 1;
                    var ResidueR1Thread = new Thread(() =>
                    {
                        //发送命令
                        SendNetworkCommandEvent(cmd);
                    });
                    ResidueR1Thread.IsBackground = true;
                    ResidueR1Thread.Start();
                }
            }
            else
            {
                MessageBoxDraw.ShowMsg("请选择待检测余量的项目!", MsgType.Warning);
            }
        }
Beispiel #17
0
 /// <summary>
 /// 删除审核医生(删除按钮)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void simpleButton9_Click(object sender, EventArgs e)
 {
     if (this.gridView4.GetSelectedRows().Count() > 0)
     {
         DialogResult yesorno = MessageBoxDraw.ShowMsg("是否确认删除", MsgType.YesNo);
         if (yesorno == DialogResult.No)
         {
             return;
         }
         int selectedHandle;
         selectedHandle = this.gridView4.GetSelectedRows()[0];
         string str = this.gridView4.GetRowCellValue(selectedHandle, "医生名称").ToString();
         dePartManageDic.Clear();
         dePartManageDic.Add("DeleteAuditPhysician", new object[] { str });
         DepartmentManageSend(dePartManageDic);
     }
 }
Beispiel #18
0
 /// <summary>
 /// 修改申请医生(保存按钮)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void simpleButton2_Click(object sender, EventArgs e)
 {
     if (this.gridView2.GetSelectedRows().Count() > 0)
     {
         ApplyDoctorInfo applyDoctorInfo = new ApplyDoctorInfo();
         applyDoctorInfo.Department = ComBoxDepartment.Text;
         applyDoctorInfo.Doctor     = TxtDoctorName.Text;
         dePartManageDic.Clear();
         dePartManageDic.Add("UpdataApplyDoctorInfo", new object[] { XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfo), XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfoOld) });
         DepartmentManageSend(dePartManageDic);
         TxtDoctorName.Text = "";
     }
     else
     {
         MessageBoxDraw.ShowMsg("没有可修改的申请医师,无法进行修改!", MsgType.OK);
     }
 }
Beispiel #19
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 && txtCombProjectName.Text.Trim() != null)
            {
                if (MessageBoxDraw.ShowMsg("是否确认删除组合项目?", MsgType.Question) == DialogResult.OK)
                {
                    CombProjectInfo combProInfo = new CombProjectInfo();

                    combProInfo.CombProjectName = this.gridView1.GetRowCellValue(this.gridView1.GetSelectedRows()[0], "项目名称").ToString();

                    List <CombProjectInfo> lstCombProInfos = new List <CombProjectInfo>();
                    lstCombProInfos.Add(combProInfo);
                    combProDic.Clear();
                    combProDic.Add("DeleteCombProjectName", new object[] { XmlUtility.Serializer(typeof(List <CombProjectInfo>), lstCombProInfos) });
                    AssayProInfoForComb(combProDic);
                }
            }
        }
Beispiel #20
0
 /// <summary>
 /// 试剂保存成功后,触发事件执行的方法
 /// </summary>
 /// <param name="keyValuePairs"></param>
 private void GeTheReagentAfterPreservationEvent(int disk, ReagentSettingsInfo rs)
 {
     if (disk == 1)
     {
         lstReagentSettingsInfo.Add(rs);
         dt1.Rows.Add(new object[] { rs.ReagentName, rs.ReagentType, rs.Pos, rs.ProjectName
                                     //, reagentSettingsInfo.ResidualQuantity, reagentSettingsInfo.Measuredquantity
                                     , rs.ValidDate.ToString("yyyy-MM-dd"), rs.ReagentContainer, rs.BatchNum });
     }
     else if (disk == 2)
     {
         lstReagentSettingsR2Info.Add(rs);
         dt2.Rows.Add(new object[] { rs.ReagentName, rs.ReagentType, rs.Pos, rs.ProjectName
                                     //, reagentSettingsInfo.ResidualQuantity, reagentSettingsInfo.Measuredquantity
                                     , rs.ValidDate.ToString("yyyy-MM-dd"), rs.ReagentContainer, rs.BatchNum });
     }
     MessageBoxDraw.ShowMsgBox("试剂R" + disk + "装载完成!", "试剂装载", MsgType.OK);
 }
Beispiel #21
0
 private void btnDetele_Click(object sender, EventArgs e)
 {
     //DeleteCalcProject
     if (this.gridView1.SelectedRowsCount > 0)
     {
         if (MessageBoxDraw.ShowMsg("是否确认删除该计算项目?", MsgType.Question) == DialogResult.OK)
         {
             CalcProjectInfo calcProInfo = new CalcProjectInfo();
             calcProInfo.CalcProjectName = this.gridView1.GetRowCellValue(this.gridView1.GetSelectedRows()[0], "项目名称").ToString();
             calcProInfo.SampleType      = this.gridView1.GetRowCellValue(this.gridView1.GetSelectedRows()[0], "样本类型").ToString();
             List <CalcProjectInfo> lstCalcProInfos = new List <CalcProjectInfo>();
             lstCalcProInfos.Add(calcProInfo);
             calcProDic.Clear();
             calcProDic.Add("DeleteCalcProject", new object[] { XmlUtility.Serializer(typeof(List <CalcProjectInfo>), lstCalcProInfos) });
             DataSend(calcProDic);
         }
     }
 }
Beispiel #22
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);
            }
        }
Beispiel #23
0
        /// <summary>
        /// 新增(结果单位)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            resultUnit = null;
            resultUnit = textEdit1.Text.Trim();


            if (dilutionRatio != "")
            {
                dataConfigDic.Clear();
                //添加数据结果单位
                dataConfigDic.Add("DataConfigAdd", new object[] { resultUnit });
                DataConfigLoad(dataConfigDic);
            }
            else
            {
                MessageBoxDraw.ShowMsg("请填写结果单位!", MsgType.Warning);
                return;
            }
            textEdit1.Text = "";
        }
Beispiel #24
0
        /// <summary>
        /// 修改按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (this.gridView1.GetSelectedRows().Count() > 0 && txtCombProjectName.Text != null)
            {
                CombProjectInfo combProInfo = new CombProjectInfo();
                if (txtCombProjectName.Text.Trim() == "")
                {
                    MessageBoxDraw.ShowMsg("请输入组合项目名称!", MsgType.Warning);
                    return;
                }
                combProInfo.CombProjectName = txtCombProjectName.Text.Trim();
                List <string> lstProInfos = new List <string>();  // 被选中项目集合
                if (combProjectPage1.GetSelectedProjects().Count > 0)
                {
                    lstProInfos.AddRange(combProjectPage1.GetSelectedProjects());
                }

                if (combprojectPage2.GetSelectedProjects().Count > 0)
                {
                    lstProInfos.AddRange(combprojectPage2.GetSelectedProjects());
                }

                if (combprojectPage3.GetSelectedProjects().Count > 0)
                {
                    lstProInfos.AddRange(combprojectPage3.GetSelectedProjects());
                }

                if (combprojectPage4.GetSelectedProjects().Count > 0)
                {
                    lstProInfos.AddRange(combprojectPage4.GetSelectedProjects());
                }

                combProInfo.ProjectNames     = lstProInfos;
                combProInfo.CombProjectCount = combProInfo.ProjectNames.Count;
                combProInfo.Remarks          = txtRemark.Text.Trim();
                string combProjectNameOld = this.gridView1.GetRowCellValue(this.gridView1.GetSelectedRows()[0], "项目名称").ToString();
                combProDic.Clear();
                combProDic.Add("UpdateCombProjectName", new object[] { combProjectNameOld, XmlUtility.Serializer(typeof(CombProjectInfo), combProInfo) });
                AssayProInfoForComb(combProDic);
            }
        }
Beispiel #25
0
        /// <summary>
        /// 删除项目对应的信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SbutDeleteProject_Click(object sender, EventArgs e)
        {
            MessageBoxButtons messButton = MessageBoxButtons.OKCancel;
            DialogResult      dr         = MessageBox.Show("确定要删除关联的项目吗?", "删除确认", messButton);

            if (dr != DialogResult.OK)
            {
                return;
            }
            QCRelationProjectInfo qcProjectInfo = new QCRelationProjectInfo();

            if (this.gridView1.GetSelectedRows().Count() > 0)
            {
                int selectedHandle;
                selectedHandle = this.gridView1.GetSelectedRows()[0];
                bool b = this.gridView1.GetRowCellValue(selectedHandle, "冻结").ToString() == "是" ? true : false;
                qcProjectInfo.QCID = Convert.ToInt32(this.gridView1.GetRowCellValue(selectedHandle, "质控品ID").ToString());
                if (b == false)
                {
                    MessageBoxDraw.ShowMsg("此质控品在激活情况下无法删除,请冻结后尝试删除!", MsgType.Warning);
                    return;
                }
                if (this.gridView2.GetSelectedRows().Count() > 0)
                {
                    int selectGridview2Handle;
                    selectGridview2Handle     = this.gridView2.GetSelectedRows()[0];
                    qcProjectInfo.ProjectName = this.gridView2.GetRowCellValue(selectGridview2Handle, "项目名称").ToString();
                }
                int count = new QCMaintian().DeleteQCProjectInfo("DeleteQCProjectInfo", qcProjectInfo);
                if (count > 0)
                {
                    lstQCRelationProjectInfo.RemoveAll(x => x.QCID == qcProjectInfo.QCID && x.ProjectName == qcProjectInfo.ProjectName);
                    lstvQCInfo_Click(null, null);
                    MessageBoxDraw.ShowMsg("删除成功!", MsgType.OK);
                }
                else
                {
                    MessageBoxDraw.ShowMsg("该项目已下任务,不能删除", MsgType.Warning);
                }
            }
        }
Beispiel #26
0
        /// <summary>
        /// 申请医生(添加按钮)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton4_Click(object sender, EventArgs e)
        {
            if (TxtDoctorName.Text.Trim() == "")
            {
                MessageBoxDraw.ShowMsg("请输入申请医师名称!", MsgType.OK);
                return;
            }
            if (ComBoxDepartment.SelectedIndex < 0)
            {
                MessageBoxDraw.ShowMsg("请选择申请科室!", MsgType.OK);
                return;
            }

            ApplyDoctorInfo applyDoctorInfo = new ApplyDoctorInfo();

            applyDoctorInfo.Department = ComBoxDepartment.Text;
            applyDoctorInfo.Doctor     = TxtDoctorName.Text;
            dePartManageDic.Clear();
            dePartManageDic.Add("AddApplyDoctorInfo", new object[] { XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfo) });
            DepartmentManageSend(dePartManageDic);
        }
Beispiel #27
0
        /// <summary>
        /// 审核医生(删除按钮)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (gridView2.GetSelectedRows().Count() > 0)
            {
                DialogResult yesorno = MessageBoxDraw.ShowMsg("是否确认删除", MsgType.YesNo);
                if (yesorno == DialogResult.No)
                {
                    return;
                }
                ApplyDoctorInfo applyDoctorInfo = new ApplyDoctorInfo();
                int             selectedHandle;

                selectedHandle             = this.gridView2.GetSelectedRows()[0];
                applyDoctorInfo.Doctor     = this.gridView2.GetRowCellValue(selectedHandle, "医生名称").ToString();
                applyDoctorInfo.Department = this.gridView2.GetRowCellValue(selectedHandle, "申请科室").ToString();

                dePartManageDic.Clear();
                dePartManageDic.Add("DeleteApplyDoctorInfo", new object[] { XmlUtility.Serializer(typeof(ApplyDoctorInfo), applyDoctorInfo) });
                DepartmentManageSend(dePartManageDic);
            }
        }
Beispiel #28
0
        /// <summary>
        /// 保存打印设置
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnSave_Click(object sender, EventArgs e)
        {
            string parperType = comboPaperType.SelectedItem.ToString();
            int    cheker     = 0;
            int    aduitor    = 0;

            if (chkChecker.Checked == true)
            {
                cheker = 1;
            }
            if (chkAuditor.Checked == true)
            {
                aduitor = 1;
            }
            int row = new BioA.SqlMaps.MyBatis().SavePritSetting(parperType, cheker, aduitor);

            if (row > 0)
            {
                MessageBoxDraw.Show("保存成功!");
            }
        }
Beispiel #29
0
        /// <summary>
        /// 保存按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (textEdit3.Text != textEdit4.Text)
            {
                MessageBoxDraw.ShowMsg("两次输入的密码不相同!", MsgType.Exception);
                return;
            }
            if (textEdit1.Text.Trim() == "")
            {
                MessageBoxDraw.ShowMsg("用户账户输入不能为空,请重新输入!", MsgType.Exception);
                return;
            }
            if (textEdit2.Text.Trim() == "")
            {
                MessageBoxDraw.ShowMsg("用户名称输入不能为空,请重新输入!", MsgType.Exception);
                return;
            }
            if (textEdit3.Text == "")
            {
                MessageBoxDraw.ShowMsg("密码输入不能为空,请重新输入!", MsgType.Exception);
                return;
            }

            if (this.Text == "用户创建")
            {
                if (DataHandleEvent != null)
                {
                    DataHandleEvent("用户创建", Add());
                }
            }
            else
            {
                if (DataHandleEvent != null)
                {
                    DataHandleEvent("用户编辑", Add());
                }
            }
            this.Close();
        }
Beispiel #30
0
 /// <summary>
 /// 申请科室(删除按钮)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSPDelete_Click(object sender, EventArgs e)
 {
     if (this.gridView1.GetSelectedRows().Count() > 0)
     {
         DialogResult yesorno = MessageBoxDraw.ShowMsg("是否确认删除", MsgType.YesNo);
         if (yesorno == DialogResult.No)
         {
             return;
         }
         int selectedHandle;
         selectedHandle = this.gridView1.GetSelectedRows()[0];
         string str1 = this.gridView1.GetRowCellValue(selectedHandle, "科室名称").ToString();
         if (str1 != null)
         {
             TxtDepartmentName.Text = str1;
             dePartManageDic.Clear();
             dePartManageDic.Add("DeleteDepartment", new object[] { str1 });
             DepartmentManageSend(dePartManageDic);
             TxtDepartmentName.Text = "";
         }
     }
 }