TRE003_1.jsp 8.01 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 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
<%@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="TRE003_1" class="com.csc.library.system.Task" scope="page"/>
<%
	TRE003_1.setChannel(request,response);
	UIManager screen = (UIManager) TRE003_1.process("ChildEntry","MTRAINEREDU");	
	CheckNull chk=new CheckNull();
	if(chk.chkNullString(request.getParameter("__gorec")).equals("")){
		screen.getTable("MTRAINEREDU").last();
	}
%>
<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">
<script type='text/javascript' src='../JS/SCREEN.js'></script>
<script type='text/javascript' src='../JS/ICONSMENU.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" type="text/JavaScript">

function goSave() {confirmSave();}
function goSearch() {search();}
function goDelete() {edelete();}
function goUpdate() {update();}
function checkCF() {checkConfirm();}

	function goHelp(helpName,inputName){
		 var helpReturn;
		 if(inputName=="__institueid" ){
		 	helpReturn="__institueid:institueid,MINSTITUE@TDESC";
		 }
		  if(inputName=="__majorid" ){
		 	helpReturn="__majorid:majorid,MMAJOR@TDESC";
		 }
		 linkHelp_Return(helpName,helpReturn);			
	}
	function setvalue(tar,val){
		with(document.cscform){
			for(i=0;i<elements.length;i++){
				if(elements[i].name==tar){
					elements[i].value=val;
				}
			}
		}
	}
	function setBlank(){
		with(document.cscform){
			__majorid.readOnly = true;
			__institueid.readOnly = true;
			if(__institueid.value==""){
				setvalue("MINSTITUE@TDESC","");
			}
			if(__majorid.value==""){
				setvalue("MMAJOR@TDESC","");
			}
		}
	}
	function setcmd1(acktion){	
		with(document.cscform){
			if(notBlankOnThisPage()){
				bCon=confirm(MyCode[1]);
				if (bCon==true){	
					__cmdchild.value="save";
				}
				submit();
			}
		}	
	}
	function back(){
		with(window.opener.cscform){
			__cmd.value="ack";
			submit();
		}
	}
	function chkTimeOver(grd){
		var tmp1 = "please input format number 400 == 4.00 or 015 == 0.15";
		var tmp1 = "please input number lessthen 400 == 4.00";
		if(getLang()=="tha"){
			tmp1 = "กรุณาใส่ค่าเฉลี่ย เช่น 400 == 4.00 , 015 == 0.15";
			tmp2 = "กรุณาใส่ค่าเฉลี่ยน้อยกว่า 400 == 4.00";
		}
		if(grd.value!=""&&grd.value!=0){
			if(grd.value.length<3){
				alert(tmp1); grd.value = "0.00"; grd.select();
			}else{
				if(parseInt(grd.value)>400){
					alert(tmp2); grd.value = "0.00"; grd.select();
				}else{
					grd.value = grd.value.substring(0,1)+"."+grd.value.substring(1,3);
				}
			}
		}else{
			grd.value = "0.00";
		}
	}
	function setBudyear(){
		with(document.cscform){
			if(__years.value==""){
				__years.value = '<%=new CscCalendar().getYear()%>';
			}
		}
	}
</script>
<%
	String ma_desc = "",in_desc = "";
	if(request.getParameter("__ack").equalsIgnoreCase("edit")){
		ma_desc = screen.getDataLabel("MMAJOR","TDESC");
		in_desc = screen.getDataLabel("MINSTITUE","TDESC");
	}
%>
</head>

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

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


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

<%=screen.InitialVariable()%>

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

<input name="__cmd" type="hidden" value="">
	<input type="hidden" name="__screen" value="TRE003_1">
	<input type="hidden" name ="__headMulti" value="TRE003">
  	<input type="hidden" name ="__cmdchild" value="">
	<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
  	<input type="hidden" name ="__ack" value="<%=request.getParameter("__ack")%>">  	
 	<input type="hidden" name="__calendar">
	<input type="hidden" name="__sysisedit" >
  	<input type="hidden" name ="__companyid" value="<%=request.getParameter("__companyid")%>">
	<input type="hidden" name="__cmdChild" value="">
	<input type="hidden" name="__help" value="">
	<input type="hidden" name="__helpReturn" value="">
	<script language="javascript">getInputFormatDate();</script>
	<input name="__fixCon" type="hidden" value="">
	<input type="hidden" name="__user" value="<%=screen.getUProfile().getUserId()%>">
	<input type="hidden" name ="__gorec" value="<%=chk.chkNullString(request.getParameter("__gorec"))%>">
	<input type="hidden" name="__referPage" value="">
	<input type="hidden" name="__notNull"value="<%=screen.getRequire()%>">
	<input type="hidden" name="__backpage" value="TRE003_1">
	<input type="hidden" name="__trainerid" value="<%=request.getParameter("__trainerid")%>">
	<%
	String goRec = chk.chkNullString(request.getParameter("__gorec"));
	if(goRec.equalsIgnoreCase("")){%>
		<input type="hidden" name="__line_no" value="<%=screen.getTable("MTRAINEREDU").getInt(screen.getTable("MTRAINEREDU").getMinorKey())+1%>">
	<%}else{%>
		<input type="hidden" name="__line_no" value="<%=screen.getDataLabel("LINE_NO")%>">
	<%}%>  
  <div align="center">  
 <br>
    <table>
      <tr> 
        <td class="header" colspan="2" >TRE003_1, 
          <span swlang code="SW000202">Educational Background</span>&nbsp;</td>
      </tr>
      <tr> 
        <td > 
          <div align="center"> 
            <center>
              <table cellpadding="0"  cellspacing="0">
                <tr> 
                  <td colspan="2"  class="blankspace"></td>
                </tr>
                <tr> 
                      <td align="right"><%=screen.getLabel("EDUCATEID")%>&nbsp;</td>
                      <td><%=screen.getInput("EDUCATEID")%></td>
                </tr>
				<tr> 
                      <td align="right"><%=screen.getLabel("MAJORID")%>&nbsp;</td>
                      <td><%=screen.getInput("MAJORID")%>&nbsp;<input name="MMAJOR@TDESC" type ="text" value="<%=ma_desc%>" size="50" disabled></td>
                </tr>
				<tr> 
                      <td align="right"><%=screen.getLabel("INSTITUEID")%>&nbsp;</td>
                      <td><%=screen.getInput("INSTITUEID")%>&nbsp;<input name="MINSTITUE@TDESC" type ="text" value="<%=in_desc%>" size="50" disabled></td>
                </tr>
				<tr> 
                      <td align="right"><%=screen.getLabel("YEARS")%>&nbsp;</td>
                      <td><%=screen.getInput("YEARS")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=screen.getLabel("GRADE")%>&nbsp;<%=screen.getInput("GRADE")%></td>
                </tr>
				<script language="javascript">setBudyear();</script> &nbsp;</td>
                <tr> 
                  <td colspan="2"  class="blankspace"></td>
                </tr>
                <tr align="center"> 
                  <td colspan="2" class="buttonline"  >
                  	<a href="javascript:setcmd1('save');"><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>
                <tr> 
                  <td colspan="2"  class="blankspace"></td>
                </tr>
              </table>
            </center>
          </div></td>
      </tr>
      <tr> 
       <td class="bottom" ></td>
      </tr>
	  <script language='javascript'>setBlank();</script>
    </table>
    </center>
</div>
<% 
if((request.getParameter("__cmdchild")!=null)&&(!request.getParameter("__cmdchild").equals(""))){%>
<script language="javascript">back();</script>
<%}%>
</form>
</body>
</html>