<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.*,com.csc.library.system.*,com.csc.library.session.*,com.csc.library.utilities.*,com.csc.library.components.*;"%>
<jsp:useBean id="APS200" scope="page" class="com.csc.library.system.Task"/>
<%
	APS200.setChannel(request ,response);
	UIManager screen=(UIManager)APS200.process("MultiEntry","APS200");

	MultiLine multi = screen.getMultiLine("MGRADEHISTORY");
	if((request.getParameter("__cmd")!=null)&&(request.getParameter("__cmd").equals("search"))){
		screen.getTable("MGRADEHISTORY").setKeyOff();
		screen.getTable("MGRADEHISTORY").setFilter("companyid='"+screen.getUProfile().get("companyid")+"' and  employeeid='"+request.getParameter("__employeeid")+"'");
		screen.getTable("MGRADEHISTORY").refresh();
	}
	
	screen.getTable("MGRADEHISTORY").last();
	String lastrec=screen.getTable("MGRADEHISTORY").getString("LINE_NO");
	multi.setLabelBox("check box");
	multi.goFirst();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html ng-app="myHR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<link href="../CSS/bootstrap.css" rel="stylesheet"  type="text/css">
<link href="../CSS/bootstrap_csc_backend.css" rel="stylesheet"  type="text/css">
<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src="../JS/bootstrap.js"></script>
<script type='text/javascript' src='../JS/SCREEN.js'></script>
<script src="../JS/angular-1.3.15/angular.js" type="text/javascript"></script>
<script src="../JS/ANGULAR/SCREEN_ANGULAR.js" type="text/javascript"></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="javascript">getTitleName();</script>
<script language='javascript' src='../JS/EMPLOYEE.js'></script>
<script src="../JS/VIEWCALENDAR.js"></script>
<script language="JavaScript" src='../JS/ICONSMENU.js'></script>
<script language='javascript' src='../JS/HOTKEY.js'></script>
<script language="JavaScript" type="text/JavaScript">
<!--

function linkChildPru(page){
	with(document.cscform){
			if(__employeeid.value!=""){
		   window.open(page+".jsp?__gorec="+__gorec.value+"&__ack=add&__headMulti="+
		   __headMulti.value+"&__RecNo="+__maxrec.value+"&__employeeid="+__employeeid.value+
		   "&__line_no="+__line_no.value,"Child","left=150,top=20,width=700,height=600,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
	  }else{
		     alert(MyCode[0]);
		     __employeeid.focus();
			 __employeeid.select();
		 }
	}
}
//-->

function GoSave(){
		//setAfterUpdate();
		confirmSave();
}
function GoUpdate(){
		//setAfterUpdate();
		update();
}
function GoDelete(){
		alert(MyCode[150]);
		//edelete();
}
function GoSearch(){
 		with(document.cscform){
		        __help.value="__employeeid#"+__employeeid.value;
		}
		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+
			 "&__line_no="+__line_no.value,"Child","left=150,top=20,width=700,height=600,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
		}
	}

	function deleteMulti(){
		with(document.cscform){
			bCon=confirm(MyCode[4]);
	 	  	if (bCon==true)	{	
				__cmd.value="DelChild";
				submit();
			}	
		}
	}
</script>

</head>

<body leftmargin="0" topmargin="0" onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif')" >
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post" action="?">



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

<%=screen.InitialVariable()%>

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

<input type="hidden" name="__cmd" value="">
<input type="hidden" name="__screen" value="APS200">
<input type="hidden" name="__calendar">
	<input type="hidden" name="__notNull" value="<%=screen.getRequire()%>">	
<input name="__notdelall" type="hidden" value="true">
<input type="hidden" name="__help" value="">
<input type="hidden" name="__fixCon" value="">
<input type="hidden" name="__gorec" value="">
<input type="hidden" name="__headMulti" value="APS200">
<input type="hidden" name="__childMulti" value="APS200_1">
<input type="hidden" name="__multiTable" value="MGRADEHISTORY">
<input type="hidden" name="__ack" >
<input type="hidden" name="__maxrec" value="<%=screen.getTable("MGRADEHISTORY").recCount()%>">
<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
<input type="hidden" name="__companyid"  value='<%=screen.getUProfile().get("companyid")%>'>
<input type="hidden" name="__afterUpdate" value="">
<input type="hidden" name="__referPage" value="">
<input type="hidden" name="__emp_level" value="<%=screen.getDataLabel("emp_level")%>">
<script language="javascript">getInputFormatTimestamp();</script>
<script language="javascript">initToolTips();</script>
<script language="javascript"> 
	//var titlename=swap2String('Experience Detail'); 
	var swap = new swaplang();
	var titlename = swap.swap2String("SW012687");
	document.write(Icons("APS200,"+titlename)); 
</script>

