public TagItemView(TagItemViewModel viewModel) { InitializeComponent(); Size = new Size(80, 20); _viewModel = viewModel; SetupBindings(); }
private TagItemView CreateTagItemView(Tag tag) { var tagItemViewModel = new TagItemViewModel { ParentViewModel = _viewModel }; var tagButton = new TagItemView(tagItemViewModel) { Tag = tag }; return(tagButton); }
public ActionResult DeleteTag(TagItemViewModel tag) { bool success = GetCommand <DeleteTagCommand>().ExecuteCommand( new DeleteTagCommandRequest { TagId = tag.Id, Version = tag.Version }); if (success) { Messages.AddSuccess(RootGlobalization.DeleteTag_DeletedSuccessfully_Message); } return(Json(new WireJson(success))); }
public ActionResult SaveTag(TagItemViewModel tag) { if (ModelState.IsValid) { var response = GetCommand <SaveTagCommand>().ExecuteCommand(tag); if (response != null) { if (tag.Id.HasDefaultValue()) { Messages.AddSuccess(RootGlobalization.CreateTag_CreatedSuccessfully_Message); } return(Json(new WireJson { Success = true, Data = response })); } } return(Json(new WireJson { Success = false })); }