Ejemplo n.º 1
0
        public PartialViewResult Edit(TagPrimaryKey tagPrimaryKey)
        {
            var tag       = tagPrimaryKey.EntityObject;
            var viewModel = new EditViewModel(tag);

            return(ViewEdit(viewModel));
        }
Ejemplo n.º 2
0
        public PartialViewResult DeleteTag(TagPrimaryKey tagPrimaryKey)
        {
            var tag       = tagPrimaryKey.EntityObject;
            var viewModel = new ConfirmDialogFormViewModel(tag.TagID);

            return(ViewDeleteTag(tag, viewModel));
        }
Ejemplo n.º 3
0
        public GridJsonNetJObjectResult <Project> ProjectsGridJsonData(TagPrimaryKey tagPrimaryKey)
        {
            var gridSpec = new BasicProjectInfoGridSpec(CurrentFirmaSession, true);
            var projectGeospatialAreas   = tagPrimaryKey.EntityObject.GetAssociatedProjects(CurrentFirmaSession);
            var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <Project>(projectGeospatialAreas, gridSpec);

            return(gridJsonNetJObjectResult);
        }
Ejemplo n.º 4
0
        public ActionResult DeleteTag(TagPrimaryKey tagPrimaryKey, ConfirmDialogFormViewModel viewModel)
        {
            var tag = tagPrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewDeleteTag(tag, viewModel));
            }
            tag.DeleteFull(HttpRequestStorage.DatabaseEntities);
            return(new ModalDialogFormJsonResult());
        }
Ejemplo n.º 5
0
        public ActionResult Edit(TagPrimaryKey tagPrimaryKey, EditViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(ViewEdit(viewModel));
            }
            var tag = tagPrimaryKey.EntityObject;

            viewModel.UpdateModel(tag, CurrentFirmaSession);
            return(new ModalDialogFormJsonResult(SitkaRoute <TagController> .BuildUrlFromExpression(x => x.Detail(tag.TagName))));
        }