상속: IEditableGridItem
예제 #1
0
        public ActionResult DeleteRedirect(SiteSettingRedirectViewModel model)
        {
            var success = GetCommand<DeleteRedirectCommand>().ExecuteCommand(model);
            if (success)
            {
                Messages.AddSuccess(PagesGlobalization.DeleteRedirect_DeletedSuccessfully_Message);
            }

            return Json(new WireJson(success));
        }
예제 #2
0
        public static SiteSettingRedirectViewModel ToServiceModel(this SaveRedirectModel model)
        {
            var serviceModel = new SiteSettingRedirectViewModel();

            serviceModel.Version = model.Version;
            serviceModel.PageUrl = model.PageUrl;
            serviceModel.RedirectUrl = model.RedirectUrl;
            
            return serviceModel;
        }
예제 #3
0
        public ActionResult SaveRedirect(SiteSettingRedirectViewModel model)
        {
            if (ModelState.IsValid)
            {
                var response = GetCommand<SaveRedirectCommand>().ExecuteCommand(model);
                if (response != null)
                {
                    if (model.Id.HasDefaultValue())
                    {
                        Messages.AddSuccess(PagesGlobalization.CreateRedirect_CreatedSuccessfully_Message);
                    }
                    return Json(new WireJson { Success = true, Data = response });
                }
            }

            return Json(new WireJson { Success = false });
        }