APP_EMV706_C.jsp 8.39 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 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
<%@ page contentType="text/html; charset=TIS620" language="java" %>
<%@page import="com.csc.library.entry.EmvHelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<% request.setCharacterEncoding("TIS620"); %>
<%@ include file="../CHECKPROFILE.jsp" %>
<jsp:useBean id="APP_EMV706_C" class="com.csc.library.system.Task" scope="page"/>
<%
	APP_EMV706_C.setChannel(request,response);
	EmvHelpEntry screen = (EmvHelpEntry) APP_EMV706_C.process("EmvHelpEntry","APP_EMV706_C");
	screen.referLangOn();
	screen.process();
	CheckNull chk = new CheckNull();
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="myHR">
	<head>
		<title>Employee View</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

		<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/font-awesome.css">
		<link rel="stylesheet" type="text/css" href="../CSS/Bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="../CSS/EMPVIEW_LAYOUT.min.css" />
		
		<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
		<script type="text/javascript" src="../JS/EVENTS.js"></script>
		<script type="text/javascript" src="../JS/UTILITIES.js"></script>
		<script type="text/javascript" src="../JS/SCREEN.js"></script>
		<script type="text/javascript" src="../JS/angular-1.3.15/angular.js"></script>
		<script type="text/javascript" src="../JS/ANGULAR/SCREEN_ANGULAR.js"></script>
		

		<script>
			setLang("<%=screen.getUProfile().get("lang")%>");
			var swap = new swaplang();
	        var titlename = swap.swap2String("SW000617");
			setPageTitle(titlename);
			
				$(document).ready(function(){
					$("select").addClass("form-control");
					$("input[name=__valueSearch]").addClass("form-control");
					$("#listpage").removeClass("form-control");
				});
			
			function addMulti(){
					setCurCrsbox();
					window.close();
			}
			function search(){	
					checkForChange();
					with(document.cscform){
						__cmd.value="search";
						submit();
					}
			}
			function goPage(page){
				checkForChange();
				with(document.cscform){
					__goPage.value=page;
					submit();
				}
			}
			function chkCurrent(){
				var tmp = window.opener.document.cscform.curcrs.value;
				with(document.cscform){
					if(typeof __crsid!="undefined"){
						if(typeof __crsid.length!="undefined"){
							for(i=0;i<__crsid.length;i++){
								if(tmp.indexOf(","+__crsid[i].value+",")>=0){
									__crsid[i].checked = true;
									__crsid[i].disabled = true;
								}
							}
						}else{
							if(tmp.indexOf(","+__crsid.value+",")>=0){
								__crsid.checked = true;
								__crsid.disabled = true;
							}
						}
					}
				}
			}
			function checkAll(){
				with(document.cscform){
					for(i=0;i<elements.length;i++){
						if(!elements[i].disabled&&elements[i].type=="checkbox"){
							elements[i].checked=true;
						}
					}
				}
			}
			function decheckAll(){
				with(document.cscform){
					for(i=0;i<elements.length;i++){
						if(!elements[i].disabled&&elements[i].type=="checkbox"){
							elements[i].checked=false;
						}
					}
				}
			}
			function setCurCrsbox(){
				with(document.cscform){
					if(typeof __crsid!="undefined"){
						if(typeof __crsid.length!="undefined"){
							for(i=0;i<__crsid.length;i++){
								if(!__crsid[i].disabled&&__crsid[i].checked){
									window.opener.setCurCrsbox(__crsid[i].value);
									__crsid[i].disabled = true;
								}
							}
						}else{
							if(!__crsid.disabled&&__crsid.checked){
								window.opener.setCurCrsbox(__crsid.value);
								__crsid.disabled = true;
							}
						}
					}
				}
				window.opener.setCurrentCrs();
			}
			function checkForChange(){
				if(chkEdit()){
					bCon=confirm("มีการแก้ไขหน้าจอ จะบันทึกหรือไม่");
					if(bCon==true){
						setCurCrsbox();
					}
				}
			}
			function chkEdit(){
				with(document.cscform){
					if(typeof __crsid!="undefined"){
						if(typeof __crsid.length!="undefined"){
							for(i=0;i<__crsid.length;i++){
								if(!__crsid[i].disabled&&__crsid[i].checked){
									return true;
								}
							}
						}else{
							if(!__crsid.disabled&&__crsid.checked){
								return true;
							}
						}
					}
				}
			}
		</script>

	</head>
	<body>
		<div class="bg-com"></div>
		<section>
			<div class="container csc-content">
				<form name="cscform" class="form-horizontal" method="post"  action="APP_EMV706_C.jsp">
				<input type="hidden"name="__screen"  value="APP_EMV706_C">
				<input type="hidden" name="__fixCon" value="<%=chk.chkNullString(request.getParameter("__fixCon"))%>">
				<input type="hidden" name="__cmd"  value="">
				<script language="javascript">getInputFormatDate();</script> 
				<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
				<input type="hidden" name="__user" value="<%=screen.getUProfile().get("employeeid")%>">
				<input type="hidden" name="__help"  value="">
				<input type="hidden" name="__orderBy" value="">
				<input type="hidden" name="__goPage" value="">
				<input type="hidden" name="__companyid"  value="<%=screen.getUProfile().get("companyid")%>">
				

			<div class="csc-block">
					<div class="center">
						<h2 class="csc-block-head" swlang code='SW000617'>Course List</h2>
					</div>
				

				<div class="row">
					<div class="form-group">
						<div class="col-md-2 col-sm-2 col-xs-2">
							<label class="control-label label-right" swlang code='SW000004'>Order By</label>
						</div>
						<div class="col-md-3 col-sm-3 col-xs-3">
							<%=screen.getTagOrder()%>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-2">
							<label class="control-label label-right" swlang code='SW000005'>Search By</label>
						</div>
						<div class="col-md-3 col-sm-3 col-xs-3">
							<%=screen.getTagSearchBy()%>
						</div>
					</div>
				</div>

				<div class="row">
					<div class="form-group">
						<div class="col-md-2 col-sm-2 col-xs-2">
							<label class="control-label label-right" swlang code='SW000006'>Condition</label>
						</div>
						<div class="col-md-3 col-sm-3 col-xs-3">
							<%=screen.getTagConSearch()%>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-2">
							<label class="control-label label-right" swlang code='SW000007'>Key Value</label>
						</div>
						<div class="col-md-3 col-sm-3 col-xs-3">
							<div class="input-group">
								<%=screen.getTagValueSearch()%>
								<a class="input-group-addon" href="javascript:search();">
									<i class="fa fa-search"></i>
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>

			<span class="detail-table">
				<span swlang code='SW001771'>Found Data</span> :&nbsp;&nbsp;<%= screen.getInquiry().recCount() %>&nbsp;
				<span swlang code='SW001780'>records</span> 
			</span>
			<span class="detail-table label-right">
				<span swlang code='SW001120'>Page</span> : <%=screen.getPageTagNew()%> 
			</span>

			<table class="table table-head table-bordered table-title-left table-content-center" cols="5">
				<tr> 
					<th swlang code='SW000015'>Select</th>
					<th><%=screen.getLabel("COURSE")%></th>
					<th><%=screen.getLabel("MCOURSE","CRSDESC")%></th>
					<th swlang code='SW000390'>Course Type</th>
					<th swlang code='SW000610'>Course Group</th>
				</tr>
					<%
						while(screen.nextRec()){
							if(screen.checkLinePage()){
					%>
				<tr>
					<td><center><input name="__crsid" type="checkbox" value = '<%=screen.getString("COURSE")%>'></center></td>
					<td>&nbsp;<%=screen.getString("COURSE")%></td>
					<td id="<%=screen.getString("COURSE")%>" value="<%=screen.getString("CRSDESC")%>">&nbsp;<%=screen.getString("MCOURSE","CRSDESC")%></td>
					<td>&nbsp;<%=screen.getString("MCOURSETYPE","CRSTYDESC")%></td>
					<td>&nbsp;<%=screen.getString("MCOURSEGROUP","TDESC")%></td>
				 </tr>
					<%
							}
							if(screen.outLinePage()){ break; }	 
						}
					%>

			</table>
				<div class="center">
					<a class="btn btn-primary" href="javascript:checkAll();" swlang code='SW002185'>Select All</a>
					<a class="btn btn-primary" href="javascript:decheckAll();" swlang code='SW012097'>Reselect All</a>
					<a class="btn btn-primary" href="javascript:addMulti();" swlang code='SW012321'>OK</a>
					<a class="btn btn-primary" href="javascript:window.close();" swlang code='SW012104'>Close</a>
				</div>
			<script>chkCurrent()</script>
			</form>
		</section>
	</body>
</html>