Example #1
0
        /// <summary>
        /// Populates the destination type drop down control.
        /// </summary>
        private void PopulateDestinationTypeDropDownControl()
        {
            DropDownList dropDownListSourceType      = GetDropDownListSourceTypeControl();
            DropDownList dropdownListDestinationType = GetDropDownListDestinationTypeControl();

            List <MappingClassAssociation> dataSource =
                MappingController.GetMappingClassAssociationsBySourceType(dropDownListSourceType.SelectedValue);

            dropdownListDestinationType.Items.Clear();

            if (dataSource.Count != 1)
            {
                dropdownListDestinationType.Items.Add(new ListItem(null, null));
            }
            foreach (MappingClassAssociation association in dataSource)
            {
                dropdownListDestinationType.Items.Add(new ListItem(association.DestinationType, association.Id.ToString()));
            }
            //dropdownListDestinationType.DataSource = dataSource;
            //dropdownListDestinationType.DataBind();
            if (dropdownListDestinationType.SelectedValue != null && dropdownListDestinationType.SelectedValue != "")
            {
                PopulateSourcePropertyDropDownControl(dropdownListDestinationType);
                PopulateDestinationPropertyDropDownControl(GetDropDownListDestinationPropertyControl());
            }
        }