Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Theatredgv.DataSource = theatre_controller.GetTheatreDetails();
     Theatredgv.DataBind();
     Theatredgv.Visible = true;
     status.Text        = "";
 }
Example #2
0
        protected void createbtn_Click(object sender, EventArgs e)
        {
            Theatre addtheatre = new Theatre();

            addtheatre.Location    = locationtxt.Text;
            addtheatre.Description = descptxt.Text;

            theatre_controller.AddTheatre(addtheatre);
            Theatredgv.DataSource = theatre_controller.GetTheatreDetails();
            Theatredgv.DataBind();
            status.Text = "Record Created successfully";
        }
Example #3
0
        protected void deletebtn_Click(object sender, EventArgs e)
        {
            Theatre t = new Theatre();

            t = theatre_controller.GetTheatreId(locationtxt.Text);

            theatre_controller.DeleteTheatre(t);
            locationtxt.Text      = string.Empty;
            locationtxt.Enabled   = true;
            descptxt.Text         = string.Empty;
            descptxt.Enabled      = true;
            Theatredgv.DataSource = theatre_controller.GetTheatreDetails();
            Theatredgv.DataBind();
            status.Text = "Record Deleted successfully";
        }