Ejemplo n.º 1
0
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex == -1)
            {
                return;
            }
            comboBox1.Refresh();
            DataTable docs = c.getDocClinicsAtDate(Dssn, comboBox2.SelectedItem.ToString());

            DocClinicShiftsGrid.DataSource = docs;
            DocClinicShiftsGrid.Refresh();
            if (docs == null)
            {
                comboBox1.SelectedIndex = 0;
            }
        }
Ejemplo n.º 2
0
#pragma warning disable IDE1006 // Naming Styles
        private void button1_Click(object sender, EventArgs e)
#pragma warning restore IDE1006 // Naming Styles
        {
            // needs to get the selected
            int r = c.removeDoctorClinic(Dssn, SelectedremoveClinic, SelectedRemoveClinicSHift, comboBox2.SelectedItem.ToString());    //remove room from the nurse

            // if done successfully refresh the GridViews and disable the buttons
            if (r > 0)
            {
                DocClinicShiftsGrid.DataSource = c.getDocClinicsAtDate(Dssn, comboBox2.SelectedItem.ToString());
                DocClinicCombo.DataSource      = c.getDocClinicsAtDate(Dssn, comboBox2.SelectedItem.ToString());
                DocClinicCombo.DisplayMember   = "CID";
                DocClinicCombo.ValueMember     = "CID";
                DocClinicCombo.Refresh();
                DocClinicShiftsGrid.Refresh();
                AssignButton.Enabled = false;
            }
            else
            {
                MessageBox.Show("Remove Failed");
            }
            button1.Enabled = false;
        }
Ejemplo n.º 3
0
#pragma warning disable IDE1006                                   // Naming Styles
        private void removeButton_Click(object sender, EventArgs e)
#pragma warning restore IDE1006                                   // Naming Styles
        {
            int r = c.removeDoctorRoom(Dssn, SelectedRemoveRoom); //remove room from the nurse

            // if done successfully refresh the GridViews and disable the buttons
            if (r > 0)
            {
                DocCurrRoomsGrid.DataSource          = c.getDoctorRooms(Dssn);
                DocAvailableRoomsCombo.DataSource    = c.DoctorAvailableRooms(Dssn);
                DocAvailableRoomsCombo.DisplayMember = "RID";
                DocAvailableRoomsCombo.ValueMember   = "RID";
                DocClinicCombo.Refresh();
                DocClinicShiftsGrid.Refresh();
                AssignButton.Enabled = false;
            }
            else
            {
                MessageBox.Show("Remove Failed");
                removeButton.Enabled = false;
            }
            MessageBox.Show("room removed");
            removeButton.Enabled = false;
        }