private void AppendSettlement() { GeographicRegionItem municipality = GeographicRegionItem.Parse(int.Parse(Request.Form[cboMunicipality.ClientID])); GeographicItemType settlementType = GeographicItemType.Parse(int.Parse(cboSettlementType.Value)); GeographicRegionItem settlement = (GeographicRegionItem) settlementType.CreateInstance(); settlement.Name = txtSearchText.Value; settlement.Save(); municipality.AddMember("Municipality_Settlements", settlement); FillPropertyData(); property.Settlement = settlement; property.Save(); }
private void AppendStreetRoad() { GeographicRegionItem settlement = GeographicRegionItem.Parse(int.Parse(Request.Form[cboSettlement.ClientID])); GeographicItemType streetRoadType = GeographicItemType.Parse(int.Parse(cboStreetRoadType.Value)); GeographicPathItem street = (GeographicPathItem) streetRoadType.CreateInstance(); street.Name = txtSearchText.Value; street.Save(); settlement.AddMember("Settlement_Paths", street); GeographicRegionItem municipality = GeographicRegionItem.Parse(int.Parse(Request.Form[cboMunicipality.ClientID])); municipality.AddMember("Municipality_Paths", street); FillPropertyData(); property.Street = street; property.Save(); }
private void AppendPostalCode() { GeographicItemType postalCodeType = GeographicItemType.Parse(309); GeographicRegionItem postalCode = (GeographicRegionItem) postalCodeType.CreateInstance(); postalCode.Name = txtSearchText.Value; postalCode.Save(); if (Request.Form[cboSettlement.ClientID].Length != 0 && int.Parse(Request.Form[cboSettlement.ClientID]) > 0) { GeographicRegionItem settlement = GeographicRegionItem.Parse(int.Parse(Request.Form[cboSettlement.ClientID])); settlement.AddMember("Settlement_PostalCodes", postalCode); } GeographicRegionItem municipality = GeographicRegionItem.Parse(int.Parse(Request.Form[cboMunicipality.ClientID])); municipality.AddMember("Municipality_PostalCodes", postalCode); FillPropertyData(); property.PostalCode = postalCode; property.Save(); }