public card_chit() { InitializeComponent(); ok = false; update = false; n_ch = new BLL.Model.Chitatel(); chitatel = null; }
public card_chit(BLL.Model.Chitatel ch) { InitializeComponent(); ok = false; update = false; chitatel = ch; n_ch = new BLL.Model.Chitatel(); Data_in(); }
public void return_book_from_chit(object sender, RoutedEventArgs e) { BLL.Model.Chitatel chitatel = chit_list.SelectedValue as BLL.Model.Chitatel; BLL.Model.Book book = list_book_chit.SelectedValue as BLL.Model.Book; crudServ.CreateOut(new BLL.Model.Out { Id_chit = chitatel.Id, Id_book = book.Id, Date = DateTime.Now, Outtype_id = 2 }); refresh(); }
public Out_chit(List <Model.Book> l, BLL.Model.Chitatel ch) { books = l; chit = ch; InitializeComponent(); books_l.ItemsSource = books; info.Text += "ФИО: " + ch.FIO + " Адрес: " + ch.Adress + " Телефон: " + ch.Telephone; ok = false; }
private void refresh_info() { int parse = chit_list.SelectedIndex; BLL.Model.Chitatel rowView = chit_list.SelectedValue as BLL.Model.Chitatel; if (parse != -1) { list_out_chit.ItemsSource = rowView.OutList; list_book_chit.ItemsSource = rowView.BookList; } }
private void out_book_from_chit(object sender, EventArgs e) { BLL.Model.Book book = (sender as Out_chit).book; BLL.Model.Chitatel chitatel = (sender as Out_chit).chit; bool ok = (sender as Out_chit).ok; if (ok) { crudServ.CreateOut(new BLL.Model.Out { Id_chit = chitatel.Id, Id_book = book.Id, Date = DateTime.Now, Outtype_id = 1 }); } refresh(); }