protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["admin"] == null)
            {
                Response.Redirect("Login.aspx");
            }

            if (Session["book"] != null)
            {
                ent_write             = bsn_write.SearchAuthorOfBook(Session["book"].ToString());
                ent_Auth              = bsn_author.checkAuthorForId(ent_write.IdAuthor);
                textName.Text         = ent_Auth.Name;
                textLastName.Text     = ent_Auth.LastName;
                textNationality.Text  = ent_Auth.Nationality;
                btnUpdateCont.Visible = true;
                insert          = 3;
                code            = Session["book"].ToString();
                Session["book"] = null;
            }
            else
            {
                if (Session["regis"] != null)
                {
                    btnNextEditorial.Visible = true;
                }
            }
            if (!IsPostBack)
            {
                rblAuthor.AutoPostBack = true;
            }
        }
Example #2
0
        protected void showBook(EntClsBook ent_book)
        {
            txtTitle.Text = ent_book.Name;
            txtStock.Text = Convert.ToString(ent_book.Stock);
            txtCode.Text  = ent_book.Code;
            EntClsWrite  ent_write  = bsn_write.listWriteForCode(ent_book.Code);
            EntClsAuthor ent_author = bsn_auth.checkAuthorForId(ent_write.IdAuthor);

            txtAuthor.Text = ent_author.Name + ' ' + ent_author.LastName;
            txtStateB.Text = ent_book.StateB;
        }
        protected void ShowBook(EntClsBook book)
        {
            textTitle.Text       = book.Name;
            textIsbn.Text        = book.Isbn;
            textDatePublish.Text = book.DatePublish;
            textStock.Text       = Convert.ToString(book.Stock);
            textState.Text       = book.StateB;
            EntClsCategory ent_categ = bsn_cate.listCategoryForid(book.IdCateg);

            textCategory.Text = ent_categ.Name;
            EntClsEditorial ent_edit = bsn_edit.checkEditorialForId(book.IdEdit);

            textEdit.Text = ent_edit.Name;
            EntClsWrite  ent_write  = bsn_write.listWriteForCode(book.Code);
            EntClsAuthor ent_author = bsn_auth.checkAuthorForId(ent_write.IdAuthor);

            textAuthor.Text = ent_author.Name + ' ' + ent_author.LastName;
        }