Esempio n. 1
0
 public void lost_book_from_chit(object sender, RoutedEventArgs e)
 {
     BLL.Model.Book book = list_book_chit.SelectedValue as BLL.Model.Book;
     book.Status_id = 3;
     crudServ.UpdateBook(book);
     refresh();
 }
Esempio n. 2
0
        void Out_from_chit(object sender, RoutedEventArgs e)
        {
            ok = true;
            int parse = books_l.SelectedIndex;

            book = (books_l.SelectedValue as Model.Book).onboard.FirstOrDefault();
            this.Close();
        }
Esempio n. 3
0
 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();
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     ok = true;
     b = new BLL.Model.Book();
     b.Name = Name.Text;
     b.Autor = Autor.Text;
     count = Convert.ToInt32(Count.Text);
     b.God = Convert.ToInt32(God.Text);
     b.Annot = Annot.Text;
     b.Rubrika_id =Convert.ToInt32(Rubrika.SelectedValue);
     b.Izdatelstvo_id = Convert.ToInt32(Izdat.SelectedValue);
     b.Status_id = 2;
     this.Close();
 }
Esempio n. 5
0
        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();
        }