Поправил отображение комбобоксов
This commit is contained in:
parent
1a6a642626
commit
86565351c1
@ -124,6 +124,7 @@
|
|||||||
// comboBoxSpecialization
|
// comboBoxSpecialization
|
||||||
//
|
//
|
||||||
comboBoxSpecialization.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
comboBoxSpecialization.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
comboBoxSpecialization.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
comboBoxSpecialization.FormattingEnabled = true;
|
comboBoxSpecialization.FormattingEnabled = true;
|
||||||
comboBoxSpecialization.Location = new Point(145, 169);
|
comboBoxSpecialization.Location = new Point(145, 169);
|
||||||
comboBoxSpecialization.Name = "comboBoxSpecialization";
|
comboBoxSpecialization.Name = "comboBoxSpecialization";
|
||||||
|
@ -79,6 +79,9 @@ namespace MedicalView.Doctors
|
|||||||
|
|
||||||
private void FormDoctor_Load(object sender, EventArgs e)
|
private void FormDoctor_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
var specs = _specializationLogic.ReadList();
|
||||||
|
comboBoxSpecialization.DataSource = specs;
|
||||||
|
|
||||||
if (ModelId.HasValue)
|
if (ModelId.HasValue)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -91,9 +94,6 @@ namespace MedicalView.Doctors
|
|||||||
textBoxSurname.Text = view.Surname;
|
textBoxSurname.Text = view.Surname;
|
||||||
textBoxPatronymic.Text = view.Patronymic;
|
textBoxPatronymic.Text = view.Patronymic;
|
||||||
textBoxPhoneNumber.Text = view.PhoneNumber;
|
textBoxPhoneNumber.Text = view.PhoneNumber;
|
||||||
|
|
||||||
var specs = _specializationLogic.ReadList();
|
|
||||||
comboBoxSpecialization.DataSource = specs;
|
|
||||||
comboBoxSpecialization.SelectedIndex = specs.FindIndex(x => x.Id == view.SpecializationId);
|
comboBoxSpecialization.SelectedIndex = specs.FindIndex(x => x.Id == view.SpecializationId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,10 @@ namespace MedicalView.Visits
|
|||||||
var service = Program.ServiceProvider?.GetService(typeof(FormVisit));
|
var service = Program.ServiceProvider?.GetService(typeof(FormVisit));
|
||||||
if (service is FormVisit form)
|
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
|
||||||
//
|
//
|
||||||
comboBoxPatient.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
comboBoxPatient.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
comboBoxPatient.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||||
|
comboBoxPatient.AutoCompleteSource = AutoCompleteSource.ListItems;
|
||||||
comboBoxPatient.FormattingEnabled = true;
|
comboBoxPatient.FormattingEnabled = true;
|
||||||
comboBoxPatient.Location = new Point(87, 77);
|
comboBoxPatient.Location = new Point(87, 77);
|
||||||
comboBoxPatient.Name = "comboBoxPatient";
|
comboBoxPatient.Name = "comboBoxPatient";
|
||||||
@ -136,6 +138,8 @@
|
|||||||
// comboBoxDoctor
|
// comboBoxDoctor
|
||||||
//
|
//
|
||||||
comboBoxDoctor.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
comboBoxDoctor.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
comboBoxDoctor.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||||
|
comboBoxDoctor.AutoCompleteSource = AutoCompleteSource.ListItems;
|
||||||
comboBoxDoctor.FormattingEnabled = true;
|
comboBoxDoctor.FormattingEnabled = true;
|
||||||
comboBoxDoctor.Location = new Point(87, 112);
|
comboBoxDoctor.Location = new Point(87, 112);
|
||||||
comboBoxDoctor.Name = "comboBoxDoctor";
|
comboBoxDoctor.Name = "comboBoxDoctor";
|
||||||
@ -145,6 +149,8 @@
|
|||||||
// comboBoxDiagnose
|
// comboBoxDiagnose
|
||||||
//
|
//
|
||||||
comboBoxDiagnose.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
comboBoxDiagnose.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
comboBoxDiagnose.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||||
|
comboBoxDiagnose.AutoCompleteSource = AutoCompleteSource.ListItems;
|
||||||
comboBoxDiagnose.FormattingEnabled = true;
|
comboBoxDiagnose.FormattingEnabled = true;
|
||||||
comboBoxDiagnose.Location = new Point(87, 150);
|
comboBoxDiagnose.Location = new Point(87, 150);
|
||||||
comboBoxDiagnose.Name = "comboBoxDiagnose";
|
comboBoxDiagnose.Name = "comboBoxDiagnose";
|
||||||
|
@ -77,6 +77,19 @@ namespace MedicalView.Visits
|
|||||||
|
|
||||||
private void FormVisit_Load(object sender, EventArgs e)
|
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)
|
if (ModelId.HasValue)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -87,13 +100,7 @@ namespace MedicalView.Visits
|
|||||||
{
|
{
|
||||||
textBoxComment.Text = view.Comment;
|
textBoxComment.Text = view.Comment;
|
||||||
datePicker.Value = view.Date.ToDateTime(view.Time);
|
datePicker.Value = view.Date.ToDateTime(view.Time);
|
||||||
timePicker.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;
|
|
||||||
if (view.DiagnoseId != null)
|
if (view.DiagnoseId != null)
|
||||||
{
|
{
|
||||||
comboBoxDiagnose.SelectedIndex = diagnoses.FindIndex(x => x.Id == view.DiagnoseId);
|
comboBoxDiagnose.SelectedIndex = diagnoses.FindIndex(x => x.Id == view.DiagnoseId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user