Important minor edit.

This commit is contained in:
Programmist73 2023-05-10 20:48:31 +04:00
parent 403625b82c
commit dc140799a2

View File

@ -67,7 +67,16 @@ namespace TransportCompany
if (viewClient != null) if (viewClient != null)
{ {
comboBoxClients.DisplayMember = "Email"; comboBoxClients.DisplayMember = "Email";
if (isMongo)
{
comboBoxClients.ValueMember = "MongoId"; comboBoxClients.ValueMember = "MongoId";
}
else
{
comboBoxClients.ValueMember = "Id";
}
comboBoxClients.DataSource = viewClient; comboBoxClients.DataSource = viewClient;
comboBoxClients.SelectedItem = null; comboBoxClients.SelectedItem = null;
} }
@ -75,7 +84,16 @@ namespace TransportCompany
if (viewCargo != null) if (viewCargo != null)
{ {
comboBoxCargos.DisplayMember = "TypeCargo"; comboBoxCargos.DisplayMember = "TypeCargo";
comboBoxCargos.ValueMember = "MongoId";
if (isMongo)
{
comboBoxClients.ValueMember = "MongoId";
}
else
{
comboBoxClients.ValueMember = "Id";
}
comboBoxCargos.DataSource = viewCargo; comboBoxCargos.DataSource = viewCargo;
comboBoxCargos.SelectedItem = null; comboBoxCargos.SelectedItem = null;
} }
@ -83,7 +101,16 @@ namespace TransportCompany
if (viewTransport != null) if (viewTransport != null)
{ {
comboBoxTransports.DisplayMember = "Tranport"; comboBoxTransports.DisplayMember = "Tranport";
comboBoxTransports.ValueMember = "MongoId";
if (isMongo)
{
comboBoxClients.ValueMember = "MongoId";
}
else
{
comboBoxClients.ValueMember = "Id";
}
comboBoxTransports.DataSource = viewTransport; comboBoxTransports.DataSource = viewTransport;
comboBoxTransports.SelectedItem = null; comboBoxTransports.SelectedItem = null;
} }