Esempio n. 1
0
        private void RemoveButton_Click(object sender, EventArgs e)
        {
            int r = controllerObj.RemoveNurseRoom(Nssn, SelectedRemoveRoom);

            if (r > 0)
            {
                AssignRoomGridView.DataSource = controllerObj.AvailableNurseRooms(Nssn);
                RemoveRoomGridView.DataSource = controllerObj.getNurseRooms(Nssn);
                AssignRoomGridView.Refresh();
                RemoveRoomGridView.Refresh();
                AssignButton.Enabled = false;
                RemoveButton.Enabled = false;
            }
            else
            {
                MessageBox.Show("Remove Failed");
            }
        }
Esempio n. 2
0
        private void RemoveButton_Click(object sender, EventArgs e)
        {
            int r = controllerObj.RemoveNurseRoom(Nssn, SelectedRemoveRoom);    //remove room from the nurse

            // if done successfully refresh the GridViews and disable the buttons
            if (r > 0)
            {
                AssignRoomGridView.DataSource = controllerObj.AvailableNurseRooms(Nssn);
                RemoveRoomGridView.DataSource = controllerObj.getNurseRooms(Nssn);
                AssignRoomGridView.Refresh();
                RemoveRoomGridView.Refresh();
                AssignButton.Enabled = false;
                RemoveButton.Enabled = false;
            }
            else
            {
                MessageBox.Show("Remove Failed");
            }
        }