Skip to content
Snippets Groups Projects
ProfGUI.java 516 B
Newer Older
Thomas Mewily's avatar
Thomas Mewily committed
package com.uca.gui;

Thomas Mewily's avatar
Thomas Mewily committed
import com.uca.core.*;
import freemarker.template.*;
import java.io.*;
import java.util.*;
Thomas Mewily's avatar
Thomas Mewily committed

public class ProfGUI 
{
    public static String getAllProfs() throws IOException, TemplateException {

        Map<String, Object> input = new HashMap<>();
        input.put("profs", Core.Prof.getAll());
        return DefaultGUI.getDefaultGUI(input, "profs.ftl");
Thomas Mewily's avatar
Thomas Mewily committed
    }

    public static void delete(String id)
    {
        Core.Prof.delete(Core.Prof.getById(Integer.parseInt(id)));
    }
Thomas Mewily's avatar
Thomas Mewily committed
}