コード例 #1
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param Name="sender"></param>
 /// <param Name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     trvDictionary.SelectedNode = null;
     selectDirectionary         = null;
     isSave = true;
     Edit(isSave);
 }
コード例 #2
0
 /// <summary>
 /// 新增子节点
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void 新增子节点ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     trvDictionary.SelectedNode = null;
     selectDirectionary         = null;
     isSave = true;
     Edit(isSave);
 }
コード例 #3
0
        /// <summary>
        /// 表格刷新
        /// </summary>
        private void refurbish()
        {
            this.tbxName.Text        = "";
            this.tbxPinyin.Text      = "";
            this.tbxCode.Text        = "";
            this.tbxCheckReq.Text    = "";
            this.tbxDeductStand.Text = "";
            this.tbxDeductScore.Text = "";

            this.vetoProjects = "";

            this.tbxName.Enabled        = false;
            this.tbxPinyin.Enabled      = false;
            this.tbxCode.Enabled        = false;
            this.tbxCheckReq.Enabled    = false;
            this.tbxDeductStand.Enabled = false;
            this.tbxDeductScore.Enabled = false;

            this.panel3.Enabled = false;
            this.panel4.Enabled = false;
            this.panel2.Enabled = false;
            this.panel6.Enabled = false;

            btnAdd.Enabled    = true;
            btnModify.Enabled = true;
            btnSave.Enabled   = false;
            btnCancel.Enabled = false;

            groupBox1.Enabled = true;

            selectDirectionary         = null;
            trvDictionary.SelectedNode = null;

            isSave = false;
        }
コード例 #4
0
 private void iniEditData(Class_Mark temp)
 {
     /*
      * 树节点的绑定
      */
     DataSet ds = App.GetDataSet("select bb.text_id from T_MEDICAL_MARK_TEXT bb where bb.mark_id=" + temp.ID + "");
     //CheckCurrentNode(ds, advAllDoc.Nodes);
 }
コード例 #5
0
 /// <summary>
 /// 把数据显示到表格
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void trvDictionary_Click(object sender, EventArgs e)
 {
     if (trvDictionary.SelectedNode != null)
     {
         if (trvDictionary.SelectedNode.Tag.GetType().ToString().Contains("Class_Mark"))
         {
             selectDirectionary = (Class_Mark)trvDictionary.SelectedNode.Tag;
             iniEditData(selectDirectionary);
         }
     }
 }
コード例 #6
0
        private void ucC1FlexGrid1_Click(object sender, EventArgs e)
        {
            int index = ucGridviewX1.fg.CurrentRow.Index;

            if (ucGridviewX1.fg.RowCount > 0)
            {
                ManyItems(advAllDoc.Nodes);
                id = ucGridviewX1.fg["id", ucGridviewX1.fg.CurrentRow.Index].Value.ToString();
                selectDirectionary = GetSelectDirectionary(id);
                iniEditData(selectDirectionary);
            }
        }
コード例 #7
0
 private void trvDictionary_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (groupBox1.Enabled && !isSave)
     {
         if (trvDictionary.SelectedNode != null)
         {
             if (trvDictionary.SelectedNode.Tag.GetType().ToString().Contains("Class_Mark"))
             {
                 selectDirectionary = (Class_Mark)trvDictionary.SelectedNode.Tag;
                 iniEditData(selectDirectionary);
             }
         }
     }
 }
コード例 #8
0
        private void frmMedicalMarkDetial_Load(object sender, EventArgs e)
        {
            GetAllBookTree(advAllDoc);

            setAllChechBox(advAllDoc.Nodes);

            if (ID != "")
            {
                //修改操作
                selectDirectionary = GetSelectDirectionary(ID);
                iniEditData(selectDirectionary);

                isSave = false;
            }
            else
            {
                isSave = true;
            }
            Edit(isSave);
        }
コード例 #9
0
        /// <summary>
        /// 刷新
        /// </summary>
        private void RefleshFrm()
        {
            this.tbxName.Enabled        = false;
            this.tbxPinyin.Enabled      = false;
            this.tbxCode.Enabled        = false;
            this.tbxCheckReq.Enabled    = false;
            this.tbxDeductStand.Enabled = false;
            this.tbxDeductScore.Enabled = false;


            btnAdd.Enabled    = true;
            btnModify.Enabled = true;
            btnSave.Enabled   = false;
            btnCancel.Enabled = false;

            groupBox1.Enabled = true;

            selectDirectionary         = null;
            trvDictionary.SelectedNode = null;

            isSave = false;
        }
