public void SetDataSource(TerritorySite.BL.CMS.AddressSearchCollection addresses) { TerritorySite.BL.CMS.Territory thisTerritory = new TerritorySite.BL.CMS.Territory(CurrentUser.TerritoryId); string[] pairs = thisTerritory.CoordinatesPerimeter.Split(';'); foreach (string pair in pairs) { if (pair != string.Empty) { string x = pair.Split(',')[0]; string y = pair.Split(',')[1]; LiteralBoderPoints.Text += string.Format("arrayOfBoderPoints.push(new GLatLng({0}, {1}));\r\n", x, y); } } int i = 1; foreach (TerritorySite.BL.CMS.AddressSearch address in addresses) { // points describing addresses LiteralMarkers.Text += string.Format("arrayOfPoints.push(new GLatLng({0}, {1}));\r\n", address.Lat, address.LongX); i++; } }
protected void Page_Load(object sender, EventArgs e) { if (CurrentUser.CurrentAccount.IsForeignLanguage.Value) { PanelContent.Visible = true; LabelError.Visible = false; if (CurrentUser.TerritoryId == 0) { Response.Redirect("Default.aspx"); } thisTerritory = new TerritorySite.BL.CMS.Territory(CurrentUser.TerritoryId); if (!Page.IsPostBack) { PageHeader1.Text = "Edit addresses for territory #" + thisTerritory.TerritoryNumber; DoDataBind(); } //this.TextBoxStreet.Attributes.Add("onfocus", "javascript:somethingChanged();"); //this.DropDownListCities.Attributes.Add("onfocus", "javascript:somethingChanged();"); ////this.TextBoxHouseNumber.Attributes.Add("onfocus", "javascript:somethingChanged();"); //this.TextBoxApartmentNumber.Attributes.Add("onfocus", "javascript:somethingChanged();"); //this.DropDownListLanguages.Attributes.Add("onfocus", "javascript:somethingChanged();"); } else { PanelContent.Visible = false; LabelError.Visible = true; } }