Exemplo n.º 1
0
        //删除当前病例
        private void BtnCaseDel_Click(object sender, RoutedEventArgs e)
        {
            SectionRoomSo s = new SectionRoomSo();

            foreach (SectionRoomSo item in sw)
            {
                if (treeView1.SelectedItem.ToString() == item.SonSname)
                {
                    s.SonSname = item.SonSname;
                    foreach (TreeViewItem node in node_list)
                    {
                        foreach (SectionRoomSo it in sw)
                        {
                            if (it.Sname == item.Sname)
                            {
                                node.Items.Remove(it.SonSname);
                            }
                        }
                    }
                    sw.Remove(item);
                    txtSonName.Text = "";
                    new SectionRoomSonBLL().SonDelet(s);
                    SectionroomManage_Load(null, null);
                    return;
                }
            }
        }
Exemplo n.º 2
0
        public List <SectionRoomSo> SectionRoomSonCheck()
        {
            SqlDataReader reader = DBHelper.SectionRoomSelect("p_SectionRooomSon_select");

            while (reader.Read())
            {
                SectionRoomSo sr = new SectionRoomSo();
                sr.Sname    = reader[1] + "";
                sr.SonSname = reader[2] + "";
                sw.Add(sr);
            }

            DBHelper.cmd.Dispose();
            DBHelper.reader.Dispose();
            DBHelper.con.Close();
            return(sw);
        }
Exemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            SectionRoomSo s = new SectionRoomSo();

            foreach (SectionRoomSo item in sw)
            {
                if (treeView1.SelectedNode.Text == item.SonSname)
                {
                    s.SonSname = item.SonSname;
                    treeView1.Nodes.Remove(treeView1.SelectedNode);
                    sw.Remove(item);
                    txtSonName.Text = "";
                    new SectionRoomSonBLL().SonDelet(s);

                    return;
                }
            }
        }
Exemplo n.º 4
0
        //添加病例
        private void BtnCaseAdd_Click(object sender, RoutedEventArgs e)
        {
            SectionRoomSo w = new SectionRoomSo();

            w.Sname    = cboSectionRoom.Text;
            w.SonSname = txtSonName.Text;
            string str = new SectionRoomSonBLL().Son(w);

            if (str == "")
            {
                sw.Add(w);
            }
            else
            {
                MessageBox.Show(str);
            }
            SectionroomManage_Load(null, null);
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            treeView1.Nodes.Clear();
            SectionRoomSo w = new SectionRoomSo();

            w.Sname    = cboSectionRoom.Text;
            w.SonSname = txtSonName.Text;
            string str = new SectionRoomSonBLL().Son(w);

            if (str == "")
            {
                sw.Add(w);
            }
            else
            {
                MessageBox.Show(str);
            }
            SectionRoomSon_Load(null, null);
        }
Exemplo n.º 6
0
        public string SonDelteDal(SectionRoomSo s)
        {
            SqlParameter SonName = new SqlParameter("@SonName", SqlDbType.VarChar);
            SqlParameter result  = new SqlParameter("@result", SqlDbType.VarChar, 20);

            result.Direction = ParameterDirection.Output;
            SonName.Value    = s.SonSname;
            SqlParameter[] ps = { SonName, result };
            bool           f  = DBHelper.ExecuteNonQueryProc("p_SectionRooomSonDelete", ps);

            if (f)
            {
                return(result.Value + "");
            }
            else
            {
                return("出现异常");
            }
        }
Exemplo n.º 7
0
 public string SonDelet(SectionRoomSo s)
 {
     return(new SectionRoomSonDAL().SonDelteDal(s));
 }
Exemplo n.º 8
0
 public string Son(SectionRoomSo s)
 {
     return(new SectionRoomSonDAL().SonInsert(s));
 }