Ejemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            AuthorModel author = new AuthorModel(TextBox1.Text, TextBox2.Text);

            Response.Write(AuthorBLL.AddAuthor(author));
            Label1.Text = AuthorBLL.GetAuthorCount().ToString();
        }
Ejemplo n.º 2
0
        private void btnAuthorAdd_Click(object sender, EventArgs e)
        {
            Author author = new Author();

            author.FirstName = txtAuthorNAme.Text;
            author.LastName  = txtAuthorLastName.Text;
            _authorBLL.AddAuthor(author);
            ComboGetAuthor();
            MessageBox.Show("Yazar listeye Eklenmiştir.");
        }
        private void btnAddAuthor_Click(object sender, EventArgs e)
        {
            string AuthorName = textboxAddAuthor.Text;

            if (!string.IsNullOrEmpty(AuthorName))
            {
                if (AuthorController.AddAuthor(AuthorName))
                {
                    MessageBox.Show("Thêm tác giả thành công");
                    listviewAuthors.Items.Clear();
                    ShowListAuthors();
                    textboxAddAuthor.Text = "";
                }
                else
                {
                    MessageBox.Show("Thêm tác giả thất bại");
                }
            }
        }