Esempio n. 1
0
        /// <summary>
        /// 选择主要诊断
        /// </summary>
        void SelectICD()
        {
            if (this.lsvItemICD.Items.Count == 0 || this.lsvItemICD.SelectedItems.Count == 0)
            {
                return;
            }
            DataRow dr = this.lsvItemICD.SelectedItems[0].Tag as DataRow;

            this.txtMainDiag.Text = dr["icdname"].ToString();
            this.txtMainDiag.Tag  = dr;
            this.txtMainDiag.Focus();

            if (PathDataSource != null && PathDataSource.Rows.Count > 0)
            {
                DataRow[] drr = PathDataSource.Select("icdcode = '" + dr["icdcode"].ToString() + "'");
                if (drr != null && drr.Length > 0)
                {
                    this.txtPathName.Text = drr[0]["cpname"].ToString();
                    this.txtPathName.Tag  = drr[0];
                    this.txtPathName.Focus();
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// LoadVarInfo
        /// </summary>
        /// <param name="varId"></param>
        void LoadVarInfo(decimal varId)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                DataTable          dtMain = null;
                DataTable          dtDet  = null;
                clsBIHOrderService svc    = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
                svc.GetCpExecVarInfo(varId, out dtMain, out dtDet);
                if (dtMain != null && dtMain.Rows.Count > 0)
                {
                    DataRow dr = dtMain.Rows[0];
                    this.dtpVar.Text = Convert.ToDateTime(dr["vardate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");;
                    if (dr["vartype"].ToString() == "1")
                    {
                        this.chkEva1.Checked = true;
                    }
                    else if (dr["vartype"].ToString() == "2")
                    {
                        this.chkEva2.Checked = true;
                    }
                    else if (dr["vartype"].ToString() == "3")
                    {
                        this.chkEva3.Checked = true;
                    }
                    if (Convert.ToDecimal(dr["newcpid"].ToString()) > 0)
                    {
                        decimal   cpid = Convert.ToDecimal(dr["newcpid"].ToString());
                        DataRow[] drr  = PathDataSource.Select("cpid = " + cpid.ToString());
                        if (drr != null && drr.Length > 0)
                        {
                            this.txtPathName.Text = drr[0]["cpname"].ToString();
                            this.txtPathName.Tag  = drr[0];
                        }
                    }
                    this.txtResult.Text = dr["varcontent"].ToString();
                }

                for (int i = 0; i < this.clstTarget.Items.Count; i++)
                {
                    if (dtDet != null && dtDet.Rows.Count > 0)
                    {
                        DataRow[] drr1 = dtDet.Select("varcontent = '" + this.clstTarget.Items[i].ToString() + "'");
                        if (drr1 != null && drr1.Length > 0)
                        {
                            this.clstTarget.SetItemChecked(i, true);
                        }
                        else
                        {
                            this.clstTarget.SetItemChecked(i, false);
                        }
                    }
                    else
                    {
                        this.clstTarget.SetItemChecked(i, false);
                    }
                }
                this.btnOK.Tag = varId.ToString();
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }