Compare commits
2 Commits
92d9928cd2
...
86565351c1
Author | SHA1 | Date | |
---|---|---|---|
86565351c1 | |||
1a6a642626 |
@ -10,7 +10,7 @@ namespace MedicalDatabaseContracts.Models
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
public string GetFIO()
|
||||
{
|
||||
return string.Join(" ", Surname, Name, Patronymic ?? string.Empty);
|
||||
return Surname + " " + Name + " " + Patronymic ?? string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ namespace MedicalDatabaseContracts.ViewModels
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
public string GetFIO()
|
||||
{
|
||||
return Name + " " + Surname + " " + Patronymic ?? string.Empty;
|
||||
return Surname + " " + Name + " " + Patronymic ?? string.Empty;
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
|
@ -124,6 +124,7 @@
|
||||
// comboBoxSpecialization
|
||||
//
|
||||
comboBoxSpecialization.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
comboBoxSpecialization.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxSpecialization.FormattingEnabled = true;
|
||||
comboBoxSpecialization.Location = new Point(145, 169);
|
||||
comboBoxSpecialization.Name = "comboBoxSpecialization";
|
||||
|
@ -79,6 +79,9 @@ namespace MedicalView.Doctors
|
||||
|
||||
private void FormDoctor_Load(object sender, EventArgs e)
|
||||
{
|
||||
var specs = _specializationLogic.ReadList();
|
||||
comboBoxSpecialization.DataSource = specs;
|
||||
|
||||
if (ModelId.HasValue)
|
||||
{
|
||||
try
|
||||
@ -91,9 +94,6 @@ namespace MedicalView.Doctors
|
||||
textBoxSurname.Text = view.Surname;
|
||||
textBoxPatronymic.Text = view.Patronymic;
|
||||
textBoxPhoneNumber.Text = view.PhoneNumber;
|
||||
|
||||
var specs = _specializationLogic.ReadList();
|
||||
comboBoxSpecialization.DataSource = specs;
|
||||
comboBoxSpecialization.SelectedIndex = specs.FindIndex(x => x.Id == view.SpecializationId);
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,10 @@ namespace MedicalView.Visits
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormVisit));
|
||||
if (service is FormVisit form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
6
Medical/MedicalView/Visits/FormVisit.Designer.cs
generated
6
Medical/MedicalView/Visits/FormVisit.Designer.cs
generated
@ -127,6 +127,8 @@
|
||||
// comboBoxPatient
|
||||
//
|
||||
comboBoxPatient.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
comboBoxPatient.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||
comboBoxPatient.AutoCompleteSource = AutoCompleteSource.ListItems;
|
||||
comboBoxPatient.FormattingEnabled = true;
|
||||
comboBoxPatient.Location = new Point(87, 77);
|
||||
comboBoxPatient.Name = "comboBoxPatient";
|
||||
@ -136,6 +138,8 @@
|
||||
// comboBoxDoctor
|
||||
//
|
||||
comboBoxDoctor.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
comboBoxDoctor.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||
comboBoxDoctor.AutoCompleteSource = AutoCompleteSource.ListItems;
|
||||
comboBoxDoctor.FormattingEnabled = true;
|
||||
comboBoxDoctor.Location = new Point(87, 112);
|
||||
comboBoxDoctor.Name = "comboBoxDoctor";
|
||||
@ -145,6 +149,8 @@
|
||||
// comboBoxDiagnose
|
||||
//
|
||||
comboBoxDiagnose.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
comboBoxDiagnose.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||
comboBoxDiagnose.AutoCompleteSource = AutoCompleteSource.ListItems;
|
||||
comboBoxDiagnose.FormattingEnabled = true;
|
||||
comboBoxDiagnose.Location = new Point(87, 150);
|
||||
comboBoxDiagnose.Name = "comboBoxDiagnose";
|
||||
|
@ -77,6 +77,19 @@ namespace MedicalView.Visits
|
||||
|
||||
private void FormVisit_Load(object sender, EventArgs e)
|
||||
{
|
||||
var patients = _patientLogic.ReadList();
|
||||
var doctors = _doctorLogic.ReadList();
|
||||
var diagnoses = _diagnoseLogic.ReadList();
|
||||
|
||||
comboBoxPatient.DataSource = patients;
|
||||
comboBoxPatient.SelectedIndex = -1;
|
||||
|
||||
comboBoxDoctor.DataSource = doctors;
|
||||
comboBoxDoctor.SelectedIndex = -1;
|
||||
|
||||
comboBoxDiagnose.DataSource = diagnoses;
|
||||
comboBoxDiagnose.SelectedIndex = diagnoses.FindIndex(x => x.Name == "Первичный прием");
|
||||
|
||||
if (ModelId.HasValue)
|
||||
{
|
||||
try
|
||||
@ -87,13 +100,7 @@ namespace MedicalView.Visits
|
||||
{
|
||||
textBoxComment.Text = view.Comment;
|
||||
datePicker.Value = view.Date.ToDateTime(view.Time);
|
||||
timePicker.Value = view.Date.ToDateTime(view.Time);
|
||||
var patients = _patientLogic.ReadList();
|
||||
var doctors = _doctorLogic.ReadList();
|
||||
var diagnoses = _diagnoseLogic.ReadList();
|
||||
comboBoxPatient.DataSource = patients;
|
||||
comboBoxDoctor.DataSource = doctors;
|
||||
comboBoxDiagnose.DataSource = diagnoses;
|
||||
timePicker.Value = view.Date.ToDateTime(view.Time);
|
||||
if (view.DiagnoseId != null)
|
||||
{
|
||||
comboBoxDiagnose.SelectedIndex = diagnoses.FindIndex(x => x.Id == view.DiagnoseId);
|
||||
|
Loading…
Reference in New Issue
Block a user