Exemplo n.º 1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            BusinessLayer bl = new BusinessLayer();

            field.movieId = Convert.ToInt32(ddlMovie.SelectedValue);

            // field.movieId = Convert.ToInt32(ViewState["movieId"]);
            //lblmessage.Text = ViewState["movieId"].ToString();
            try
            {
                bl.DeleteMovie(field.movieId);
                // field.movieId = Convert.ToInt32(ddlMovie.SelectedValue);
                // Response.Write("<script>alert('" + ddlMovie.SelectedItem.Text + " was Deleted Successfullyxcd!')</script>");
                lblmessage.Text = "The Movie was DELETED!";
            }
            catch (Exception ex)
            {
                lblmessage.Text = "ERROR! " + ex.Message;
            }
        }