Beispiel #1
0
        public OrganizationViewModel ConvertViewModel(OrganizationModel organzition)
        {
            if (organzition == null)
            {
                return(null);
            }

            OrganizationViewModel result = new OrganizationViewModel();

            result.Id   = organzition.MItemID;
            result.Name = organzition.MName;

            return(result);
        }
Beispiel #2
0
        public List <OrganizationViewModel> ConvertViewModel(List <OrganizationModel> organzitions)
        {
            List <OrganizationViewModel> result = new List <OrganizationViewModel>();

            foreach (OrganizationModel organization in organzitions)
            {
                OrganizationViewModel viewModel = ConvertViewModel(organization);

                if (viewModel == null)
                {
                    continue;
                }

                result.Add(viewModel);
            }


            return(result);
        }