コード例 #1
0
        private PartialViewResult ViewDeleteNeptuneHomePageImage(NeptuneHomePageImage neptuneHomePageImage, ConfirmDialogFormViewModel viewModel)
        {
            var confirmMessage =
                $"Are you sure you want to delete this image? ({neptuneHomePageImage.Caption})";
            var viewData = new ConfirmDialogFormViewData(confirmMessage, true);

            return(RazorPartialView <ConfirmDialogForm, ConfirmDialogFormViewData, ConfirmDialogFormViewModel>(viewData, viewModel));
        }
コード例 #2
0
        public ActionResult New(NewViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(ViewNew(viewModel));
            }
            var neptuneHomePageImage = new NeptuneHomePageImage(-1, null, 0);

            viewModel.UpdateModel(neptuneHomePageImage, CurrentPerson);
            HttpRequestStorage.DatabaseEntities.NeptuneHomePageImages.Add(neptuneHomePageImage);
            return(new ModalDialogFormJsonResult());
        }
コード例 #3
0
        private PartialViewResult ViewEdit(NeptuneHomePageImage neptuneHomePageImage, EditViewModel viewModel)
        {
            var viewData = new EditViewData(neptuneHomePageImage);

            return(RazorPartialView <Edit, EditViewData, EditViewModel>(viewData, viewModel));
        }