using System; using PizzaModel; using PizzaService; using PizzaSystem; namespace PizzaPresentation { public partial class OrderStatus : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // In this page, only have the initial page load // if room not there or service API not there, redirect to start page PizzaConfig pizzaSystem = (PizzaConfig)Application["PizzaSys"]; StudentService studentService = pizzaSystem.StudentService; String roomNumberStr = (String)Session["room"]; if (pizzaSystem == null || roomNumberStr == null) { Response.Redirect("StudentStart.aspx", false); return; } int roomNumber = int.Parse(roomNumberStr); GridView1.DataSource = studentService.OrderStatus(roomNumber); GridView1.DataBind(); } } }