Ejemplo n.º 1
0
        private void btnUpdatePublisher_Click(object sender, EventArgs e)
        {
            string id      = txtPublisherID.Text;
            string name    = txtPublisherName.Text;
            string address = txtPublisherAddress.Text;
            string email   = txtPublisherEmail.Text;
            string phone   = txtPublisherPhone.Text;

            try
            {
                if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(name) || string.IsNullOrEmpty(address) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(phone))
                {
                    MessageBox.Show("Don't leave the blank box!");
                }
                else
                {
                    publisherdao.updatePublisher(id, name, address, email, phone);
                    MessageBox.Show("Update Success!!");
                    LoadPublisher();
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }