HomePageProject.jsp
3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="SearchComInfo1" class="weaver.proj.search.SearchComInfo" scope="session" />
<jsp:useBean id="Util" class="weaver.general.Util" scope="page" />
<jsp:useBean id="ProjectStatusComInfo" class="weaver.proj.Maint.ProjectStatusComInfo" scope="page" />
<jsp:useBean id="ProjectTypeComInfo" class="weaver.proj.Maint.ProjectTypeComInfo" scope="page" />
<jsp:useBean id="WorkTypeComInfo" class="weaver.proj.Maint.WorkTypeComInfo" scope="page" />
<jsp:useBean id="spp" class="weaver.general.SplitPageParaBean" scope="page" />
<jsp:useBean id="spu" class="weaver.general.SplitPageUtil" scope="page" />
<%
SearchComInfo1.resetSearchInfo();
int pagenum=Util.getIntValue(request.getParameter("pagenum"),1);
int perpage=Util.getIntValue(request.getParameter("perpage"),1);
boolean hasNextPage=false;
if(perpage<=1 ) perpage=10;
String SearchSql = "";
String SqlWhere = "";
String userid = "" + user.getUID();
if(!SearchComInfo1.FormatSQLSearch(user.getLanguage()).equals("")){
SqlWhere = SearchComInfo1.FormatSQLSearch(user.getLanguage()) +" and t1.id = t2.prjid and t2.usertype="+user.getLogintype()+" and t2.userid="+user.getUID();
}else{
SqlWhere = " where t1.id = t2.prjid and t2.usertype="+user.getLogintype()+" and t2.userid="+user.getUID();
}
int TotalCount = Util.getIntValue(request.getParameter("TotalCount"),0);
spp.setBackFields("t1.id,t1.name,t1.prjtype,t1.worktype,t1.status" );
spp.setSqlFrom("Prj_ProjectInfo t1, prj_taskprocess t2");
spp.setSqlWhere("( t2.hrmid=" +userid+" and t2.prjid=t1.id and t1.isblock=1 ) or (t1.manager="+userid+")");
spp.setSqlOrderBy("t1.id");
spp.setPrimaryKey("t1.id");
spp.setDistinct(true);
spp.setSortWay(spp.DESC);
spu.setSpp(spp);
RecordSet = spu.getCurrentPageRs(pagenum,perpage);
if(TotalCount==0){
TotalCount = spu.getRecordCount();
}
if(TotalCount>pagenum*perpage){
hasNextPage=true;
}
%>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
</HEAD>
<body>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<table class=ListStyle id=tblReport cellspacing=1>
<tbody>
<tr class=Header>
<th colspan = 2 ><%=SystemEnv.getHtmlLabelName(1211,user.getLanguage())%></th>
</tr>
<%
boolean isLight = false;
int totalline=1;
if(RecordSet.last()){
do{
if(isLight)
{%>
<TR CLASS=DataDark>
<% }else{%>
<TR CLASS=DataLight>
<% }%>
<TD><a href="/proj/data/ViewProject.jsp?ProjID=<%=RecordSet.getString("id")%>" target = "mainFrame"><%=RecordSet.getString("name")%></a></TD>
<TD>
<%
//modify by dongping for TD1131
String status = RecordSet.getString("status");
if (status.equals("0")) {
out.println(SystemEnv.getHtmlLabelName(220,user.getLanguage()));
}
else {
out.println(ProjectStatusComInfo.getProjectStatusname(RecordSet.getString("status")));
}
%>
</TD>
</TR>
<%
isLight = !isLight;
if(hasNextPage){
totalline+=1;
if(totalline>perpage) break;
}
}while(RecordSet.previous());
}
%>
</TBODY>
</TABLE>
<TABLE align=right>
<tr>
<td> </td>
<td><%if(pagenum>1){%><button class=btn accessKey=P onclick="location.href='HomePageProject.jsp?pagenum=<%=pagenum-1%>&TotalCount=<%=TotalCount%>'"><U>P</U> - <%=SystemEnv.getHtmlLabelName(1258,user.getLanguage())%></button><%}%></td>
<td><%if(hasNextPage){%><button class=btn accessKey=N onclick="location.href='HomePageProject.jsp?pagenum=<%=pagenum+1%>&TotalCount=<%=TotalCount%>'"><U>N</U> - <%=SystemEnv.getHtmlLabelName(1259,user.getLanguage())%></button><%}%></td>
<td> </td>
</tr>
</TABLE>
</body>
</html>