diff --git a/TransportCompany/TransportCompany/FormCreateTrucking.cs b/TransportCompany/TransportCompany/FormCreateTrucking.cs index f7c3035..1f5865b 100644 --- a/TransportCompany/TransportCompany/FormCreateTrucking.cs +++ b/TransportCompany/TransportCompany/FormCreateTrucking.cs @@ -67,7 +67,7 @@ namespace TransportCompany if (viewClient != null) { comboBoxClients.DisplayMember = "Email"; - comboBoxClients.ValueMember = "Id"; + comboBoxClients.ValueMember = "MongoId"; comboBoxClients.DataSource = viewClient; comboBoxClients.SelectedItem = null; } @@ -75,7 +75,7 @@ namespace TransportCompany if (viewCargo != null) { comboBoxCargos.DisplayMember = "TypeCargo"; - comboBoxCargos.ValueMember = "Id"; + comboBoxCargos.ValueMember = "MongoId"; comboBoxCargos.DataSource = viewCargo; comboBoxCargos.SelectedItem = null; } @@ -83,7 +83,7 @@ namespace TransportCompany if (viewTransport != null) { comboBoxTransports.DisplayMember = "Tranport"; - comboBoxTransports.ValueMember = "Id"; + comboBoxTransports.ValueMember = "MongoId"; comboBoxTransports.DataSource = viewTransport; comboBoxTransports.SelectedItem = null; } diff --git a/TransportCompany/TransportCompany/FormTransferData.cs b/TransportCompany/TransportCompany/FormTransferData.cs index b9e5dad..a9e4b24 100644 --- a/TransportCompany/TransportCompany/FormTransferData.cs +++ b/TransportCompany/TransportCompany/FormTransferData.cs @@ -36,10 +36,9 @@ namespace TransportCompany private void ButtonStartTransfer_Click(object sender, EventArgs e) { - /*using (var soundPlayer = new SoundPlayer(@"c:\Windows\Media\chimes.wav")) - { - soundPlayer.Play(); // can also use soundPlayer.PlaySync() - }*/ + var soundPlayer = new SoundPlayer(@"C:\Users\Programmist73\Desktop\Практика\2-й курс\4-й семестр\СУБД\Лаб. раб. №8\uda_requie.wav"); + + soundPlayer.PlaySync(); // can also use soundPlayer.PlaySync() Program.ConnectPostgres(); @@ -66,7 +65,7 @@ namespace TransportCompany _truckingLogic.TransferData(truckinglist); MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); - + Program.ConnectPostgres(); } } diff --git a/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs b/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs index 9448949..26b58ab 100644 --- a/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs +++ b/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs @@ -30,20 +30,20 @@ namespace TransportCompanyContracts.ViewModels [DisplayName("Почта")] public string ClientEmail { get; set; } = string.Empty; - public int TransportationId { get; set; } + public int CargoId { get; set; } - [DisplayName("Тип перевозки")] - public string TypeTransportation { get; set; } = string.Empty; + [DisplayName("Объект перевозки")] + public string Cargo { get; set; } = string.Empty; public int TransportId { get; set; } [DisplayName("Тип транспорта")] public string TransportName { get; set; } = string.Empty; - public int CargoId { get; set; } + public int TransportationId { get; set; } - [DisplayName("Объект перевозки")] - public string Cargo { get; set; } = string.Empty; + [DisplayName("Тип перевозки")] + public string TypeTransportation { get; set; } = string.Empty; [DisplayName("Цена")] public double Price { get; set; }