Пибд-24. Ередавкин Р.А Лабораторная работа 2 #2

Closed
RomaEredavkin wants to merge 3 commits from LabWork_02 into LabWork_1
2 changed files with 3 additions and 3 deletions
Showing only changes of commit f46afd5646 - Show all commits

View File

@ -18,14 +18,14 @@ public class To
public double Cost { get; private set; }
public DateTime DateTo { get; private set; }
public static To CreatOperation(int id, string discription, double cost, int busid, int staffid)
public static To CreatOperation(int id, string discription, double cost, DateTime dateTo, int busid, int staffid)
{
return new To()
{
Id = id,
Discription = discription ?? string.Empty,
Cost = cost,
DateTo = DateTime.Now,
DateTo = dateTo,
BusID = busid,
StaffID = staffid
};

View File

@ -31,7 +31,7 @@ public partial class FormTO : Form
{
throw new Exception("Имеются не заполненые поля");
}
_toRepository.CreateTo(To.CreatOperation(0, textBoxDescription.Text, Convert.ToDouble(numericUpDownCost.Value), (int)comboBoxBus.SelectedValue!,
_toRepository.CreateTo(To.CreatOperation(0, textBoxDescription.Text, Convert.ToDouble(numericUpDownCost.Value), dateTimePicker1.Value, (int)comboBoxBus.SelectedValue!,
(int)comboBoxStaff.SelectedValue!));
Close();
}