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