46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using BookContract.BindingModels;
|
|
using BookContract.BusinessLogicContracts;
|
|
using BookDatabaseImplement.Implements;
|
|
|
|
namespace Desktop
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
private IBookLogic _bookLogicl;
|
|
private IHistoryLogic _historyLogicl;
|
|
private IReaderLogic _readerLogicl;
|
|
|
|
|
|
public Form1(IBookLogic bookLogic, IHistoryLogic historyLogicl, IReaderLogic readerLogicl)
|
|
{
|
|
InitializeComponent();
|
|
_bookLogicl = bookLogic;
|
|
_historyLogicl = historyLogicl;
|
|
_readerLogicl = readerLogicl;
|
|
|
|
bookList.SetTemplate("{", "}", "Ôîðìà êíèãè {BookType} Èíäèôèêàòîð {Id} Íàçâàíèå {Title} {Annotation} Àííîòàöèÿ");
|
|
}
|
|
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
{
|
|
var books = _bookLogicl.Read(null);
|
|
|
|
foreach (var book in books)
|
|
{
|
|
bookList.Add<BookBindingModel>(new BookBindingModel { Id = book.Id, Title = book.Title, BookType = book.BookType, Annotation = book.Annotation });
|
|
}
|
|
}
|
|
|
|
private void controlTextBox1_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void bookList_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
}
|