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); } }
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 } } ); }
public void PrefilterViewModel(VmPhoneChannel vm) { PrefilterViewModel(vm.Step2Form); }