public static NewServiceProviderVm GetNewServiceProviderVm()
        {
            NewServiceProviderVm newServiceProviderVm = new NewServiceProviderVm()
            {
                Package           = new PackageType?(PackageType.Basic),
                Books             = AccountBc.Instance.GetBooks().ToSelectListItemList(),
                ServiceCategories = ConverterHelpers.DictionaryToCheckBoxList(MSLivingChoices.Bcs.Admin.Components.ItemTypeBc.Instance.GetSHCCategoriesForServiceProvider()),
                AllCounties       = AdminViewModelsProvider.GetCounties(),
                CountiesServed    = new List <County>(),
                Address           = AdminViewModelsProvider.GetAddressVm(),
                PhoneList         = AdminViewModelsProvider.GetPhoneList(ServiceType.ProductsAndServices)
            };

            newServiceProviderVm.PhoneList.AdditionalPhones.ForEach((PhoneVm ph) => ph.PhoneTypes.RemoveAll((SelectListItem pt) => pt.get_Text().Contains("Provision")));
            newServiceProviderVm.EmailList = AdminViewModelsProvider.GetEmailListVm(ServiceType.ProductsAndServices);
            newServiceProviderVm.Contacts  = new List <ContactVm>()
            {
                AdminViewModelsProvider.GetContactVm(ServiceType.ProductsAndServices)
            };
            newServiceProviderVm.OfficeHours = new List <OfficeHoursVm>()
            {
                AdminViewModelsProvider.GetOfficeHoursVm()
            };
            newServiceProviderVm.PaymentTypes       = ConverterHelpers.DictionaryToCheckBoxList(MSLivingChoices.Bcs.Admin.Components.ItemTypeBc.Instance.GetPaymentTypes());
            newServiceProviderVm.Coupon             = new CouponVm();
            newServiceProviderVm.Images             = new ImageListVm(DisplayNames.ServiceProviderImages);
            newServiceProviderVm.CallTrackingPhones = new List <CallTrackingPhoneVm>()
            {
                new CallTrackingPhoneVm()
            };
            return(newServiceProviderVm);
        }
        public static NewCommunityVm GetNewCommunityVm()
        {
            NewCommunityVm newCommunityVm = new NewCommunityVm()
            {
                Books        = AccountBc.Instance.GetBooks().ToSelectListItemList(),
                ListingTypes = ConverterHelpers.EnumToCheckBoxList <ListingType>(),
                SeniorHousingAndCareCategories = ConverterHelpers.DictionaryToCheckBoxList(MSLivingChoices.Bcs.Admin.Components.ItemTypeBc.Instance.GetSHCCategoriesForCommunity()),
                AgeRestrictions = ConverterHelpers.EnumToCheckBoxList <AgeRestriction>(),
                Address         = AdminViewModelsProvider.GetAddressVm(),
                PhoneList       = AdminViewModelsProvider.GetPhoneList(CommunityType.Community)
            };

            newCommunityVm.PhoneList.AdditionalPhones.ForEach((PhoneVm ph) => ph.PhoneTypes.RemoveAll((SelectListItem pt) => pt.get_Text().Contains("Provision")));
            newCommunityVm.EmailList = AdminViewModelsProvider.GetEmailListVm(CommunityType.Community);
            newCommunityVm.Contacts  = new List <ContactVm>()
            {
                AdminViewModelsProvider.GetContactVm(CommunityType.Community)
            };
            newCommunityVm.OfficeHours = new List <OfficeHoursVm>()
            {
                AdminViewModelsProvider.GetOfficeHoursVm()
            };
            newCommunityVm.CommunityDetails = AdminViewModelsProvider.GetCommunityDetailsVm();
            newCommunityVm.ListingDetails   = AdminViewModelsProvider.GetListingDetailsVm();
            return(newCommunityVm);
        }
示例#3
0
 public static OwnerVm GetOwnerVm(OwnerType ownerType)
 {
     return(new OwnerVm()
     {
         NewOwner = new NewOwnerVm()
         {
             Address = AdminViewModelsProvider.GetAddressVm(),
             PhoneList = AdminViewModelsProvider.GetPhoneList(ownerType),
             EmailList = AdminViewModelsProvider.GetEmailListVm(ownerType),
             Contacts = new List <ContactVm>()
             {
                 AdminViewModelsProvider.GetContactVm(ownerType)
             },
             LogoImages = new ImageListVm(ownerType.MapToDisplayName()),
             OwnerType = ownerType
         },
         Owners = (
             from m in OwnerBc.Instance.GetAllByOwnerType(ownerType)
             select new SelectListItem()
         {
             Value = m.Id.ToString(),
             Text = m.Name
         }).ToList <SelectListItem>()
     });
 }
 public static NewOwnerVm GetNewOwnerVm(OwnerType ownerType)
 {
     return(new NewOwnerVm()
     {
         OwnerType = ownerType,
         Address = AdminViewModelsProvider.GetAddressVm(),
         PhoneList = AdminViewModelsProvider.GetPhoneList(ownerType),
         EmailList = AdminViewModelsProvider.GetEmailListVm(ownerType),
         Contacts = new List <ContactVm>()
         {
             AdminViewModelsProvider.GetContactVm(ownerType)
         },
         LogoImages = new ImageListVm(ownerType.MapToDisplayName())
     });
 }
 public static OwnerVm GetOwnerVm(OwnerType ownerType)
 {
     return(new OwnerVm()
     {
         NewOwner = new NewOwnerVm()
         {
             Address = AdminViewModelsProvider.GetAddressVm(),
             PhoneList = AdminViewModelsProvider.GetPhoneList(ownerType),
             EmailList = AdminViewModelsProvider.GetEmailListVm(ownerType),
             Contacts = new List <ContactVm>()
             {
                 AdminViewModelsProvider.GetContactVm(ownerType)
             },
             LogoImages = new ImageListVm(ownerType.MapToDisplayName()),
             OwnerType = ownerType
         },
         Owners = OwnerBc.Instance.GetAllByOwnerType(ownerType).Select <Owner, SelectListItem>((Owner m) => {
             SelectListItem selectListItem = new SelectListItem();
             selectListItem.set_Value(m.Id.ToString());
             selectListItem.set_Text(m.Name);
             return selectListItem;
         }).ToList <SelectListItem>()
     });
 }