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

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

            return(ViewEditOrganizationType(viewModel));
        }
Exemple #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());
        }
Exemple #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());
        }