Esempio n. 1
0
        private void PopupateSearchTitlesResultGridView()
        {
            var titlesQuery = MyHelpers.SearchForTitles(txtAuthorSearchText.Text);

            titlesResultGridView.DataSource = titlesQuery;
            titlesResultGridView.DataBind();
        }
Esempio n. 2
0
 private void PopupateSearchAuthorsResultGridView()
 {
     using (var ctx = new BooksEntities1())
     {
         var authorsQuery = MyHelpers.SearchForAnAuthor(txtAuthorSearchText.Text);
         authorsResultGridView.DataSource = authorsQuery;
         authorsResultGridView.DataBind();
     }
 }
        private void PopupateBooksGridView()
        {
            var titlesQuery =
                MyHelpers.PopulateGridviewWithBooksFromASelectedAuthor(authorsDropDownList.SelectedValue);


            titlesGridView.DataSource = titlesQuery;
            titlesGridView.DataBind();
        }
Esempio n. 4
0
        private void PopupateSearchResultsGridViews()
        {
            //string searchText = txtSearchText.Text;

            //ctx.Authors.Load();
            //ctx.Titles.Load();
            var authorsQuery = MyHelpers.SearchForAnAuthor(txtSearchText.Text);
            var titlesQuery  = MyHelpers.SearchForTitles(txtSearchText.Text);

            authorsResultGridView.DataSource = authorsQuery;
            authorsResultGridView.DataBind();

            titlesResultGridView.DataSource = titlesQuery;
            titlesResultGridView.DataBind();
        }
Esempio n. 5
0
 private void AddAuthorToDb()
 {
     //Todo: Add Author to the database through Entity framework
     Author AddNewAuthor = MyHelpers.AddAuthor(txtFirstName.Text, txtLastName.Text, txtCountryOfResidence.Text);
 }