26 lines
519 B
C#
26 lines
519 B
C#
using CarServiceContracts.BusinessLogicsContracts;
|
|
|
|
namespace CarServiceView
|
|
{
|
|
public partial class FormAddItemTest : Form
|
|
{
|
|
IItemLogic _itemLogic;
|
|
public FormAddItemTest(IItemLogic itemLogic)
|
|
{
|
|
_itemLogic = itemLogic;
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void buttonAdd_Click(object sender, EventArgs e)
|
|
{
|
|
_itemLogic.Create(new()
|
|
{
|
|
Name = textBoxName.Text,
|
|
Price = Convert.ToDecimal(textBoxPrice.Text),
|
|
Count = Convert.ToInt32(textBoxCount.Text),
|
|
WorkerId = 1
|
|
});
|
|
}
|
|
}
|
|
}
|