示例#1
0
        public PartialViewResult DeleteOrganizationType(OrganizationTypePrimaryKey organizationTypePrimaryKey)
        {
            var organizationType = organizationTypePrimaryKey.EntityObject;
            var viewModel        = new ConfirmDialogFormViewModel(organizationType.OrganizationTypeID);

            return(ViewDeleteOrganizationType(organizationType, viewModel));
        }
示例#2
0
        public PartialViewResult EditOrganizationType(OrganizationTypePrimaryKey organizationTypePrimaryKey)
        {
            var organizationType = organizationTypePrimaryKey.EntityObject;
            var viewModel        = new EditOrganizationTypeViewModel(organizationType);

            return(ViewEditOrganizationType(viewModel));
        }
示例#3
0
        public ActionResult DeleteOrganizationType(OrganizationTypePrimaryKey organizationTypePrimaryKey, ConfirmDialogFormViewModel viewModel)
        {
            var organizationType = organizationTypePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewDeleteOrganizationType(organizationType, viewModel));
            }
            organizationType.DeleteFull(HttpRequestStorage.DatabaseEntities);
            return(new ModalDialogFormJsonResult());
        }
示例#4
0
        public ActionResult EditOrganizationType(OrganizationTypePrimaryKey organizationTypePrimaryKey, EditOrganizationTypeViewModel viewModel)
        {
            var organizationType = organizationTypePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewEditOrganizationType(viewModel));
            }
            viewModel.UpdateModel(organizationType, CurrentPerson);
            return(new ModalDialogFormJsonResult());
        }