资源简介

java实验室排课系统,基于贪婪和穷举,并且支持二次排课,开发环境eclipse ee mysql tomcat,遇到问题可以咨询我634118906

资源截图

代码片段和文件信息

package com.cheea.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.cheea.entity.ClassroomApplication;
import com.cheea.entity.User;
import com.cheea.excption.DatabaseException;
import com.cheea.excption.RutimeException;
import com.cheea.excption.ServiceException;
import com.cheea.factory.AutoobjectFactory;
import com.cheea.service.ClassroomApplicationService;

public class AddClassroomApplicationByAdmin extends ComAction {

@Override
public object doService(HttpServletRequest request
HttpServletResponse response) throws ServiceException
RutimeException DatabaseException {
PrintWriter out=null;
try {
out=response.getWriter();
} catch (IOException e1) {
e1.printStackTrace();
}
//Mapject> map=getobject(request);
HttpSession session=request.getSession();
     User user=(User) session.getAttribute(“user“);
ClassroomApplicationService ser=(ClassroomApplicationService) AutoobjectFactory.getInstance(“ClassroomApplicationServiceImpl“);
try {
if(request.getParameter(“jssqId“)!=null&&request.getParameter(“jssqId“)!=““){
ClassroomApplication c= new ClassroomApplication();
c.setClassName(request.getParameter(“ClassName“));
    c.setClassTime(request.getParameter(“ClassTime“));
    c.setCourseName(request.getParameter(“CourseName“));
    c.setStudentNumber(Integer.parseInt(request.getParameter(“StudentNumber“)));
    c.setTeacher(request.getParameter(“Teacher“));
    c.setNextClassTime(request.getParameter(“NextClassTime“));
    c.setId(Integer.parseInt(request.getParameter(“jssqId“)));
    c.setUserId(user.getName());
    ser.updateClassroomApplication(c);
}else{
ClassroomApplication c= new ClassroomApplication();
c.setClassName(request.getParameter(“ClassName“));
    c.setClassTime(request.getParameter(“ClassTime“));
    c.setCourseName(request.getParameter(“CourseName“));
    c.setStudentNumber(Integer.parseInt(request.getParameter(“StudentNumber“)));
    c.setTeacher(request.getParameter(“Teacher“));
    c.setNextClassTime(request.getParameter(“NextClassTime“));
    c.setUserId(user.getName());
    ser.addClassroomApplication(c);
}

} catch (Exception e) {
out.print(“fail“);
}
out.print(“ok“);
return null;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-05-17 20:26  Work\
     文件         962  2015-06-06 19:26  Work\.classpath
     文件        1037  2012-05-27 13:11  Work\.project
     目录           0  2015-03-18 23:18  Work\.settings\
     文件         503  2012-05-27 13:11  Work\.settings\.jsdtscope
     文件         107  2015-03-18 23:39  Work\.settings\org.eclipse.core.resources.prefs
     文件         395  2012-05-27 13:11  Work\.settings\org.eclipse.jdt.core.prefs
     文件         541  2012-05-27 13:11  Work\.settings\org.eclipse.wst.common.component
     文件         345  2012-05-27 13:11  Work\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2012-05-27 13:11  Work\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2012-05-27 13:11  Work\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2015-05-24 16:37  Work\WebContent\
     目录           0  2015-03-18 23:18  Work\WebContent\EasyUI\
     文件        8937  2012-05-27 13:11  Work\WebContent\EasyUI\changelog.txt
     目录           0  2015-03-18 23:18  Work\WebContent\EasyUI\demo\
     文件        2408  2012-05-27 13:11  Work\WebContent\EasyUI\demo\accordion.html
     文件         849  2012-05-27 13:11  Work\WebContent\EasyUI\demo\calendar.html
     文件        1577  2012-05-27 13:11  Work\WebContent\EasyUI\demo\combo.html
     文件        3886  2012-05-27 13:11  Work\WebContent\EasyUI\demo\combobox.html
     文件         174  2012-05-27 13:11  Work\WebContent\EasyUI\demo\combobox_data.json
     文件        2014  2012-05-27 13:11  Work\WebContent\EasyUI\demo\combogrid.html
     文件        1744  2012-05-27 13:11  Work\WebContent\EasyUI\demo\combotree.html
     文件        4007  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid.html
     文件        3810  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid2.html
     文件        2403  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid3.html
     文件        1762  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid4.html
     文件        1486  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid5.html
     文件        1149  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid_data.json
     文件        1183  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid_data2.json
     文件        1322  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datagrid_data3.json
     文件        1157  2012-05-27 13:11  Work\WebContent\EasyUI\demo\datebox.html
............此处省略1516个文件信息

评论

共有 条评论