Ejemplo n.º 1
0
        protected override void OnSelectionChangedCommand(object obj)
        {
            var value = obj as ResellerViewObject;

            if (value != null)
            {
                HelperDto = value;
                _countryLoader.Load(value.Country.Code);
                _cityLoader.Load(value.City.Code);
                _provinceLoader.Load(value.Province.Code);
                ResellerCountryDto  = _countryLoader.HelperView;
                ResellerCityDto     = _cityLoader.HelperView;
                ResellerProvinceDto = _provinceLoader.HelperView;
                PreviousValue       = CurrentValue;
                CurrentValue        = value;
                SetHelperInFistDto();
            }
        }
Ejemplo n.º 2
0
 private void InitLoader(IDataServices dataServices, string query)
 {
     _loader = new HelperLoader <Dto, Entity>(dataServices);
     if (query == string.Empty)
     {
         _loader.LoadAll();
         if (_loader.HelperView != null)
         {
             HelperView = _loader.HelperView;
             HelperDto  = _loader.HelperView.FirstOrDefault();
         }
     }
     else
     {
         _loader.Load(query);
         if (_loader.HelperView != null)
         {
             HelperView = _loader.HelperView;
             HelperDto  = _loader.HelperView.FirstOrDefault();
         }
     }
 }