Beispiel #1
0
        protected void goButton_OnClick(object sender, EventArgs e)
        {
            if (authorIdTextBox.Text!="")
            {
                int id = Convert.ToInt32(authorIdTextBox.Text);
                bool isAuthor = authorManager.CheckAuthorId(id);
                if (!isAuthor)
                {
                    Response.Write("<script>alert('Please Insert Right ID');</script>");

                }
                else
                {
                    author = authorManager.GetAuthorName(id);
                    authorIdTextBox.Text = author.AuthorId.ToString();
                    authorNameTextBox.Text = author.AuthorName;
                }
                
            }
            else
            {
                Response.Write("<script>alert('Please Insert Author Id');</script>");

            }
        }