<%@ page import="com.csc.library.entry.*,com.csc.library.utilities.*,com.csc.library.session.*,com.csc.library.database.*,java.util.*"  contentType="text/html;charset=UTF-8"%>
<jsp:useBean id="PRU064" scope="page" class="com.csc.library.system.Task"/><%
PRU064.setChannel(request ,response);
UIManager screen=(UIManager)PRU064.process("ChildEntry","MEMPL_ASSESSOR_ADMIN");
%>
<html ng-app="myHR">
	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
		<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 src="../JS/DATEINPUT.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 goHelp(helpName,inputName){
				var helpReturn;
				if(inputName=="__employeelist"){
					helpReturn="__employeelist:employeeid,MEMPLOYEE@TFULLNAME,MEMPLOYEE@EFULLNAME";
				}
				linkHelp_Return(helpName,helpReturn);
			}
			/*
			function  setchd(action){
				if(nullCheck()){
					with(document.cscform){
						bcon = conf
						if (bCon==true)	{
							if(action=="save"){
								__cmdchild.value="save";
							}
						}else{
							alert(MyCode[0]);
						}
						submit();						
					}
				}
			}*/

			function back(){
				with(window.opener.document.cscform){
					__cmd.value = 'ack';
					submit();	    
				}
			}

			//-->
		</script>
	</head>
	<body>
		<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 -------------------------->
			<script language="javascript">getInputFormatDate();</script>
			<input type="hidden" name="__language" value='<%=screen.getUProfile().get("lang")%>'>
			<input type="hidden" name="__cmd" value="">
			<input type="hidden" name="__sysisedit" value="">
			<input type="hidden" name="__calendar" value="">
			<input type="hidden" name="__cmdchild" value="">
			<input type="hidden" name="__headMulti" value="<%=request.getParameter("__headMulti")%>">
			<input type="hidden" name="__screen" value="MEMPL_ASSESSOR_ADMIN">
			<input type="hidden" name="__ack" value="">
			<input type="hidden" name="__help" value="">
			<input type="hidden" name="__lastrec" value="">
			<input type="hidden" name="__maxrec" value="<%=screen.getTable("MEMPL_ASSESSOR_ADMIN").recCount()%>">
			<input type="hidden" name="__gorec" value="<%=request.getParameter("__gorec")%>">
			<input type="hidden" name ="__employeeid" value="<%=request.getParameter("__employeeid")%>">
			<input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>">
			<input type="hidden" name="__fixCon" value="">
			<input type="hidden" name="__notNull" value="<%=screen.getRequire()%>">
			<input type="hidden" name="__referPage" value="">
			<%
				int lineno=1;

				if((request.getParameter("__gorec")!=null)&&(!request.getParameter("__gorec").equals(""))){
					lineno= Integer.parseInt(request.getParameter("__gorec").toString());
			%>
			<%	
					}else{
						if(screen.getTable("MEMPL_ASSESSOR_ADMIN").recCount()==0){
						lineno=1;
					}else{
						screen.getTable("MEMPL_ASSESSOR_ADMIN").last();
						String lastrec=screen.getTable("MEMPL_ASSESSOR_ADMIN").getString("LINE_NO");
						lineno=Integer.parseInt(lastrec)+1;
					}
				}	 
			%>

			<input type="hidden" name="__line_no" value="<%=lineno%>">
			<div align="center">
				<table cellspacing="0">
					<tr>
						<td class="header" colspan="2">APS301_1,<span>Define Approver By Admin</span>&nbsp;</td>
					</tr>
					<tr>
						<td><table cellpadding="0"  cellspacing="0">
					<tr>
						<td colspan="2"  class="blankspace"></td>
					</tr>
					<tr>
						<td class="columnlabel"><%=screen.getLabel("employeelist")%>&nbsp;</td>
						<td  class="columnobject1"><%=screen.getInput("employeelist")%></td>
					</tr>
					<%
						String tname="";
						String ename="";
						if(!screen.getDataLabel("employeelist").equals("")){
							DbInquiry emp = new InitialInquiry(screen.getUProfile()).getDbInquiry("memployee");
							emp.setColumn("*");
							emp.setFilter("employeeid = '"+screen.getDataLabel("employeelist")+"'");
							emp.refresh();
							emp.referLangOn();
							emp.next();

							tname = emp.getString("tfullname");
							ename = emp.getString("efullname");
						}
					%>
					<tr> 
						<td class="columnlabel"><%=screen.getUProfile().get("lang").equalsIgnoreCase("ENG")?"Fullname(TH)":"ชื่อ-นามสกุล(ไทย)"%>&nbsp;</td>
						<td>
							<input name="MEMPLOYEE@TFULLNAME" type="text" readonly size="60" value="<%=tname%>">
						</td>
					</tr>	
					<tr> 
						<td class="columnlabel"><%=screen.getUProfile().get("lang").equalsIgnoreCase("ENG")?"Fullname(ENG)":"ชื่อ-นามสกุล(อังกฤษ)"%>&nbsp;</td>
						<td>
							<input name="MEMPLOYEE@EFULLNAME" type="text" readonly size="60" value="<%=ename%>">
						</td>
					</tr>				
					<tr>
						<td class="columnlabel"><%=screen.getLabel("status")%>&nbsp;</td>
						<td  class="columnobject1"><%=screen.getInput("status")%></td>
					</tr>	<tr>
						<td colspan="2"  class="blankspace"></td>
					</tr>
					<tr>
						<td colspan="2" class="buttonline"  >
							<a href="javascript:saveChild();"><img src="../IMAGES/BUTTON/OK.gif" border="0"></a>&nbsp;&nbsp; 
							<a href="javascript:backhead();"><img src="../IMAGES/BUTTON/BACK.gif" border="0"></a>
						</td>
					</tr>
				</table>
			</div>
			<% 
				if((request.getParameter("__cmdchild")!=null)&&(!request.getParameter("__cmdchild").equals(""))){%>
				<script language="javascript">back();</script>
			<%}%>
		</form>
	</body>
</html>
