First Commit - Source Code from Reply
This commit is contained in:
178
dbcmnpsrc/FE/mnpdev/mnp/web/jsp/TaskPic.jsp
Normal file
178
dbcmnpsrc/FE/mnpdev/mnp/web/jsp/TaskPic.jsp
Normal file
@@ -0,0 +1,178 @@
|
||||
<%@page import = "java.io.*, javax.servlet.*, javax.servlet.http.*, java.util.*, java.io.*, java.net.*"%>
|
||||
<%@page import = "java.awt.print.*"%>
|
||||
<%@page import = "mnp.database.*,mnp.utility.ui.PageLoader,mnp.database.hb.dto.MnpTaskPic,mnp.database.hb.dto.MnpTaskPicId"%>
|
||||
<%@page import = "mnp.objects.*, mnp.utility.ui.Res,mnp.objects.ui.TaskPicBean,mnp.utility.DateUtils,java.text.*"%>
|
||||
<jsp:include page="/jsp/VerificheScript.txt" flush = "true"/>
|
||||
|
||||
<HTML>
|
||||
<TITLE>Mnp</TITLE>
|
||||
<BODY>
|
||||
|
||||
|
||||
<jsp:useBean id="taskPicBean" scope="request" class="mnp.objects.ui.TaskPicBean"/>
|
||||
|
||||
<!-- COPY -->
|
||||
<!-- tabella che include il menu verticale -->
|
||||
<!-- COPY -->
|
||||
<!-- tabella che include il menu verticale -->
|
||||
<table width = "100%" class = "tableBannerRosso" border = "0">
|
||||
<tr>
|
||||
<td align = "left" width = "100%"><IMG border = "0" SRC ="<%=Res.ApplContext%>/images/banner.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--fine tabella x menu -->
|
||||
<table width = "100%" >
|
||||
<tr>
|
||||
<td width = "10%">
|
||||
<jsp:include page="/jsp/GUI/Banner.jsp" flush = "true"/>
|
||||
</td>
|
||||
<td align = "left" valign = "top" width = "90%">
|
||||
<!--fine tabella x menu -->
|
||||
<!-- /COPY -->
|
||||
<br>
|
||||
<br>
|
||||
<b><i><P class = "titolo" align = 'right'>TASK PIC</P></i></b>
|
||||
|
||||
|
||||
<FORM NAME= "frmTaskPic" ENCTYPE="multipart/form-data" METHOD="POST" ACTION="<%=Res.ApplContext%>/FileUploadServlet">
|
||||
<!-- per riconoscere che pagina è -->
|
||||
<INPUT TYPE= "hidden" NAME= "pageTaskPic"></INPUT>
|
||||
<!-- dati -->
|
||||
<TABLE width = "100%" BORDER= "1" class ="border">
|
||||
<%
|
||||
int toRecovery=0;
|
||||
PageLoader pageLoader = new PageLoader();
|
||||
TaskPicBean tBean = new TaskPicBean ();
|
||||
String errore="";
|
||||
if (session.getAttribute("taskPicBean")!=null) {
|
||||
tBean = (TaskPicBean)session.getAttribute("taskPicBean");
|
||||
session.removeAttribute("taskPicBean");
|
||||
}
|
||||
else {
|
||||
tBean = pageLoader.getTaskPicBean();
|
||||
}
|
||||
if (tBean==null || tBean.getTaskPic()== null || tBean.getTaskPic().length==0){
|
||||
errore="Non esistono Task Pic da recuperare!";
|
||||
}
|
||||
else {
|
||||
MnpTaskPic[] tPic = tBean.getTaskPic();
|
||||
errore=tBean.getEsitoOperazione();
|
||||
toRecovery=tPic.length;
|
||||
String dataTask="";
|
||||
String opDon="";
|
||||
String opRec="";
|
||||
String totPic="";
|
||||
String totOf="";
|
||||
String totWl="";
|
||||
%>
|
||||
<TR>
|
||||
<TH><P class = "normale"> Data Task </P></TH>
|
||||
<TH ><P class = "normale">Op. Donating </P></TH>
|
||||
<TH ><P class = "normale">Op. Recipient</P></TH>
|
||||
<TH ><P class = "normale">Tot. Accettate</P></TH>
|
||||
<TH ><P class = "normale">Tot. Waiting List</P></TH>
|
||||
<TH ><P class = "normale">Tot. Overflow</P></TH>
|
||||
<TH ><P class = "normale">Restart</P></TH>
|
||||
</tr>
|
||||
<%
|
||||
for(int i=0;i< tPic.length ;i++){
|
||||
MnpTaskPic task= tPic[i];
|
||||
opDon=task.getId().getIdOperatoreDon();
|
||||
opRec=task.getId().getIdOperatoreRec();
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
dataTask=sdf.format(task.getId().getDataTask());
|
||||
totPic=""+task.getTotRichAccettate().intValue();
|
||||
totOf=""+task.getTotRichOf().intValue();
|
||||
totWl=""+task.getTotRichWaitinglist().intValue();
|
||||
%>
|
||||
<INPUT TYPE="hidden" NAME="frmDataTask" VALUE = "<%=dataTask%>" >
|
||||
<INPUT TYPE="hidden" NAME="frmOpDonating" VALUE = "<%=opDon%>" >
|
||||
<INPUT TYPE="hidden" NAME="frmOpRecipient" VALUE = "<%=opRec%>" >
|
||||
<INPUT TYPE="hidden" NAME="frmTotPic" VALUE = "<%=totPic%>" >
|
||||
<INPUT TYPE="hidden" NAME="frmTotWl" VALUE = "<%=totWl%>" >
|
||||
<INPUT TYPE="hidden" NAME="frmTotOf" VALUE = "<%=totOf%>" >
|
||||
<TR>
|
||||
<TD align="center" valign="center"><P class = "normale"><%=dataTask%></P>
|
||||
</TD>
|
||||
<TD align="center" valign="center"><P class = "normale"><%=opDon%></P>
|
||||
</TD>
|
||||
<TD align="center" valign="center"><P class = "normale"><%=opRec%></P>
|
||||
</TD>
|
||||
<TD align="center" valign="center"><P class = "normale"><%=totPic%></P>
|
||||
</TD>
|
||||
<TD align="center" valign="center"><P class = "normale"><%=totWl%></P>
|
||||
</TD>
|
||||
<TD align="center" valign="center"><P class = "normale"><%=totOf%></P>
|
||||
</TD>
|
||||
<TD align="center" valign="center"><P class = "normale"></P>
|
||||
<input type="radio" name="frmRadio" value="<%=i %>" >
|
||||
</TD>
|
||||
</tr>
|
||||
|
||||
<% }
|
||||
}%>
|
||||
<% if(errore!=null && errore.length()>0) {%>
|
||||
<TR>
|
||||
<TD colspan="7"><P class = "alert"> <%=errore%> </P></TD>
|
||||
</TR>
|
||||
<% }%>
|
||||
</TABLE>
|
||||
<BR>
|
||||
|
||||
|
||||
<!-- pulsanti -->
|
||||
<BR><BR><HR class = "riga">
|
||||
<TABLE width = "100%">
|
||||
<TR>
|
||||
<TD ALIGN= "CENTER">
|
||||
<%if(toRecovery==0) {%>
|
||||
<INPUT TYPE= "button" NAME= "btnTaskPic" VALUE= "AVVIA TASK" disabled="disabled">
|
||||
<%} else {%>
|
||||
<INPUT TYPE= "button" NAME= "btnTaskPic" VALUE= "AVVIA TASK" onclick="javascript:setSelectedFields();">
|
||||
<%} %>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<INPUT TYPE="hidden" NAME="pageTaskPic">
|
||||
<INPUT TYPE="hidden" NAME="selectedDataTask" VALUE = "" >
|
||||
<INPUT TYPE="hidden" NAME="selectedDonating" VALUE = "" >
|
||||
<INPUT TYPE="hidden" NAME="selectedRecipient" VALUE = "" >
|
||||
</FORM>
|
||||
|
||||
<!-- tabella x menu -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<SCRIPT>
|
||||
function setSelectedFields(){
|
||||
var bottone = document.forms[0].frmRadio;
|
||||
if( undefined != bottone.length) {
|
||||
for(var i=0; i<bottone.length; i++) {
|
||||
if(bottone[i].checked) {
|
||||
document.forms[0].selectedDataTask.value= document.forms[0].frmDataTask[i].value;
|
||||
document.forms[0].selectedDonating.value= document.forms[0].frmOpDonating[i].value;
|
||||
document.forms[0].selectedRecipient.value= document.forms[0].frmOpRecipient[i].value;
|
||||
document.forms[0].submit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(bottone.checked){
|
||||
document.forms[0].selectedDataTask.value= document.forms[0].frmDataTask.value;
|
||||
document.forms[0].selectedDonating.value= document.forms[0].frmOpDonating.value;
|
||||
document.forms[0].selectedRecipient.value= document.forms[0].frmOpRecipient.value;
|
||||
document.forms[0].submit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
alert("Selezionare un task per la rischedulazione");
|
||||
return false;
|
||||
}
|
||||
</SCRIPT>
|
||||
|
||||
<!-- tabella x menu -->
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
Reference in New Issue
Block a user