Exemplo n.º 1
0
        public void PatientHistory(MySqlConnection conn, Patient patient)
        {
            MySqlDataReader Reader = DB.getRequests(conn, "patient_username", patient.getUsername(), true);
            int             i      = 1;

            while (Reader.Read())
            {
                Console.Write(i + " " + Reader["doctor_username"] + " " + "\n");
                i++;
            }
        }
Exemplo n.º 2
0
        public void MyRequest(MySqlConnection conn, Patient patient)
        {
            MySqlDataReader Reader   = DB.getRequests(conn, "patient_username", patient.getUsername(), true);
            List <int>      requests = new List <int>();

            while (Reader.Read())
            {
                requests.Add((int)Reader["id"]);
                Console.Write(Reader["doctor_username"] + " " + Convert.ToDateTime(Reader["date"]).ToString("yyyy-MM-dd H:mm") + "\n");
            }
            Reader.Close();

            Console.WriteLine();
            conn.Close();
        }
Exemplo n.º 3
0
        public void RequestForConsultation(MySqlConnection conn, Patient patient)
        {
            MySqlDataReader Reader = DB.getUsers(conn, "doctor");

            List <string> doctors = new List <string>();

            int i = 1;

            while (Reader.Read())
            {
                doctors.Add((string)Reader["username"]);
                Console.Write(i + " " + Reader["username"] + "\n");
                i++;
            }
            Reader.Close();

            int line = Convert.ToInt16(Console.ReadLine());

            TypeDate(conn, doctors[line - 1], patient.getUsername());
        }