<%@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.*,com.csc.library.report.ReportUDF"  %>
<jsp:useBean id="AS036" class="com.csc.library.system.Task" scope="page"/>
<%
	AS036.setChannel(request,response);
	UIManager screen = (UIManager) AS036.process("SingleEntry","AS036");
	screen.referLangOff();

	CheckNull ck = new CheckNull(); 
%>

<jsp:useBean id="AS036P" class="com.csc.library.system.Task" scope="page"/>
<%
	AS036P.setChannel(request,response);
	UIManager screenp = (UIManager) AS036P.process("ProcessEntry","Process");
	if(ck.chkNullString(request.getParameter("__cmd")).equals("process")){
			screenp.process();
	}

	String success = screen.getDataLabel("t_tapstran_success");
	String nsuccess = screen.getDataLabel("t_tapstran_nsuccess");
%>
<html>
<head>
<title></title>
<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  language="JavaScript" src="../JS/SCREEN.js"></script>
<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
<script language='javascript' src='../JS/HOTKEY.js'></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="javascript">
<!--
function GoSave() {  confirmSave();  }
function GoDelete(){ edelete(); }
function GoSearch(){ search(); }
function GoUpdate(){ update();  }

 function goHelp(helpName,inputName){
	var helpReturn="";
	var fcon="";
			helpReturn=inputName+":bu1id,MBU1@TDESC";
		if(fcon.length==0)
				  linkHelp_Return(helpName,helpReturn);
		
}
function checkTotal(obj){
	var c_total = 0;
	var max = 100;
	if(obj.value == ""){
		obj.value = 0;
	}
	with(document.cscform){
		if(obj.name != "__gradea"){
			c_total += parseInt(__gradea.value);
		}
		if(obj.name != "__gradeb"){
			c_total += parseInt(__gradeb.value);
		}
		if(obj.name != "__gradec"){
			c_total += parseInt(__gradec.value);
		}
		if(obj.name != "__graded"){
			c_total += parseInt(__graded.value);
		}
	}
	max = max-c_total;
	checkNumInt(obj, 0, max);
}
EngCode[167]= " Confirm Process Grade";
ThaiCode[167]= "  ยืนยันการประมวลผลเกรด ";
function process(){
	with(document.cscform){
		if(__bu1id.value != ""){
			bCon=confirm(MyCode[167]);
			if (bCon==true)	{
				__condition$bu1id.value = __bu1id.value;
				__cmd .value = "process";							
				submit();
			}
		}else{
			alert(MyCode[0]);
		}
	}
}
//-->
</script>

</head>
<body leftmargin="0" topmargin="0" marginmarginheight="0">
<form name="cscform" method="post" action="">
 

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

<%=screen.InitialVariable()%>

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

<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
  <script language="javascript">initToolTips();</script>
  <input type="hidden"name="__screen"  value="AS036">
  <input type="hidden" name="__help" value="">
  <input type="hidden" name="__cmd"  value="">
  <input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>"> 
  <input type="hidden" name="__fixCon" value="">
  <input name="__notNull" type="hidden" value="<%=screen.getRequire()%>">
  <input name="__companyid" type="hidden" value="<%=screen.getUProfile().get("companyid")%>">
	
  <input type="hidden" 	name="__tname" value="คำนวนเกรดประเมิน">
  <input type="hidden" 	name="__ename" value="Calulate grade appraisal">
  <input type="hidden" 	name="__ptype" value="">
  <input type="hidden" 	name="__prclass"	value="ProcessAppraisalGrade">
  <input type="hidden"	name="__condition$bu1id" value="">

  <script language="JavaScript">document.write(Icons());</script>
    <br>
  <div align="center">
    <table  cellpadding="0"  cellspacing="0">
      <tr > 
        <td  class="header">AS036
          <script language="javascript">swapLang('Astype Table Record');</script>
          &nbsp;</td>
      </tr>
      <tr > 
        <td  colspan="2"> 
          <div align="center"> 
            <table  cellpadding="0" cellspacing="0"  class="inframe" >
              <tr> 
					<td colspan="2"  class="blankspace"></td>
              </tr>
              <tr>
					<td width="25%" class="columnlabel"><%=screen.getLabel("bu1id")%>&nbsp;</td>
					<td width="75%" > <%=screen.getInput("bu1id")%>&nbsp;<input name="MBU1@TDESC" type="text" class="text" id="MBU1@TDESC" size="30" readonly="readonly" value="<%=ck.chkNullString(request.getParameter("MBU1@TDESC"),screen.getDataLabel("mbu1","tdesc")) %>" />&nbsp;  <a href="javascript:goHelp('MBU1HELP','__bu1id');"> <%=screen.getRecord("mbu1").getDescription()%></a></td>
              </tr>
              <tr>
					<td class="columnlabel"><%=screen.getLabel("gradea")%>&nbsp;</td>
					<td ><%=screen.getInput("gradea")%> %</td>
              </tr>
              <tr>
					<td class="columnlabel"><%=screen.getLabel("gradeb")%>&nbsp;</td>
					<td ><%=screen.getInput("gradeb")%> %</td>
              </tr>
              <tr>
					<td class="columnlabel"><%=screen.getLabel("gradec")%>&nbsp;</td>
					<td ><%=screen.getInput("gradec")%> %</td>
              </tr>
              <tr>
					<td class="columnlabel"><%=screen.getLabel("graded")%>&nbsp;</td>
					<td ><%=screen.getInput("graded")%> %</td>
              </tr>
			 
			  <tr > 
                <td colspan="2" class="blankspace"></td>
              </tr>
			  <tr>
				<td colspan="2" align="right"><script language="javascript">printEditCheck('<%=screen.getDataLabel("edit_by")%>','<%=screen.getDataLabel("edit_date")%>','<%=screen.getDataLabel("edit_time")%>','<%=screen.getDataLabel("approve")%>');
						</script>&nbsp;</td>
			   </tr>
			    <tr > 
                <td colspan="2" class="blankspace"></td>
              </tr>

              <tr>
                <td  class="buttonline" colspan="7"><div align="center">
                  <button type="button" class="btn btn-primary width100" swlang code="SW013173" onClick="process();">PROCESS</button>
                </div>
                </td>
              </tr>
			   <tr > 
                <td colspan="2" align="right">success :<%=screen.getDataLabel("t_tapstran_success")%>&nbsp;&nbsp;&nbsp;
				not success :<%=screen.getDataLabel("t_tapstran_nsuccess")%>&nbsp;</td>
              </tr>
            </table>
          </div></td>
      </tr>
      <tr bordercolor="0069B3"> 
        <td  class="bottom"></td>
      </tr>
    </table>
  </div>


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

<%=screen.endJSP()%>

<!----------END CSC ENDING ZONE -------------------------->

</form>
</body>
</html>
