package servlet;

import core.process.C_SchoolFillScoreOpinion;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@WebServlet("/home/school-fill-score-opinion")
public class S_SchoolFillScoreOpinion extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String id = request.getParameter("id");
        Map<String,String> vMap = servlet.Utils.getVMap(vName,request);

        C_SchoolFillScoreOpinion p=new C_SchoolFillScoreOpinion();
        p.setGraduationDesignId(id);
        p.setVMap(vMap);
        try {
            p.fillInformation();
        } catch (Exception e) {
            e.printStackTrace();
            response.sendRedirect("/op_fail.jsp");
        }

    }
    static String[] vName = {
            "school_opinion",
            "school_score"
    };
}