Пример #1
0
        private void DocClinicCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DocClinicCombo.DisplayMember = "CID";
            DocClinicCombo.ValueMember   = "CID";
            DocClinicCombo.Refresh();
            DataTable shifts = c.DoctorAvailableClinicShifts(Convert.ToInt32(DocClinicCombo.SelectedValue.ToString()));

            if (shifts != null)
            {
                DocAvailableClinicShiftsCombo.DataSource    = shifts;
                DocAvailableClinicShiftsCombo.DisplayMember = "StartTime";
                DocAvailableClinicShiftsCombo.ValueMember   = "StartTime";
                DocAvailableClinicShiftsCombo.Refresh();
            }
        }
Пример #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;
        }
Пример #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;
        }