Пример #1
0
 public IServiceResultWrap SaveWebPageStep1Changes([FromBody] VmWebPageChannelStep1 model)
 {
     return(serviceManager.CallService(
                () => new ServiceLocalizedResultWrap(model)
     {
         Data = channelService.SaveWebPageChannelStep1(model)
     },
                new Dictionary <Type, string>()
     {
         { typeof(string), MessageChannelStepSave },
         { typeof(PtvArgumentException), MessageArgumentException },
         { typeof(LockException), MessageLockedChannel },
         { typeof(RoleActionException), MessageSaveChannelRole }
     }
                ));
 }
Пример #2
0
        public static VmWebPageChannel CreateVmWebPageChannelModel()
        {
            var step1 = new VmWebPageChannelStep1()
            {
                Emails = new List <VmEmailData> {
                    CreateVmEmailDataModel()
                },
                PhoneNumbers = new List <VmPhone> {
                    CreateVmPhoneModel()
                },
                Languages = new List <Guid>()
                {
                    Guid.NewGuid()
                },
                WebPage = new VmWebPage()
            };

            SetupVmChannelDescriptionModel(step1);
            return(new VmWebPageChannel()
            {
                PublishingStatusId = Guid.NewGuid(),
                Step1Form = step1,
            });
        }