protected void Page_Load(object sender, EventArgs e) { BLLstore BLLstore = new BLLstore(); String s = Request.QueryString["storeid"]; Store store = new Store(); store = BLLstore.getStore(Convert.ToInt16(s)); comments = new List <Comment>(); try { storename = store.name; city = store.city; type = store.Type.name; tag1 = store.tag1; tag2 = store.tag2; viewStoreMap.Width = 600; viewStoreMap.Height = 250; GLatLng p = new GLatLng(store.latitude, store.longitude); GMarker m = new GMarker(p); viewStoreMap.setCenter(p, 16); viewStoreMap.addGMarker(m); comments = BLLstore.getCommentsForStore(store.id); rptComments.DataSource = comments; rptComments.DataBind(); } catch (Exception ex) { Response.Write(ex.Message); } }
protected void btnSubmitStore_Click(object sender, EventArgs e) { BLLstore BLLstore = new BLLstore(); try { string[] location = new string[2]; location[0] = hdnLat.Value; location[1] = hdnLong.Value; double x = Double.Parse(location[0], System.Globalization.CultureInfo.GetCultureInfo("en-us")); double y = Double.Parse(location[1], System.Globalization.CultureInfo.GetCultureInfo("en-us")); Store s = new Store(); s.name = txtName.Value; s.city = txtCity.Value; s.typeID = Convert.ToInt16(drpType.SelectedValue); s.tag1 = txttag1.Value; s.tag2 = txttag2.Value; s.latitude = x; s.longitude = y; BLLstore.insertStore(s); } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void btnSubmitStore_Click(object sender, EventArgs e) { BLLstore BLLstore = new BLLstore(); try { string[] location = new string[2]; location[0] = hdnLat.Value; location[1] = hdnLong.Value; double x = Double.Parse(location[0], System.Globalization.CultureInfo.GetCultureInfo("en-us")); double y = Double.Parse(location[1], System.Globalization.CultureInfo.GetCultureInfo("en-us")); Store s = new Store(); s.name = txtName.Value; s.city = txtCity.Value; s.typeID = Convert.ToInt16(drpType.SelectedValue); s.tag1 = txttag1.Value; s.tag2 = txttag2.Value; s.latitude = x; s.longitude = y; BLLstore.insertStore(s); } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { BLLstore BLLstore = new BLLstore(); String s = Request.QueryString["storeid"]; Store store = new Store(); store = BLLstore.getStore(Convert.ToInt16(s)); comments = new List<Comment>(); try { storename = store.name; city = store.city; type = store.Type.name; tag1 = store.tag1; tag2 = store.tag2; viewStoreMap.Width = 600; viewStoreMap.Height = 250; GLatLng p = new GLatLng(store.latitude, store.longitude); GMarker m = new GMarker(p); viewStoreMap.setCenter(p, 16); viewStoreMap.addGMarker(m); comments = BLLstore.getCommentsForStore(store.id); rptComments.DataSource = comments; rptComments.DataBind(); } catch(Exception ex) { Response.Write(ex.Message); } }