Example #1
0
        private void ProcessWaterfallResponse(string sControl, IEnumerable <ListItemModel> lstData)
        {
            var listItemModels = lstData as IList <ListItemModel> ?? lstData.ToList();

            switch (sControl)
            {
            case SettingsData.Constants.Control.CONTROL_COUNTRY:
            {
                ClearCascadeAddress(Countries);
                Countries.ClearAndAddRange(listItemModels);
                return;
            }

            case SettingsData.Constants.Control.CONTROL_REGION_A:
            {
                ClearCascadeAddress(RegionsA);
                RegionsA.ClearAndAddRange(listItemModels);
                return;
            }

            case SettingsData.Constants.Control.CONTROL_REGION_B:
            {
                ClearCascadeAddress(RegionsB);
                RegionsB.ClearAndAddRange(listItemModels);
                return;
            }

            case SettingsData.Constants.Control.CONTROL_REGION_C:
            {
                ClearCascadeAddress(RegionsC);
                RegionsC.ClearAndAddRange(listItemModels);
                return;
            }

            case SettingsData.Constants.Control.CONTROL_REGION_D:
            {
                ClearCascadeAddress(RegionsD);
                RegionsD.ClearAndAddRange(listItemModels);
                return;
            }
            }
        }