<br>
<div align="center">
<table cellpadding="0"  cellspacing="0" class="large"  >
	<tr> 
		<td class="header"><strong>APS200, <span swlang code="SW012687">Grade History Table</span>&nbsp;</td>
	</tr>
	<tr > 
		<td><br>
	<table border="1" cellpadding="0" cellspacing="0" class="largest" align="center">
		<tr> 
			<td>
				<table  cellspacing="0" cellpadding="0" class="inframe">
					<tr> 
						<td></td>
						<td></td>
					</tr>
					<tr> 
						<td class="columnlabel"><%=screen.getLabel("employeeid")%>&nbsp;</td>                      
						<td><%=screen.getInput("employeeid")%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=screen.getLabel("status")%>&nbsp;<%=screen.getInput("status")%> </td>
					</tr>
					<tr> 
						<td class="columnlabel"><%=screen.getLabel("fname")%>&nbsp;</td>
						<td><input type="hidden" name="__emp_prefix" value="<%=screen.getDataLabel("MPREFIX","PREFIXID")%>"> 
							<input name="MPREFIX@TDESC" type="text" readonly size="10" value="<%=screen.getDataLabel("MPREFIX","TDESC")%>"> 
							&nbsp; <input name="__fname" type="text" readonly size="20" value="<%=screen.getDataLabel("fname")%>"> 
							<input name="__lname" type="text" readonly size="20" value="<%=screen.getDataLabel("lname")%>"></td>
					</tr>
					<tr> 
						<td class="columnlabel"><%=screen.getLabel("efname")%>&nbsp;</td>
						<td><input name="MPREFIX@EDESC" type="text" readonly size="10" value="<%=screen.getDataLabel("MPREFIX","EDESC")%>"> 
							&nbsp; <input name="__efname" type="text" readonly size="20" value="<%=screen.getDataLabel("efname")%>"> 
							<input name="__elname" type="text" readonly size="20" value="<%=screen.getDataLabel("elname")%>"></td>
					</tr>
					<tr> 
						<td>&nbsp; </td>
						<td>&nbsp; </td>
					</tr>
				</table>			
			</td>
		</tr>
	</table>
		<br>
		<table border="1" cellpadding="0" cellspacing="0"   align="center" class="largest">
			<tr> 
				<td>
					<table cellpadding="0" cellspacing="0"   class="inframe">
				<tr> 
					<td>
						<table border="0" cellpadding="0" cellspacing="1" bgcolor="#333333" id="rsTable" name="rsTable" class="inframe tablewithborder" >
							<tr bgcolor="#3366CC"> 
								<td width="30" class="row3"><div align="center"><span swlang code="SW000289">Del</span></div></td>
								<td width="40" class="row3"><div align="center"><span swlang code="SW000193">Seq</span></div></td>
								<td width="136" class="row3"><div align="center"><span swlang code="SW000274">Employee ID</span></div></td>
								<td width="93" class="row3"><div align="center"><span swlang code="SW000717">Year</span></div></td>
								<td width="93" class="row3"><div align="center"><span swlang code="SW000069">Grade</span></div></td>
								<td width="93" class="row3"><div align="center"><span swlang code="SW000013">Score</span></div></td>
								<td width="159" class="row3"><div align="center"><span swlang code="SW012707">Grade Type</span></div></td>
							</tr>
						<%
					  		for(int i=1;!multi.eof();multi.next(),i++) { 				
								multi.getTable().getCurrentRecordManager().referLangOn();
						%>
							<tr> 
								<td class="forborder" align="center"> <%=multi.getInputCheckBox()%></td>
								<td class="forborder" align="center"><a href="javaScript:childMulti('<%=multi.getData("MGRADEHISTORY","LINE_NO")%>')"><%=i%></a></td>
								<td class="forborder" align="center"> <%=multi.getData("MGRADEHISTORY","employeeid")%> </td>
								<td class="forborder" align="center"><%=multi.getData("MGRADEHISTORY","year")%></td>
								<td class="forborder" align="center"><%=multi.getData("MGRADEHISTORY","Grade")%></td>
								<td class="forborder" align="center"><%=multi.getData("MGRADEHISTORY","Score")%></td>
								<td class="forborder" align="center"><%=multi.getSystemCode("type")%></td>

								</td>
							</tr>
						<%
								multi.getTable().getCurrentRecordManager().referLangOff();
							}
						%>     			  
						</table>	
							<input  type="hidden" name="__line_no" value='<%//=multi.getData("MGRADEHISTORY","LINE_NO")%>'> 
					</td>
				</tr>
					</table>			
				</td>
			</tr>
		</table>	
		</td>
	</tr>
<tr>
  <td  class="blankspace"></td>
</tr>
	<tr>
		<td  class="buttonline" colspan="7"><div align="center">
			<button type="button" class="btn btn-primary width100" swlang code="SW013163" onClick="checkAll();">Select All</button>&nbsp;
			<button type="button" class="btn btn-primary width100" swlang code="SW013164" onClick="decheckAll();">Deselect All</button>&nbsp;
			<button type="button" class="btn btn-primary width100" swlang code="SW013165" onClick="linkChildPru('APS200_1');">Add</button>&nbsp;
			<button type="button" class="btn btn-primary width100" swlang code="SW013166" onClick="deleteMulti();">Delete</button>
		</div>
		</td>
	</tr>
	<tr>
		<td  class="blankspace"></td>
    </tr>
	<tr> 
        <td align="right"><script language="javascript">printEditCheck('<%=screen.getDataLabel("edit_by")%>','<%=screen.getDataLabel("edit_date")%>','<%=screen.getDataLabel("edit_time")%>','<%=screen.getDataLabel("approve")%>');</script>&nbsp;&nbsp;
		</td>
    </tr>
	<tr>
        <td  class="blankspace"></td>
    </tr>
<tr> 
	<td  class="bottom"></td>
</tr>
</table>
</div>
<script language="javascript">setEmpIdformenu(document.cscform.__employeeid.value);</script>


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

<%=screen.endJSP()%>

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

</form>
<!-- <script language="JavaScript">checkConfirm();</script></FORM> -->
</body>
</html>
