Пример #1
0
 public void InvDrAppointments()
 {
     Doctor.DrAppointments newDrAppointments = new Doctor.DrAppointments();
     newDrAppointments.MdiParent       = Application.OpenForms["DoctorDash"];
     newDrAppointments.FormBorderStyle = FormBorderStyle.None;
     newDrAppointments.ControlBox      = false;
     newDrAppointments.MaximizeBox     = false;
     newDrAppointments.MinimizeBox     = false;
     newDrAppointments.Dock            = DockStyle.Fill;
     newDrAppointments.Show();
 }
Пример #2
0
        public DataTable Get()
        {
            Doctor.DrAppointments frm = new Doctor.DrAppointments();
            conn = new SqlConnection(connstr);
            cmd  = new SqlCommand("SELECT * FROM Appointment WHERE Date= '" + Globals.TempDate + "' AND Dentist='" + Globals.CurrentUser + "'", conn);
            DataTable dt = new DataTable();

            conn.Open();
            rdr = cmd.ExecuteReader();
            if (rdr.HasRows)
            {
                dt.Load(rdr);
                conn.Close();
                return(dt);
            }
            else
            {
                MessageBox.Show("No Data Appointments to Show");
                dt = null;
                conn.Close();
                return(dt);
            }
        }