protected void Page_Load(object sender, EventArgs e) { //string Res_Id; Res_Id = Request.QueryString["ResId"]; if (Res_Id == "" || Res_Id == null) { } else { //menu lists Repeater1.DataSource = m.MenuList(Res_Id, "0"); //All menus Repeater2.DataSource = m.MenuList(Res_Id, "1"); //Special menus Repeater1.DataBind(); Repeater2.DataBind(); //Restaruants detail information resDeatilView.DataSource = res.RestaurantDetail(Res_Id); resDeatilView.DataBind(); imgListView.DataSource = res.ResImages(Res_Id, "1"); imgListView.DataBind(); getReview(Res_Id); } }
public void RestaurantDetailTest() { //arrange Restaurants r = new Restaurants(); //act DataSet ds = r.RestaurantDetail("41096"); //assert DataRow[] dr = ds.Tables[0].Select("[Res_Name] = 'The Keg'"); Assert.AreEqual(1, dr.Length); }