Example #1
0
        /// <summary>
        /// 检索已建档的信息
        /// ywj
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSearcher_Click(object sender, EventArgs e)
        {
            Paneltsb_searchInfo frmsearcher = new Paneltsb_searchInfo(false);

            frmsearcher.ckb_check.Checked = false;
            frmsearcher.ShowDialog();
            if (frmsearcher.DialogResult == DialogResult.OK)
            {
                TB_CHILDBASE jibenobj = frmsearcher.returnval;
                if (jibenobj != null)
                {
                    bool isinclude = true;
                    for (int i = 0; i < dataGridView1.RowCount; i++)
                    {
                        if (dataGridView1.Rows[i].Cells[0].Value.ToString() == jibenobj.HEALTHCARDNO)
                        {
                            dataGridView1.Rows[i].Selected = true;
                            isinclude = false;
                            break;
                        }
                    }
                    if (isinclude)
                    {
                        //bindDataNowday(jibenobj.wm_mrn);//档案号查数据
                        string[] rowmrn = new string[] { jibenobj.HEALTHCARDNO, jibenobj.CHILDNAME, jibenobj.ID.ToString(), jibenobj.CHILDGENDER, jibenobj.CHILDBIRTHDAY };
                        dataGridView1.Rows.Add(rowmrn);
                        this.dataGridView1.Rows[this.dataGridView1.Rows.Count - 1].Selected = true;; //选中查询到的数据行
                    }
                    dataGridView1_CellEnter(sender, null);
                }
            }
        }
Example #2
0
 private void buttonX8_Click(object sender, EventArgs e)
 {
     using (Paneltsb_searchInfo frmsearcher = new Paneltsb_searchInfo())
     {
         frmsearcher.ShowDialog();
         if (frmsearcher.DialogResult == DialogResult.OK)
         {
             _jibenobj = frmsearcher.returnval;
         }
     }
 }
Example #3
0
        /// <summary>
        /// 绑定列表建档信息
        /// ywj
        /// 2016.8.29
        /// </summary>
        //public void bindDataNowday()
        //{
        //    dataGridView1.Rows.Clear();
        //    string checkday = DateTime.Now.ToString("yyyy-MM-dd");
        //    string isjiuzhen = CommonHelper.getcheckedValue(panel1);
        //    try
        //    {
        //        IList<TB_CHILDBASE> list = basebll.GetListByCheckDoc(checkday, isjiuzhen,cd_id);
        //        if(list!=null)
        //        {
        //            foreach (TB_CHILDBASE obj in list)
        //            {
        //                if (obj == null)
        //                    continue;
        //                DataGridViewRow row = new DataGridViewRow();
        //                row.CreateCells(dataGridView1, obj.healthcardno, obj.childname, obj.ID.ToString(), obj.childgender, obj.childbirthday);//
        //                dataGridView1.Rows.Add(row);
        //                if(obj.ID==this.cd_id)
        //                {
        //                    row.Selected = true;
        //                }
        //            }
        //        }

        //    }
        //    catch(Exception ex)
        //    {
        //        throw ex;
        //    }
        //    finally
        //    {
        //        Cursor.Current = Cursors.Default;
        //        if (dataGridView1.Rows.Count >= 1)
        //        {
        //            if(dataGridView1.SelectedRows.Count<=0)
        //            dataGridView1.Rows[0].Selected = true;
        //        }
        //    }
        //}

        /// <summary>
        /// 检索已建档的信息
        /// ywj
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSearcher_Click(object sender, EventArgs e)
        {
            Paneltsb_searchInfo frmsearcher = new Paneltsb_searchInfo();

            frmsearcher.ShowDialog();
            if (frmsearcher.DialogResult == DialogResult.OK)
            {
                TB_CHILDBASE jibenobj = frmsearcher.returnval;
                if (jibenobj != null)
                {
                    bool isinclude = true;
                    for (int i = 0; i < treeView1.Nodes[0].Nodes.Count; i++)
                    {
                        if ((treeView1.Nodes[0].Nodes[i].Tag as TB_CHILDBASE).HEALTHCARDNO == jibenobj.HEALTHCARDNO)
                        {
                            treeView1.Nodes[0].Nodes[i].Checked = true;
                            treeView1.SelectedNode = treeView1.Nodes[0].Nodes[i];
                            isinclude = false;
                            break;
                        }
                    }
                    for (int i = 0; i < treeView1.Nodes[1].Nodes.Count; i++)
                    {
                        if ((treeView1.Nodes[1].Nodes[i].Tag as TB_CHILDBASE).HEALTHCARDNO == jibenobj.HEALTHCARDNO)
                        {
                            treeView1.Nodes[1].Nodes[i].Checked = true;
                            treeView1.SelectedNode = treeView1.Nodes[1].Nodes[i];
                            isinclude = false;
                            break;
                        }
                    }
                    if (isinclude)
                    {
                        //bindDataNowday(jibenobj.wm_mrn);//档案号查数据
                        //string[] rowmrn = new string[] { jibenobj.healthcardno, jibenobj.childname, jibenobj.id.ToString(),jibenobj.childgender,jibenobj.childbirthday };
                        //dataGridView1.Rows.Add(rowmrn);
                        //this.dataGridView1.Rows[this.dataGridView1.Rows.Count - 1].Selected = true; ;//选中查询到的数据行
                        //treeview节点添加
                        TreeNode tn = new TreeNode();
                        tn.Text = jibenobj.CHILDNAME;
                        tn.Tag  = jibenobj;
                        treeView1.Nodes[1].Nodes.Add(tn);
                        tn.Checked             = true;
                        treeView1.SelectedNode = tn;
                    }
                    //dataGridView1_CellEnter(sender, null);
                    treeView1_MouseDown(sender, new MouseEventArgs(MouseButtons.Left, 1, treeView1.SelectedNode.Bounds.Location.X, treeView1.SelectedNode.Bounds.Location.Y, 1));
                }
            }
        }
Example #4
0
        private void buttonX8_Click(object sender, EventArgs e)
        {
            Paneltsb_searchInfo frmsearcher = new Paneltsb_searchInfo();

            frmsearcher.ShowDialog();
            if (frmsearcher.DialogResult == DialogResult.OK)
            {
                TB_CHILDBASE jibenobj = frmsearcher.returnval;
                if (jibenobj != null)
                {
                    YY_ASD_TAB obj = GetObj();
                    obj.CHILD_ID = jibenobj.ID;
                    if (bll.SaveOrUpdate(obj))
                    {
                        MessageBox.Show("保存成功!", "软件提示");
                        RefreshCheckList();
                    }
                    else
                    {
                        MessageBox.Show("保存失败!", "软件提示");
                    }
                }
            }
        }
Example #5
0
        private void buttonX8_Click(object sender, EventArgs e)
        {
            Paneltsb_searchInfo frmsearcher = new Paneltsb_searchInfo();

            frmsearcher.ShowDialog();
            if (frmsearcher.DialogResult == DialogResult.OK)
            {
                tb_childbase jibenobj = frmsearcher.returnval;
                if (jibenobj != null)
                {
                    yy_asd_tab obj = GetObj();
                    obj.child_id = jibenobj.id;
                    if (bll.SaveOrUpdate(obj))
                    {
                        MessageBox.Show("保存成功!", "软件提示");
                        RefreshCheckList();
                    }
                    else
                    {
                        MessageBox.Show("保存失败!", "软件提示");
                    }
                }
            }
        }