private void LoadMap(int id) { Cooperative_Info cop = new Cooperative_Info(id); ltmap.Text = @"<script type='text/javascript'> function initialize() { var myLatlng = new google.maps.LatLng(" + cop.Lat + "," + cop.Lng + @"); var mapOptions = { zoom: 13, mapTypeId: google.maps.MapTypeId.hybrid, center: myLatlng } var icon = { url:'" + urldomain + @"/Img/Tree/" + cop.Images + @"', scaledSize: new google.maps.Size(40, 40) }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, icon: icon, draggable: true, title:'" + cop.Cooperative_Name + @"' }); google.maps.event.addListener(marker, 'click', function (e) { infowindow.open(map,marker); }); var infowindow = new google.maps.InfoWindow({ content: '" + cop.Cooperative_Name + @"' }); infowindow.open(map,marker); } google.maps.event.addDomListener(window, 'load', initialize); </script>"; }
private void loadTitle(int id) { Cooperative_Info Info = new Cooperative_Info(id); LTtitle.Text = "<title>" + Info.Cooperative_Name + "</title>"; LTNameCoop.Text = "<h1>" + Info.Cooperative_Name + "</h1><p>" + TextToHtml(Info.Description) + "</p>" + "</h1><p>Liên hệ :" + Info.Phone + "</p>" + "</h1><p>Địa chỉ :" + Info.Address + "</p>"; }
private bool checkCooperative(int coopKey) { Cooperative_Info coo = new Cooperative_Info(coopKey); if (coo.Cooperative_Key == 0) { cmdSave.Visible = false; cmdEdit.Visible = false; cmdDelete.Visible = false; MessageBox("Không tìm thấy hợp tác xã"); return(true); } else { return(false); } }
protected void Page_Load(object sender, EventArgs e) { string nURL = Page.ResolveUrl(Request.RawUrl); //string nURL = "Cooperative/HTX/phuochoa"; string[] _htxID = nURL.Split('/'); string key = "0"; key = _htxID[2]; if (!IsPostBack) { if (key != "") { Cooperative_Info Info = new Cooperative_Info(key); Ckey = Info.Cooperative_Key.ToInt(); } LoadInfo(Ckey); } }
private void loadtxt(int id) { check(); LoadDataToToolboxWeb.DropDown_DDL(ddcolor, "Select Color as _Key, CategoryName _Name from PUL_Seeds_Categories as sc", true); Member_Info info = new Member_Info(id); coopKey = Convert.ToInt32(this.Request["coop"]); Cooperative_Info coo = new Cooperative_Info(coopKey); lb(false); txt(true); txtMemID.Text = info.MemID; txtName.Text = info.Name; ddCooperative_Key.Text = coo.Cooperative_Name; txtAddress.Text = info.Address; txtEmail.Text = info.Email; txtPhone.Text = info.Phone; txtArea.Text = Convert.ToString(info.Area); lbDescription.Text = info.Description; txtlat.Text = info.LatLng; }