Ejemplo n.º 1
0
        void bAdd_Click(object sender, EventArgs e)
        {
            var book = GetSelectedBook();

            book.Do(b => {
                AllBooks.Remove(b);
                AddRequest(b);
            });
            AllBooks = AllBooks.OrderBy(b => b.Name).ToList();
            gcBooks.Bind(AllBooks);
        }
Ejemplo n.º 2
0
        void bRemove_Click(object sender, EventArgs e)
        {
            var request = gvResult.GetSelectedRow <Request>();

            request.Do(r => {
                AllBooks.Add(r.Book);
                AllBooks = AllBooks.OrderBy(b => b.Name).ToList();
                gcBooks.Bind(AllBooks);
                RemoveRequest(r);
            });
        }