public void FindShows(object sender, EventArgs e) { myDAL objmyDAL = new myDAL(); string MovieID = DropDownList1.Text.ToString(); DataTable GetData = new DataTable(); int found = objmyDAL.ViewMovieShows(MovieID, ref GetData); if (found != 1) { Message.Text = "There was some error!"; } else { ShowsGrid.DataSource = GetData; if (GetData.Rows.Count > 0) { Message.Text = "Following shows are found:"; ShowsGrid.DataBind(); } else { Message.Text = "No shows found:"; } } }
protected void AdminShows(object sender, EventArgs e) { myDAL objmyDAl = new myDAL(); DataTable DT = new DataTable(); int found; int AdminID = (int)Session["ID"]; found = objmyDAl.AdminShows(AdminID, ref DT); if (found != 1) { Message.Text = "There was some error!"; } else { ShowsGrid.DataSource = DT; if (DT.Rows.Count > 0) { Message.Text = "Following Shows are found:"; ShowsGrid.DataBind(); } } }