TRE005_5_PHATRA.jsp 8.69 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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
<%@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.*"  %>
<%@ page import="com.csc.library.databean.Simhtraining"  %>
<jsp:useBean id="TRE005_5" class="com.csc.library.system.Task" scope="page"/>
<%
	TRE005_5.setChannel(request,response);
	UIManager screen = (UIManager)TRE005_5.process("MultiEntry","TRE005_PHATRA",true);

	CheckNull chk = new CheckNull();
	screen.referLangOn();
%>
<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 src="../JS/VIEWCALENDAR.js"></script>
<script language="JavaScript" src='../JS/ICONSMENU.js'></script>
<script language='javascript' src='../JS/HOTKEY.js'></script>
<script language="javascript">

	function GoSave(){confirmSave();}
	function GoUpdate(){update();}
	function GoDelete(){edelete();}
	function GoSearch(){search();}

	function childMulti(record){
		with(document.cscform){
	    	window.open(__childMulti.value+".jsp?__cmd=&__gorec="+record+
		     "&__ack=edit&__trainingid="+window.parent.document.forms[0].__trainingid.value+	   
		     "&__headMulti="+__headMulti.value+  		     
	    	 "&__companyid="+__companyid.value,"","width=600,height=300");
		}
	}

	function addMulti(){
		with(document.cscform){
			if(notBlankOnParentPage()){
	    		window.open(__childMulti.value+".jsp?__cmd=&__gorec=&__ack=add"+	 
				"&__headMulti="+__screen.value+
	    		"&__companyid="+__companyid.value,"","left=150,top=150,width=700,height=280,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 genTime(){
		if(window.parent.document.cscform.__trainingid.value!=""){
			window.document.cscform.__trainingid.value = window.parent.document.cscform.__trainingid.value;
			window.document.cscform.__classdatefrm.value = window.parent.document.cscform.__classdatefrm.value;
			window.document.cscform.__classdateto.value =  window.parent.document.cscform.__classdateto.value;
			window.document.cscform.__timestart.value=  window.parent.document.cscform.__timestart.value;
			window.document.cscform.__timestop.value =  window.parent.document.cscform.__timestop.value;
			window.document.cscform.__timebreak.value =  window.parent.document.cscform.__timebreak.value;
			with(document.cscform){
				__cmd.value = "ack";
				__isgen.value = "1";
				//window.parent.restTabPages();
				submit();
			}
		}else{
			alert(MyCode[0]);
			window.parent.document.cscform.__trainingid.selected();
		}
	}
</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="?">
<!----------BEGIN CSC INITIAL ZONE ------------------------>
<%=screen.InitialVariable()%>
<!----------END CSC INITIAL ZONE -------------------------->
	<input name="__cmd" type="hidden" value="multi">
	<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="TRE005_PHATRA">
	<input type="hidden" name="__multiTable" value="HTRAININGTIME">	
	<input type="hidden" name="__childMulti" value="TRE005_5C_PHATRA">
	<input type="hidden" name="__headMulti" value="TRE005_PHATRA">
	<input type="hidden" name="__gorec" value="">
	<input type="hidden" name="__ack" value="">
	<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="__trainingid" value="<%=screen.getDataLabel("trainingid")%>">
	<input type="hidden" name="__isgen" value="0">
	<input type="hidden" name="__classdatefrm" value="<%=screen.getDataLabel("classdatefrm")%>">
	<input type="hidden" name="__classdateto" value="<%=screen.getDataLabel("classdateto")%>">
	<input type="hidden" name="__timestart" value="<%=screen.getDataLabel("timestart")%>">
	<input type="hidden" name="__timestop" value="<%=screen.getDataLabel("timestop")%>">
	<input type="hidden" name="__timebreak" value="<%=screen.getDataLabel("timebreak")%>">
 <table cellpadding="0" cellspacing="0" class="maxsize">
    <tr >	       	
        <td class="header"> TRE005_5_PHATRA,<script language="javascript">swapLang('Training Time');</script> &nbsp;</td>
	</tr>
    <tr>
		<td> 
		<table border="0" cellpadding="0" cellspacing="1" id="rsTable" name="rsTable" bgcolor="#333333" class="maxsize  tablewithborder" cols="4">
			<tr >
			  <td width="7%"  class="row3"><div align="center"><strong>
              <script language='javascript'>swapLang('Del');</script>
				</strong></div></td>
				<td width="30%"  class="row3"><div align="center"><script language='javascript'>swapLang('Date');</script></a></div></td>
				<td width="10%"  class="row3"><div align="center"><script language="JavaScript">swapLang("Time")</script></a></div></td>
				<td width="20%"  class="row3"><div align="center"><script language="JavaScript">swapLang("Relax Hour")</script></a></div></td>
				<td width="23%"  class="row3"><div align="center"><script language="javascript">swapLang('Total Hour');</script></div></td>
				<td width="23%"  class="row3"><div align="center"><script language="javascript">swapLang('Status');</script></div></td>
			</tr>
			<%
				String isgen = chk.chkNullString(request.getParameter("__isgen"));
				if(isgen.equals("1")){
					Simhtraining htraining = (Simhtraining)screen.getRecord("Htraining");
					htraining.genTrainingTime();
				}
				MultiLine multi = screen.getMultiLine("HTRAININGTIME");	
				multi.setLabelBox("check box");
				multi.goFirst();
				for(;!multi.eof();multi.next()){ 		
					multi.getTable().referLangOn();
			%>
			<tr>
			  <td class="inframe"><div align="center"> <%=multi.getInputCheckBox()%> </div></td>
			  <td class="inframe"><div align="center"><%=multi.getScript("childMulti", multi.getTable().getCurrentRecordManager().getCscCalendar("START_DATE").getDDMMYYYY())%></div></td>
			  <td class="inframe"><div align="center"><%=multi.getData("HTRAININGTIME","START_TIME")%> - <%=multi.getData("HTRAININGTIME","END_TIME")%></div></td>
			  <td class="inframe"><div align="center"><%=multi.getData("HTRAININGTIME","TIMEBREAK")%></div></td>
			  <td class="inframe"><div align="center"><%=multi.getData("HTRAININGTIME","T_HOUR")%></div></td>
			  <td class="inframe"><div align="center"><%=multi.getSystemCode("STATUS")%></div></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="SW013176" onClick="genTime();">GENDATA</button>&nbsp;
			 <button type="button" class="btn btn-primary width100" swlang code="SW013165" onClick="addMulti();">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>
</table>

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

<%=screen.endJSP()%>

<!----------END CSC ENDING ZONE -------------------------->
</form>
<%
screen.referLangOff();
%>
 <script language="javascript">window.parent.setTabPages();</script>
</body>
</html>