Ejemplo n.º 1
0
        private void SelectEKATEsData(SMCDropDownList ddlCountry, SMCDropDownList ddlMun, string countryId, int? municipalityId, SMCAutoCompleteTextBox acCity, int? cityId)
        {
            ddlCountry.SelectedValue = countryId;
            ddlMun.AdditionalParam = "idCountry=" + countryId;
            ddlMun.UserControlLoad();
            if (municipalityId.HasValue && municipalityId != Constants.INVALID_ID_NULLABLE)
            {
                ddlMun.SelectedValue = municipalityId.Value.ToString();
                acCity.AdditionalWhereParam = "idMunicipality=" + municipalityId.Value.ToString();
                acCity.UserControlLoad();

                if (cityId.HasValue && cityId != Constants.INVALID_ID_NULLABLE)
                {
                    var location = this.ownerPage.AdminClientRef.GetLocationById(cityId.Value.ToString());
                    acCity.SelectedValue = cityId.ToString();
                    acCity.Text = (location != null ? location.LocationName : string.Empty);
                }
            }

        }
Ejemplo n.º 2
0
        private void SelectEKATEsData(SMCDropDownList ddlCountry, SMCDropDownList ddlMun, string countryId, int?municipalityId, SMCAutoCompleteTextBox acCity, int?cityId)
        {
            ddlCountry.SelectedValue = countryId;
            ddlMun.AdditionalParam   = "idCountry=" + countryId;
            ddlMun.UserControlLoad();
            if (municipalityId.HasValue && municipalityId != Constants.INVALID_ID_NULLABLE)
            {
                ddlMun.SelectedValue        = municipalityId.Value.ToString();
                acCity.AdditionalWhereParam = "idMunicipality=" + municipalityId.Value.ToString();
                acCity.UserControlLoad();

                if (cityId.HasValue && cityId != Constants.INVALID_ID_NULLABLE)
                {
                    var location = this.ownerPage.AdminClientRef.GetLocationById(cityId.Value.ToString());
                    acCity.SelectedValue = cityId.ToString();
                    acCity.Text          = (location != null ? location.LocationName : string.Empty);
                }
            }
        }