示例#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;
        }