コード例 #1
0
        public async Task <ActionResult> RemoveTemplate(int id)
        {
            var template = await TemplatesHandler.FindById(id);

            TemplatesHandler.Remove(template);
            return(RedirectToAction("DocumentTemplates"));
        }
コード例 #2
0
        public async Task <ActionResult> DeletePosition(int id)
        {
            var position = await _positionsHandler.FindById(id);

            if (position != null)
            {
                _positionsHandler.Remove(position);
            }
            return(RedirectToAction("Positions"));
        }
コード例 #3
0
        public async Task <ActionResult> RemoveDocumentType(int id)
        {
            var type = await DocumentTypesHandler.FindById(id);

            if (type != null)
            {
                DocumentTypesHandler.Remove(type);
            }
            return(RedirectToAction("DocumentTypes"));
        }
コード例 #4
0
        public async Task <ActionResult> DeleteRole(int id)
        {
            var role = await RolesHandler.FindById(id);

            if (role != null)
            {
                RolesHandler.Remove(role);
            }
            return(RedirectToAction("Roles"));
        }