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 FillPropertyData() { property.CadastralKey = txtCadastralNumber.Value; if (cboPropertyType.Value.Length != 0) { property.PropertyType = PropertyType.Parse(int.Parse(cboPropertyType.Value)); } else { property.PropertyType = PropertyType.Empty; } property.CommonName = txtPropertyCommonName.Value; property.Antecedent = txtAntecendent.Value; property.Notes = txtObservations.Value; if (Request.Form[cboMunicipality.ClientID].Length != 0) { property.Municipality = GeographicRegionItem.Parse(int.Parse(Request.Form[cboMunicipality.ClientID])); property.CadastralOffice = RecorderOffice.Parse(int.Parse(cboCadastralOffice.Value)); } else { property.Municipality = GeographicRegionItem.Empty; } if (Request.Form[cboSettlement.ClientID].Length != 0) { property.Settlement = GeographicRegionItem.Parse(int.Parse(Request.Form[cboSettlement.ClientID])); } else { property.Settlement = GeographicRegionItem.Empty; } if (Request.Form[cboStreetRoad.ClientID].Length != 0) { property.Street = GeographicPathItem.Parse(int.Parse(Request.Form[cboStreetRoad.ClientID])); } else { property.Street = GeographicPathItem.Empty; } if (Request.Form[cboPostalCode.ClientID].Length != 0) { property.PostalCode = GeographicRegionItem.Parse(int.Parse(Request.Form[cboPostalCode.ClientID])); } else { property.PostalCode = GeographicRegionItem.Empty; } property.Ubication = txtUbication.Value; property.ExternalNumber = txtExternalNumber.Value; property.InternalNumber = txtInternalNumber.Value; property.FractionTag = txtFractionTag.Value; property.BatchTag = txtBatchTag.Value; property.BlockTag = txtBlockTag.Value; property.SectionTag = txtSectionTag.Value; property.SuperSectionTag = txtSuperSectionTag.Value; }