示例#1
0
 private void  除房间ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (tvRoom.SelectedNode == null || tvRoom.SelectedNode.Tag == null)
     {
         return;
     }
     HIS.Model.SS_ROOM room = (HIS.Model.SS_ROOM)tvRoom.SelectedNode.Tag;
     if (roomop.IsExistBed(room.ROOMID))
     {
         MessageBox.Show("该房间还有已占用台次,不能删除该房间 ");
         return;
     }
     if (MessageBox.Show("您确定要删除该房间及该房间的所有台次吗?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
     {
         return;
     }
     if (roomop.DelRoom(room.ROOMID))
     {
         tvRoom.Nodes.Remove(tvRoom.SelectedNode);
         BindBeds();
     }
 }