public DoctorForm(DBCommunication.DBCommunicationAdmin _db) { InitializeComponent(); _DB = _db; _doctor = _DB.GetDoctor(); DoctorGridControl.DataSource = _doctor; _working_time = _DB.GetWorkingTime(); WorkingTimeLE.Properties.DataSource = _working_time; WorkingTimeLE.Properties.DisplayMember = "Odd_Even"; WorkingTimeLE.Properties.ValueMember = "ID"; }
public PatientForm(DBCommunication.DBCommunicationAdmin _db) { InitializeComponent(); _DB = _db; _patient = _DB.GetPatient(); PatientGridControl.DataSource = _patient; _doctor = _DB.GetDoctor(); DoctorLE.Properties.DataSource = _doctor; DoctorLE.Properties.DisplayMember = "Surname"; DoctorLE.Properties.ValueMember = "ID"; }
private void NewDoctorBarItem_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(NameTE.Text) && !string.IsNullOrWhiteSpace(SurnameTE.Text) && !string.IsNullOrWhiteSpace(EmailTE.Text) && !string.IsNullOrWhiteSpace(ContactTE.Text) && WorkingTimeLE.EditValue != null) { doctor = new Doctor(); doctor.Name = NameTE.Text; doctor.Surname = SurnameTE.Text; doctor.Email = EmailTE.Text; doctor.Contact = ContactTE.Text; doctor.Working_time = int.Parse(WorkingTimeLE.EditValue.ToString()); if (!_DB.InsertDoctor(doctor)) { XtraMessageBox.Show("Element is not added!"); } _doctor = _DB.GetDoctor(); DoctorGridControl.DataSource = _doctor; ClearData(); } else { XtraMessageBox.Show("All fields should be filled!"); } }
public PrescriptionFormD(DBCommunication.DBCommunicationAdmin _db, int doctorID, int patientID) { InitializeComponent(); _DB = _db; _prescription = _DB.GetPrescriptionForPatient(patientID); PresciptionGridControl.DataSource = _prescription; _doctor = _DB.GetDoctor(); _patient = _DB.GetPatient(); patient = patientID; doctor = doctorID; }
public ReferralFormcs(DBCommunication.DBCommunicationAdmin _db) { InitializeComponent(); _DB = _db; _referral = _DB.GetReferral(); ReferralGridControl.DataSource = _referral; _doctor = _DB.GetDoctor(); DoctorLE.Properties.DataSource = _doctor; _patient = _DB.GetPatient(); PatientLE.Properties.DataSource = _patient; DoctorLE.Properties.DisplayMember = "Surname"; DoctorLE.Properties.ValueMember = "ID"; PatientLE.Properties.DisplayMember = "Surname"; PatientLE.Properties.ValueMember = "ID"; }
public PrescriptionForm(DBCommunication.DBCommunicationAdmin _db) { InitializeComponent(); _DB = _db; _prescription = _DB.GetPrescription(); PresciptionGridControl.DataSource = _prescription; _doctor = _DB.GetDoctor(); DoctorLE.Properties.DataSource = _doctor; _patient = _DB.GetPatient(); PatientLE.Properties.DataSource = _patient; DoctorLE.Properties.DisplayMember = "Surname"; DoctorLE.Properties.ValueMember = "ID"; PatientLE.Properties.DisplayMember = "Surname"; PatientLE.Properties.ValueMember = "ID"; DateTE.DateTime = DateTime.Now; }
public AgreedTermForm(DBCommunication.DBCommunicationAdmin _db) { InitializeComponent(); HideShowElement(false); _termAM = new List <Term>(); _termAM.Add(new Term { Time = "08:00:00" }); _termAM.Add(new Term { Time = "08:15:00" }); _termAM.Add(new Term { Time = "08:30:00" }); _termAM.Add(new Term { Time = "08:45:00" }); _termAM.Add(new Term { Time = "09:00:00" }); _termAM.Add(new Term { Time = "09:15:00" }); _termAM.Add(new Term { Time = "09:30:00" }); _termAM.Add(new Term { Time = "09:45:00" }); _termAM.Add(new Term { Time = "10:00:00" }); _termAM.Add(new Term { Time = "10:15:00" }); _termAM.Add(new Term { Time = "10:30:00" }); _termAM.Add(new Term { Time = "10:45:00" }); _termAM.Add(new Term { Time = "11:00:00" }); _termAM.Add(new Term { Time = "11:15:00" }); _termAM.Add(new Term { Time = "11:30:00" }); _termAM.Add(new Term { Time = "11:45:00" }); _termAM.Add(new Term { Time = "12:00:00" }); _termAM.Add(new Term { Time = "12:15:00" }); _termAM.Add(new Term { Time = "12:30:00" }); _termAM.Add(new Term { Time = "12:45:00" }); _termAM.Add(new Term { Time = "13:00:00" }); _termAM.Add(new Term { Time = "13:15:00" }); _termAM.Add(new Term { Time = "13:30:00" }); _termAM.Add(new Term { Time = "13:45:00" }); _termPM = new List <Term>(); _termPM.Add(new Term { Time = "14:00:00" }); _termPM.Add(new Term { Time = "14:15:00" }); _termPM.Add(new Term { Time = "14:30:00" }); _termPM.Add(new Term { Time = "14:45:00" }); _termPM.Add(new Term { Time = "15:00:00" }); _termPM.Add(new Term { Time = "15:15:00" }); _termPM.Add(new Term { Time = "15:30:00" }); _termPM.Add(new Term { Time = "15:45:00" }); _termPM.Add(new Term { Time = "16:00:00" }); _termPM.Add(new Term { Time = "16:15:00" }); _termPM.Add(new Term { Time = "16:30:00" }); _termPM.Add(new Term { Time = "16:45:00" }); _termPM.Add(new Term { Time = "17:00:00" }); _termPM.Add(new Term { Time = "17:15:00" }); _termPM.Add(new Term { Time = "17:30:00" }); _termPM.Add(new Term { Time = "17:45:00" }); _termPM.Add(new Term { Time = "18:00:00" }); _termPM.Add(new Term { Time = "18:15:00" }); _termPM.Add(new Term { Time = "18:30:00" }); _termPM.Add(new Term { Time = "18:45:00" }); _termPM.Add(new Term { Time = "19:00:00" }); _termPM.Add(new Term { Time = "19:15:00" }); _termPM.Add(new Term { Time = "19:30:00" }); _termPM.Add(new Term { Time = "19:45:00" }); agreedTerm = new AgreedTerm(); _DB = _db; _agreedTerm = _DB.GetAgreedTerm(); AgreedTermGridControl.DataSource = _agreedTerm; _patient = _DB.GetPatient(); PatientLE.Properties.DataSource = _patient; PatientLE.Properties.DisplayMember = "Name"; PatientLE.Properties.ValueMember = "ID"; _doctor = _DB.GetDoctor(); DoctorLE.Properties.DataSource = _doctor; DoctorLE.Properties.DisplayMember = "Name"; DoctorLE.Properties.ValueMember = "ID"; }