コード例 #1
0
 private IVmBase GetPhoneChannelData(VmPhoneChannel model)
 {
     switch (model.Action)
     {
         case ActionTypeEnum.Save:
             return channelService.SavePhoneChannel(model);
         case ActionTypeEnum.SaveAndValidate:
             return channelService.SaveAndValidatePhoneChannel(model);
         default:
             return channelService.SavePhoneChannel(model);
     }
 }
コード例 #2
0
 public IServiceResultWrap SavePhoneChannel([FromBody] VmPhoneChannel model)
 {
     return serviceManager.CallService(
         () => new ServiceResultWrap
         {
             Data = GetPhoneChannelData(model)
         },
         new Dictionary<Type, string>()
         {
             { typeof(string), EntityMessageSaved },
             { typeof(PtvArgumentException), MessageArgumentException },
             { typeof(RoleActionException), model.Id.HasValue ? MessageSaveChannelRole : MessageAddChannelRole }
         }
     );
 }
コード例 #3
0
 public void PrefilterViewModel(VmPhoneChannel vm)
 {
     PrefilterViewModel(vm.Step2Form);
 }