コード例 #1
0
ファイル: PublisherController.cs プロジェクト: Rigo85/prueba2
 public ActionResult AddBook(int id)
 {
     return(View(
                new PublisherBooksModel
                    (Publisher_BLL.GetPublisherRecord(id),
                    BookDetails_BLL.GetBookRecords(),
                    Publisher_BLL.GetPublisherBooks(id))));
 }
コード例 #2
0
        private void BindBookRecordsGridView()
        {
            DataSet ds = new DataSet();

            try
            {
                ds = objBookDetailsBLL.GetBookRecords();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    grdBookDetails.DataSource = ds;
                    grdBookDetails.DataBind();
                }
                else
                {
                    grdBookDetails.DataSource = null;
                    grdBookDetails.DataBind();
                }
            }
            catch (Exception ex)
            {
                Response.Write("Oops! error occured:" + ex.Message.ToString());
            }
            finally
            {
                objBookDetailsBEL = null;
                objBookDetailsBLL = null;
            }
        }
コード例 #3
0
 //
 // GET: /BookDetails/
 public ActionResult Index()
 {
     return(View(BookDetails_BLL.GetBookRecords()));
 }