protected void Page_Load(object sender, EventArgs e)
        {
            int           menuID = int.Parse(Request.QueryString["menuID"]);
            DAL_Menu      dal    = new DAL_Menu();
            SqlDataReader reader = dal.getMenu(menuID);

            reader.Read();
            Response.Write("<Table border=3 bordercolor=red align=center bgcolor=pink width=80%>");
            Response.Write("<tr> <td colspan=2><input type=text name=txtMenuName value=" + reader[1] + "></td> </tr>");
            Response.Write("<tr> <td> Price  </td> <td> NZ $" + reader[4] + "</td> </tr>");
            Response.Write("<tr> <td> Description </td> <td> " + reader["menuDescription"] + "</td> </tr>");
            Response.Write("<Table>");
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string        menuType = Request.QueryString["menuType"];
            DAL_Menu      dal      = new DAL_Menu();
            SqlDataReader reader   = dal.getAllMenu(menuType);

            Response.Write("<Table border=3 bordercolor=blue align=center width=60%>");

            while (reader.Read())
            {
                Response.Write("<tr> <td> " + reader[0] + "</td> <td> <a href=menuDetails.aspx?menuID=" + reader[0] + ">" + reader[1] + "</a> </td> </tr>");
            }

            Response.Write("</Table>");
        }