Example #1
0
        public listDoctor loadListDoctor(string idDoctor)
        {
            listDoctor doctors = new listDoctor();

            if (idDoctor != "")
            {
                command.CommandText = "Select * from [doctor] where [Код] = " + idDoctor;
            }
            else
            {
                command.CommandText = "Select * from [doctor]";
            }

            using (OleDbDataReader reader = command.ExecuteReader())
            {
                while (reader.Read())
                {
                    doctorData doct = new doctorData();
                    doct.Id         = reader.GetValue(0).ToString().Trim();
                    doct.Surname    = reader.GetValue(2).ToString().Trim();
                    doct.Name       = reader.GetValue(3).ToString().Trim();
                    doct.MiddleName = reader.GetValue(4).ToString().Trim();
                    doctors.Add(doct);
                }
            }
            return(doctors);
        }
Example #2
0
 public doctor(string _idUser)
 {
     InitializeComponent();
     idUser  = _idUser;
     connect = new dataBase();
     docs    = new doctorData();
     doc     = new doctorControl(connect, docs);
 }
Example #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;
 }
Example #4
0
        public doctorData loadDoctorDataByID(string idDoctor)
        {
            doctorData doct = new doctorData();

            try
            {
                command.CommandText = "Select [Post] from [doctor] where [Код] = " + idDoctor;
                using (OleDbDataReader reader = command.ExecuteReader())
                {
                    reader.Read();
                    doct.Position = reader.GetValue(0).ToString().Trim();
                }
            }
            catch { }
            return(doct);
        }
Example #5
0
        bool regNewUser()
        {
            user       newUser = new user();
            doctorData doc     = new doctorData();

            newUser.Sex        = checkBox4.Checked == true ? "0" : "1";
            newUser.Type       = checkBox1.Checked == true ? "1" : "2";
            newUser.Surname    = textBox1.Text;
            newUser.Name       = textBox2.Text;
            newUser.MiddleName = textBox3.Text;
            newUser.BirthDay   = dateTimePicker1.Value.ToShortDateString();
            doc.Position       = textBox7.Text;
            newUser.NumberP    = textBox6.Text;
            newUser.Login      = textBox5.Text;
            newUser.Password   = textBox4.Text;
            return(connector.regNewUser(newUser));
        }
Example #6
0
 public void Add(doctorData pat)
 {
     doctors.Add(pat);
 }
Example #7
0
 public doctorControl(dataBase _connector, doctorData _data)
 {
     data      = _data;
     connector = _connector;
 }
Example #8
0
 public orderData()
 {
     Patient = new patientData();
     Doctor  = new doctorData();
 }
Example #9
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            doctorData doct = connector.loadDoctorDataByID(idDoctors[comboBox1.SelectedIndex]);

            textBox4.Text = doct.Position;
        }