TRE002_1.jsp 7.02 KB
Newer Older
Thitichaipun Wutthisak committed
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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<jsp:useBean id="TRE002_1" class="com.csc.library.system.Task" scope="page"/>
<%
TRE002_1.setChannel(request,response);
UIManager screen = (UIManager)TRE002_1.process("MultiEntry","TRE002",true);
MultiLine multi = screen.getMultiLine("TREQUEST");
CheckNull chkNull = new CheckNull();
String Tstatus = chkNull.chkNullString(request.getParameter("__typetrain"));



multi.setLabelBox("check box");
if(!Tstatus.equals("") ){
		multi.getTable().setFilter("status='"+Tstatus+"'");
		multi.getTable().refresh();
}else{
		multi.getTable().setFilter("status !='all'");
		multi.getTable().refresh();
}

multi.goFirst();
%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link href ="../CSS/TISCO.css" rel="stylesheet" type="text/css"/>
		<script language='javascript' src="../JS/VIEWCALENDAR.js"></script>
		<script type='text/javascript' src='../JS/SCREEN.js'></script>

		<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
		<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
		<script language="javascript">getTitleName();</script>
		<script language="javascript">

		function GoSave(){confirmSave();}
		function GoUpdate(){update();}
		function GoDelete(){alert(MyCode[150]);}
		function GoSearch(){search();}

		function childMulti(record){
			with(document.cscform){
				window.open(__childMulti.value+".jsp?__cmd=&__gorec="+record+
				"&__ack=edit&__employeeid="+__employeeid.value+
				"&__headMulti="+__headMulti.value+
				"&__companyid="+__companyid.value,"","left=150,top=150,width=620,height=350,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
			}
		}

		function addMulti(){
			with(document.cscform){
				if(notBlankOnThisPage()){

					window.open(/*__childMulti.value+*/"TRE002H.jsp?__cmd=&__gorec=&__ack=add"+
					"&__employeeid="+__employeeid.value+
					"&__headMulti="+__headMulti.value+
					"&__companyid="+__companyid.value,"Trainee","left=150,top=150,width=600,height=450,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
				}
			}
		}

		function deleteMulti(){
			with(document.cscform){
				bCon=confirm(MyCode[4]);
				if (bCon==true)	{
					__cmd.value="DelChild";
					submit();
				}
			}
		}
		function setCrs(crsid,sta){
			with(document.cscform){
				if(__myCrs.value==""){
					__myCrs.value+="$";
				}
				__myCrs.value+=crsid+"$"+sta+"$";
			}
		}
		</script>
	</head>

	<body  leftmargin="0" topmargin="0"  onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif')" >
		<div class="centered">
			<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
			<script language="javascript">initToolTips();</script>

			<form name="cscform" method="post" action="TRE002_1.jsp">


				<!----------BEGIN CSC INITIAL ZONE ------------------------>

				<%=screen.InitialVariable()%>

				<!----------END CSC INITIAL ZONE -------------------------->

				<input name="__cmd" type="hidden" value=""/>
				<input type="hidden" name="__calendar"/>
				<script language="javascript">getInputFormatDate();</script>
				<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>"/>
				<input type="hidden" name="__screen" value="TRE002"/>
				<input type="hidden" name="__multiTable" value="TREQUEST"/>
				<input type="hidden" name="__helpReturn" value=""/>
				<input type="hidden" name="__help" value=""/>
				<input type="hidden" name="__childMulti" value="TRE002_2"/>
				<input type="hidden" name="__gorec" value=""/>
				<input type="hidden" name="__ack" value=""/>
				<input type="hidden" name ="__headMulti" value="TRE002"/>
				<input name="__companyid" type="hidden" value="<%=screen.getUProfile().get("companyid")%>"/>
				<input name="__fixCon" type="hidden" value=""/>
				<input name="__notNull" type="hidden" value="<%=screen.getRequire()%>"/>
				<input name="__employeeid" type="hidden" value="<%=screen.getDataLabel("EMPLOYEEID")%>"/>
				<input type="hidden" name="__referPage" value=""/>
				<input type="hidden" name="__myCrs" value=""/>
				<input type="hidden" name="__typetrain" value=""/>

				<div align="center">
					<table border="0" cellpadding="0" cellspacing="1" id="rsTable" name="rsTable"  bgcolor="#333333" class="maxsize" cols="7">
						<%
						if(!multi.eof()){
							%>
							<tr>
								<td class="row3" width = "6%"><div align="center"><script language='javascript'>swapLang('Del');</script></td>
								<td class="row3" width = "12%"><div align="center"><a href="javascript:sortTable(0, rsTable);"><script language='javascript'>swapLang('CourseID');</script></a></div></td>
								<td class="row3" width = "25%"><div align="center"><a href="javascript:sortTable(1, rsTable);"><script language='javascript'>swapLang('Course Name');</script></a></div></td>
								<td class="row3" width = "25%"><div align="center"><a href="javascript:sortTable(2, rsTable);"><script language='javascript'>swapLang('Course Type');</script></a></div></td>
								<td class="row3" width = "12%"><div align="center"><a href="javascript:sortTable(3, rsTable);"><%=multi.getLabel("TREQUEST","SOURCE") %></a></div></td>
								<td class="row3" width = "10%"><div align="center"><a href="javascript:sortTable(4, rsTable);"><%=multi.getLabel("TREQUEST","STATUS") %></a></div></td>
								<td class="row3" width = "10%"><div align="center"><a href="javascript:sortTable(5, rsTable);"><%=multi.getLabel("TREQUEST","DATEREQUEST") %></a></div></td>
							</tr>
							<%
							for(int i=1;!multi.eof();multi.next(),i++){
								%>
								<tr>
									<td class="inframe" ><div align="center"><%=multi.getInputCheckBox()%></div></td>
									<td class="inframe" ><div align="center"><A HREF="javascript:childMulti('<%=multi.getDataLabel("TREQUEST","COURSEID")%>');"><%=multi.getDataLabel("TREQUEST","COURSEID")%></A></div></td>
									<td class="inframe" ><div align="center"><%=multi.getDataLabel("MCOURSE","CRSDESC") %></div></td>
									<td class="inframe" ><div align="center"><%=multi.getDataLabel("MCOURSETYPE","CRSTYDESC") %></div></td>
									<td class="inframe" ><div align="center"><%=multi.getTable().getCurrentRecordManager().getSystemCode("SOURCE")%></div></td>
									<td class="inframe" ><div align="center"><%=multi.getTable().getCurrentRecordManager().getSystemCode("STATUS")%></div></td>
									<td class="inframe" ><div align="center"><%=multi.getDataLabel("TREQUEST","DATEREQUEST") %></div></td>
								</tr>
								<script language='javascript'>setCrs('<%=multi.getDataLabel("TREQUEST","COURSEID")%>','<%=multi.getDataLabel("TREQUEST","STATUS")%>');</script>
								<%
							}
						}
						%>
					</table>
				</div>


				<!----------BEGIN CSC ENDING ZONE ------------------------>

				<%=screen.endJSP()%>

				<!----------END CSC ENDING ZONE -------------------------->

			</form>
			<%
			screen.referLangOff();
			%>
		</div>
	</body>
</html>