public async Task <PartialViewResult> ContentSelector(int id) { if (id != 0) { var output = await _mpChannelAppService.Get(new EntityDto <int>(id)); var viewModel = new CreateOrEditMpChannelViewModel(output); ReplyPartialModel model = JsonConvert.DeserializeObject <ReplyPartialModel>(JsonConvert.SerializeObject(output)); return(PartialView("_ContentSelector", model)); } else { return(PartialView("_ContentSelector", new ReplyPartialModel())); } }
public async Task <PartialViewResult> CreateOrEditModal(int id) { if (id != 0) { var output = await _mpChannelAppService.Get(new EntityDto <int>(id)); var viewModel = new CreateOrEditMpChannelViewModel(output); viewModel.Tags = await _mpFansTagAppService.GetAllTags(new MpFansTags.Dto.GetMpFansTagsInput()); return(PartialView("_CreateOrEditModal", viewModel)); } else { var mpid = await _userMpAppService.GetDefaultMpId(); var viewModel = new CreateOrEditMpChannelViewModel() { MpID = mpid }; viewModel.Tags = await _mpFansTagAppService.GetAllTags(new MpFansTags.Dto.GetMpFansTagsInput()); return(PartialView("_CreateOrEditModal", viewModel)); } }