Пример #1
0
        public listPatient loadListPatient(string numberP)
        {
            listPatient patients = new listPatient();

            if (numberP != "")
            {
                command.CommandText = "Select * from [patient] where [NumberP] = '" + numberP + "'";
            }
            else
            {
                command.CommandText = "Select * from [patient]";
            }

            using (OleDbDataReader reader = command.ExecuteReader())
            {
                while (reader.Read())
                {
                    patientData pat = new patientData();
                    pat.Id         = reader.GetValue(0).ToString().Trim();
                    pat.Surname    = reader.GetValue(2).ToString().Trim();
                    pat.Name       = reader.GetValue(3).ToString().Trim();
                    pat.MiddleName = reader.GetValue(4).ToString().Trim();
                    patients.Add(pat);
                }
            }
            return(patients);
        }
Пример #2
0
        public patientData loadPatientByID(string idPatient, string idUser)
        {
            patientData pat = new patientData();

            try
            {
                command.CommandText = "Select * from [patient]";

                if (idPatient != "")
                {
                    command.CommandText += " where [Код] = " + idPatient + ";";
                }
                else
                {
                    command.CommandText += " where [idUser] = " + idUser;
                }
                using (OleDbDataReader reader = command.ExecuteReader())
                {
                    reader.Read();
                    pat.Id             = reader.GetValue(0).ToString().Trim();
                    pat.Surname        = reader.GetValue(2).ToString().Trim();
                    pat.Name           = reader.GetValue(3).ToString().Trim();
                    pat.MiddleName     = reader.GetValue(4).ToString().Trim();
                    pat.Sex            = reader.GetValue(6).ToString().Trim() == "0" ? "Муж" : "Жен";
                    pat.BirthDay       = reader.GetValue(5).ToString().Trim();
                    pat.NumberOfPolicy = reader.GetValue(7).ToString().Trim();
                }
            }
            catch { }
            return(pat);
        }
Пример #3
0
 public visitData()
 {
     recomendation = new recommendation();
     obsl          = new obslData();
     diagnose      = new diagnoseData();
     symptom       = new symptoms();
     doc           = new doctorData();
     pat           = new patientData();
     doctorInfo    = doc.Surname + " " + doc.Name + " " + doc.MiddleName;
 }
Пример #4
0
        public patient(string _idUser, dataBase _connector)
        {
            InitializeComponent();
            connector = _connector;
            patientData patient = connector.loadPatientByID("", _idUser);

            textBox1.Text = patient.ToString();
            textBox2.Text = patient.Sex;
            textBox3.Text = patient.NumberOfPolicy;
        }
Пример #5
0
        public contraindications(string _idPatient, int type, dataBase _d, contraindicationsData _dat)
        {
            InitializeComponent();
            idPatient    = new patientData();
            idPatient.Id = _idPatient;
            d            = _d;
            data         = _dat;

            cont = new ContraindicationsControl(data, d, _idPatient);
            if (type == 2)
            {
                textBox1.ReadOnly = true;
                textBox2.ReadOnly = true;
                button1.Visible   = false;
                button2.Visible   = false;
            }
        }
Пример #6
0
 public patientControl()
 {
     data      = new patientData();
     connector = new dataBase();
     pats      = new listPatient();
 }
Пример #7
0
 public void Add(patientData pat)
 {
     patients.Add(pat);
 }
 public contraindicationsData()
 {
     pat = new patientData();
 }
Пример #9
0
 public orderData()
 {
     Patient = new patientData();
     Doctor  = new doctorData();
 }
Пример #10
0
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            patientData pat = connector.loadPatientByID(idPatients[comboBox2.SelectedIndex], "");

            textBox2.Text = pat.NumberOfPolicy;
        }