コード例 #10
0
ファイル: frmMarkInfo.cs プロジェクト: zh7262703/Emr_MySql
        /// <summary>
        /// 实例化查询结果
        /// </summary>
        /// <param Name="tempds"></param>
        /// <returns></returns>
        private Class_Mark[] GetSelectDirectionary(DataSet tempds)
        {
            if (tempds != null)
            {
                if (tempds.Tables[0].Rows.Count > 0)
                {
                    Class_Mark[] Directionary = new Class_Mark[tempds.Tables[0].Rows.Count];
                    for (int i = 0; i < tempds.Tables[0].Rows.Count; i++)
                    {
                        Directionary[i] = new Class_Mark();

                        Directionary[i].ID             = tempds.Tables[0].Rows[i]["ID"].ToString();
                        Directionary[i].Code           = tempds.Tables[0].Rows[i]["CODE"].ToString();
                        Directionary[i].TypeId         = tempds.Tables[0].Rows[i]["TYPE_ID"].ToString();
                        Directionary[i].Name           = tempds.Tables[0].Rows[i]["NAME"].ToString();
                        Directionary[i].CheckReq       = tempds.Tables[0].Rows[i]["CHECK_REQ"].ToString();
                        Directionary[i].DeductStand    = tempds.Tables[0].Rows[i]["DEDUCT_STAND"].ToString();
                        Directionary[i].DeductScore    = tempds.Tables[0].Rows[i]["DEDUCT_SCORE"].ToString();
                        Directionary[i].IsSingVeto     = tempds.Tables[0].Rows[i]["ISSINGVETO"].ToString();
                        Directionary[i].SingVetoLev    = tempds.Tables[0].Rows[i]["SINGVETO_LEV"].ToString();
                        Directionary[i].IsModifyManual = tempds.Tables[0].Rows[i]["ISMODIFY_MANUAL"].ToString();
                        Directionary[i].ValidState     = tempds.Tables[0].Rows[i]["VALID_STATE"].ToString();
                        Directionary[i].SpellCode      = tempds.Tables[0].Rows[i]["SPELL_CODE"].ToString();
                        Directionary[i].Type           = tempds.Tables[0].Rows[i]["TYPE"].ToString();
                        Directionary[i].VetoProjects   = tempds.Tables[0].Rows[i]["VETO_PROJECTS"].ToString();
                    }
                    return(Directionary);
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return(null);
            }
        }
コード例 #11
0
        /// <summary>
        /// 实例化查询结果
        /// </summary>
        /// <param Name="tempds"></param>
        /// <returns></returns>
        private Class_Mark GetSelectDirectionary(string markid)
        {
            string  Sql    = "select * from  T_MEDICAL_MARK where ID = '" + markid + "' order by ID desc";
            DataSet tempds = App.GetDataSet(Sql);

            if (tempds != null)
            {
                if (tempds.Tables[0].Rows.Count > 0)
                {
                    Class_Mark Directionary = new Class_Mark();
                    Directionary.ID             = tempds.Tables[0].Rows[0]["ID"].ToString();
                    Directionary.Code           = tempds.Tables[0].Rows[0]["CODE"].ToString();
                    Directionary.TypeId         = tempds.Tables[0].Rows[0]["TYPE_ID"].ToString();
                    Directionary.Name           = tempds.Tables[0].Rows[0]["NAME"].ToString();
                    Directionary.CheckReq       = tempds.Tables[0].Rows[0]["CHECK_REQ"].ToString();
                    Directionary.DeductStand    = tempds.Tables[0].Rows[0]["DEDUCT_STAND"].ToString();
                    Directionary.DeductScore    = tempds.Tables[0].Rows[0]["DEDUCT_SCORE"].ToString();
                    Directionary.IsSingVeto     = tempds.Tables[0].Rows[0]["ISSINGVETO"].ToString();
                    Directionary.SingVetoLev    = tempds.Tables[0].Rows[0]["SINGVETO_LEV"].ToString();
                    Directionary.IsModifyManual = tempds.Tables[0].Rows[0]["ISMODIFY_MANUAL"].ToString();
                    Directionary.ValidState     = tempds.Tables[0].Rows[0]["VALID_STATE"].ToString();
                    Directionary.SpellCode      = tempds.Tables[0].Rows[0]["SPELL_CODE"].ToString();
                    Directionary.Type           = tempds.Tables[0].Rows[0]["TYPE"].ToString();
                    Directionary.VetoProjects   = tempds.Tables[0].Rows[0]["VETO_PROJECTS"].ToString();
                    return(Directionary);
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return(null);
            }
        }
コード例 #12
0
        private void iniEditData(Class_Mark temp)
        {
            if (temp != null)
            {
                this.tbxCode.Text = temp.Code;
                //this.cmbType.SelectedValue = temp.TypeId;
                this.tbxName.Text        = temp.Name;
                this.tbxCheckReq.Text    = temp.CheckReq;
                this.tbxDeductStand.Text = temp.DeductStand;
                this.tbxDeductScore.Text = temp.DeductScore;
                this.tbxPinyin.Text      = temp.SpellCode;
                this.vetoProjects        = temp.VetoProjects;

                if (temp.IsSingVeto == "Y")
                {
                    this.rbnSingVetoYes.Checked = true;
                    this.rbnSingVetoNo.Checked  = false;

                    if (temp.SingVetoLev == "乙")
                    {
                        this.rbnB.Checked = true;
                        this.rbnC.Checked = false;
                    }
                    else
                    {
                        this.rbnB.Checked = false;
                        this.rbnC.Checked = true;
                    }
                }
                else
                {
                    this.rbnSingVetoYes.Checked = false;
                    this.rbnSingVetoNo.Checked  = true;
                }

                if (temp.IsModifyManual == "Y")
                {
                    this.rbnModifyY.Checked = true;
                    this.rbnModifyN.Checked = false;
                }
                else
                {
                    this.rbnModifyY.Checked = false;
                    this.rbnModifyN.Checked = true;
                }

                if (temp.ValidState == "Y")
                {
                    this.rbnYes.Checked = true;
                    this.rbnNo.Checked  = false;
                }
                else
                {
                    this.rbnYes.Checked = false;
                    this.rbnNo.Checked  = true;
                }

                if (temp.Type == "Y")
                {
                    this.rbnSubjective.Checked = true;
                    this.rbnObjective.Checked  = false;
                }
                else
                {
                    this.rbnSubjective.Checked = false;
                    this.rbnObjective.Checked  = true;
                }

                /*
                 * 树节点的绑定
                 */

                DataSet ds = App.GetDataSet("select bb.text_id from T_MEDICAL_MARK_TEXT bb where bb.mark_id=" + temp.ID + "");
                CheckCurrentNode(ds, advAllDoc.Nodes);
            }
        }
コード例 #13
0
        private void iniEditData(Class_Mark temp)
        {
            if (temp != null)
            {
                this.tbxCode.Text          = temp.Code;
                this.cmbType.SelectedValue = temp.TypeId;
                this.tbxName.Text          = temp.Name;
                this.tbxCheckReq.Text      = temp.CheckReq;
                this.tbxDeductStand.Text   = temp.DeductStand;
                this.tbxDeductScore.Text   = temp.DeductScore;
                this.tbxPinyin.Text        = temp.SpellCode;
                this.vetoProjects          = temp.VetoProjects;

                if (temp.IsSingVeto == "Y")
                {
                    this.rbnSingVetoYes.Checked = true;
                    this.rbnSingVetoNo.Checked  = false;

                    if (temp.SingVetoLev == "乙")
                    {
                        this.rbnB.Checked = true;
                        this.rbnC.Checked = false;
                    }
                    else
                    {
                        this.rbnB.Checked = false;
                        this.rbnC.Checked = true;
                    }
                }
                else
                {
                    this.rbnSingVetoYes.Checked = false;
                    this.rbnSingVetoNo.Checked  = true;
                }

                if (temp.IsModifyManual == "Y")
                {
                    this.rbnModifyY.Checked = true;
                    this.rbnModifyN.Checked = false;
                }
                else
                {
                    this.rbnModifyY.Checked = false;
                    this.rbnModifyN.Checked = true;
                }

                if (temp.ValidState == "Y")
                {
                    this.rbnYes.Checked = true;
                    this.rbnNo.Checked  = false;
                }
                else
                {
                    this.rbnYes.Checked = false;
                    this.rbnNo.Checked  = true;
                }

                if (temp.Type == "Y")
                {
                    this.rbnSubjective.Checked = true;
                    this.rbnObjective.Checked  = false;
                }
                else
                {
                    this.rbnSubjective.Checked = false;
                    this.rbnObjective.Checked  = true;
                }
            }
        }