<%@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="APS301" scope="page" class="com.csc.library.system.Task"/>
<%
	APS301.setChannel(request ,response);
	UIManager screen=(UIManager)APS301.process("MultiEntry","APS301");
	MultiLine multi = screen.getMultiLine("MEMPL_ASSESSOR_ADMIN");
	screen.getTable("MEMPL_ASSESSOR_ADMIN").setKeyOff();
	multi.setLabelBox("check box");
	screen.getTable("MEMPL_ASSESSOR_ADMIN").last();
	String lastrec=screen.getTable("MEMPL_ASSESSOR_ADMIN").getString("LINE_NO");
	multi.goFirst();

%>
<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 language="JavaScript" src='../JS/ICONSMENU.js'></script>
		<script language='javascript' src='../JS/HOTKEY.js'></script>
		<script language="JavaScript" type="text/JavaScript">

			function NonCheckAll(){
				with (document.cscform) {
					for (i=0;i<checkbox1.length;i++){
						checkbox1[i].checked = false;
					}
				}
			}

			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,"","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 setAdjust(jobcode){
				with(document.forms[0]){
					adj=eval(jobcode);
					alert(adj);
					for (i=0;i<elements.length;i++){
						if(elements[i].id=="check2"){
							if(elements[i].checked){
								adj.value="1";
								break
							}else{
								adj.value="2";
								break
							}
						}
					}
				}
			}

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

			function GoSave(){
				//   setAutosearch('search');
				//	setAfterUpdate();
				confirmSave();
			}

			function GoUpdate(){
				//  setAutosearch('search');
				//	setAfterUpdate();
				update();
			}

			function GoDelete(){
				//setAutosearch('');
				//edelete();
				alert(MyCode[150]);
			}

			function GoSearch(){
				with(document.cscform){
					__help.value="__employeeid#"+__employeeid.value;
				}
				search();
			}

			function setAutosearch(str){
				document.cscform.__afterUpdate.value=str;
			}

			/*
			function chkDateTime1(valueSearch){
				var tmpval="";
				with(document.cscform){
					var valueSearch1=valueSearch.split("-");
					if(valueSearch1.length==3){
						if(valueSearch1[1].length==1){
							valueSearch1[1]="0"+valueSearch1[1];
						}
						if(valueSearch1[0].length==1){
							valueSearch1[0]="0"+valueSearch1[0];
						}
						valueSearch1[2]=parseInt(valueSearch1[2]);
						return valueSearch=valueSearch1[2]+"-"+valueSearch1[1]+"-"+valueSearch1[0];
					}
				}
			}

			function setValueDate(inputDate){
				with(document.cscform){
					document.write(chkDateTime1(inputDate));
				}
			}*/

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

	<body  leftmargin="0" topmargin="0">
		<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="APS301">
			<input type="hidden" name="__calendar" value="">
			<input type="hidden" name="__help" value="">
			<input type="hidden" name="__gorec"  value="">
			<input type="hidden" name="__headMulti"  value="APS301">
			<input type="hidden" name="__childMulti"  value="APS301_1">
			<input type="hidden" name="__multiTable"  value="MEMPL_ASSESSOR_ADMIN">
			<input name="__notdelall" type="hidden" value="true">
			<input type="hidden" name="__ack"  value="">
			<input type="hidden" name="__notNull" value="<%=screen.getRequire()%>">
			<input type="hidden" name="__language"  value='<%=screen.getUProfile().get("lang")%>'>
			<input type="hidden" name="__companyid"  value="<%=screen.getUProfile().get("companyid")%>">
			<input type="hidden" name="__maxrec" value="<%=screen.getTable("MEMPL_ASSESSOR_ADMIN").recCount()%>">
			<input type="hidden" name="__fixCon" value="">
			<input type="hidden" name="__afterUpdate" value="">
			<input type="hidden" name="__referPage" value="">
			<input type="hidden" name="__emp_level" value="<%=screen.getDataLabel("emp_level")%>">

			<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
			<script language="javascript">getInputFormatDate();</script>
			<script language="javascript">initToolTips();</script>
			<script language="javascript">
				//var titlename=swap2String('Insurance Detail');
				var swap = new swaplang();
				var titlename = swap.swap2String("SW000221");
				document.write(Icons("APS301,"+titlename));
			</script>

			<br>
			<div align="center">
				<table cellpadding="0"  cellspacing="0"   class="large">
					<tr>
						<td class="header">APS301,<span swlang code="SW000221">Insurance Detail</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;</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="1" align="center"   class="inframe">
											<tr >
												<td >
													<table border="0" cellpadding="0" cellspacing="1" bgcolor="#333333" id="rsTable" name="rsTable" cols=7 class="inframe">
														<tr bgcolor="#3366CC">
															<td class="row3">
																<div align="center">
																	<span swlang code="SW000289">Del</span>
																</div>
															</td>
															<td class="row3">
																<div align="center">
																	<span swlang code="SW000193">Seq</span>
																</div>
															</td>
															<td class="row3">
																<div align="center">
																	<span swlang code="SW000274">Employee ID</span>
																</div>
															</td>
															<td class="row3">
																<div align="center">
																	<span swlang code="SW000195">Name</span>
																</div>
															</td>
															<td class="row3">
																<div align="center">
																	<span swlang code="SW000019">status</span>
																</div>
															</td>
														</tr>
														<%
															for(int i=1;!multi.eof();multi.next(),i++)
															{
																multi.getTable().getCurrentRecordManager().referLangOn();
														%>
														<tr>
															<td ><div align="center"><%=multi.getInputCheckBox()%></div></td>
															<td height="20" >
																<div align="center">
																	<%=multi.getScript("childMulti", multi.getData("MEMPL_ASSESSOR_ADMIN","LINE_NO"))%>
																</div>
															</td>
															<td height="20" >
																<div align="center">
																	<%=multi.getData("MEMPL_ASSESSOR_ADMIN","employeelist")%>
																</div>
															</td>
															<%
																String name="";

																DbInquiry emp = new InitialInquiry(screen.getUProfile()).getDbInquiry("memployee");
																emp.setColumn("*");
																emp.setFilter("employeeid = '"+multi.getData("MEMPL_ASSESSOR_ADMIN","employeelist")+"'");
																emp.refresh();
																emp.next();
																if(screen.getUProfile().get("lang").equalsIgnoreCase("ENG")){
																	name = emp.getString("efullname");
																}else{
																	name = emp.getString("tfullname");
																}
															%>
															<td height="20">
																<div align="center">
																	<%=name%>
																</div>
															</td>
															<td height="20">
																<div align="center">
																	<%=multi.getSystemCode("status")%>
																</div>
															</td>
														</tr>
														<%
																multi.getTable().getCurrentRecordManager().referLangOff();
															}
														%>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr bordercolor="0069B3">
						<td  class="blankspace"></td>
					</tr>
					<tr bordercolor="0069B3">
						<td  class="blankspace">
							<div align="center" >
								<a href="#" onClick="checkAll()"><img src="../IMAGES/BUTTON/SELECTALL.gif" border="0"></a>&nbsp;&nbsp;
								<a href="#" onClick="decheckAll()"><img src="../IMAGES/BUTTON/DESELECTALL.gif" border="0"></a>&nbsp;&nbsp;
								<a href="javascript:linkChildPru('APS301_1');"><img src="../IMAGES/BUTTON/ADD.gif" border="0"></a>&nbsp;&nbsp;
								<a href="javascript:deleteMulti();"><img src="../IMAGES/BUTTON/DELETE.gif" border="0"></a>&nbsp;&nbsp;
							</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 bordercolor="0069B3">
						<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>
	</body>
</html>
