<%@ page contentType="text/html; charset=UTF-8"%> <%@ page import="com.csc.library.entry.*,com.csc.library.utilities.*,com.csc.library.session.*,com.csc.library.database.*,java.util.*"%> <jsp:useBean id="th" scope="page" class="com.csc.library.utilities.ThaiUtilities"/> <jsp:useBean id="DAYNIGHT_CONFIG" scope="page" class="com.csc.library.system.Task"/> <% DAYNIGHT_CONFIG.setChannel(request ,response); UIManager screen=(UIManager) DAYNIGHT_CONFIG.process("MultiNoRecEntry","DAYNIGHT_CONFIG"); MultiLine multi = screen.getMultiLine("DAYNIGHT_CONFIG"); UProfile u = screen.getUProfile(); String cmd = request.getParameter("__cmd"); if(cmd==null){ screen.getTable("DAYNIGHT_CONFIG").refresh(); } if((cmd!=null)&&(cmd.equals("addChild"))){ DbRecord rec = screen.getTable("DAYNIGHT_CONFIG").getNewRecord(); screen.getTable("DAYNIGHT_CONFIG").last(); rec.set(screen.getTable("DAYNIGHT_CONFIG").getMinorKey(),screen.getTable("DAYNIGHT_CONFIG").getInt(screen.getTable("DAYNIGHT_CONFIG").getMinorKey())+1); rec.set("COMPANYID",screen.getUProfile().get("companyid")); screen.getTable("DAYNIGHT_CONFIG").putNewRecord(rec); } if(screen.getTable("DAYNIGHT_CONFIG").recCount() == 0){ DbRecord rec1 = screen.getTable("DAYNIGHT_CONFIG").getNewRecord(); screen.getTable("DAYNIGHT_CONFIG").last(); rec1.set(screen.getTable("DAYNIGHT_CONFIG").getMinorKey(),"1"); rec1.set("COMPANYID",screen.getUProfile().get("companyid")); screen.getTable("DAYNIGHT_CONFIG").putNewRecord(rec1); } multi.goFirst(); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <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 language="JavaScript" src="../JS/SCREEN.js"></script> <script type='text/javascript' src='../JS/DATEINPUT.js'></script> <script type='text/javascript' src='../JS/VIEWCALENDAR.js'></script> <script type='text/javascript' src="../JS/ICONSMENU.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 type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script> <script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script> <script language="javascript">getTitleName();</script> <script language="JavaScript" type="text/JavaScript"> function addMultiRound(){ with(document.cscform){ __cmd.value="addChild"; submit(); } } function goHelp(helpName,inputName){ var helpReturn; if(inputName.indexOf("PAYROLL_CODE") !== -1 ){ helpReturn = inputName+":formulaid"; }else if(inputName.indexOf("CONDITIONS") !== -1 ){ helpReturn = inputName+":classid"; } linkHelp_Return(helpName, helpReturn); } function GoSave(){ if(nullCheck()){ with(document.forms[0]){ __confirm.value="0"; if(__confirm.value=="0"){ aCon=confirm(MyCode[1]);// จะบันทึกหรือไม่ if (aCon==true) { __confirm.value="s"; __cmd.value = "save"; submit(); } } } } } function GoUpdate(){ update(); } function GoDelete(){ edelete(); } function GoSearch(){ search(); } function deleteMulti(){ with(document.cscform){ bCon=confirm(MyCode[4]); if (bCon==true) { __cmd.value="DelChild"; submit(); } } } $(function(){ var cmd = '<%=cmd%>'; if(cmd === "save"){ with(document.cscform){ alert(MyCode[18]); } } $(".dn_prcode > input").each(function(){ if($(this).val() === "NONE"){ $(this).val(""); } }); $(".dn_con > input").each(function(){ if($(this).val() === "NONE"){ $(this).val(""); } }); $('#setbox').change(function(){ $('.dn_chkbox > input').prop('checked', $(this).prop('checked')); }); }); </script> </head> <body leftmargin="0" topmargin="0"> <div id="toolTipLayer" style="position:absolute; visibility: hidden"></div> <script language="javascript">initToolTips();</script> <div class="centered"> <form name="cscform" method="post" action="DAYNIGHT_CONFIG.jsp"> <!----------BEGIN CSC INITIAL ZONE ------------------------> <%=screen.InitialVariable()%> <!----------END CSC INITIAL ZONE --------------------------> <input type="hidden" name="__cmd" value=""> <input type="hidden" name="__screen" value="DAYNIGHT_CONFIG"> <input type="hidden" name="__calendar"> <input type="hidden" name="__notNull" value=""> <input type="hidden" name="__help" value=""> <input type="hidden" name="__gorec" value=""> <input type="hidden" name="__headMulti" value=""> <input type="hidden" name="__childMulti" value="DAYNIGHT_CONFIG"> <input type="hidden" name="__multiTable" value="DAYNIGHT_CONFIG"> <input type="hidden" name="__ack" value=""> <input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>"> <input type="hidden" name="__referPage" value=""> <input type="hidden" name="__fixCon" value=""> <script language="javascript">getInputFormatDate();</script> <div align="center"> <script language="JavaScript" src="../JS/HOTKEY.js"></script> <script language="javascript"> var titlename='Day-Night Config'; document.write(Icons("DAYNIGHT_CONFIG, "+titlename)); </script> <br> <table style="width:100%;" cellpadding="0" cellspacing="0" class="appname" > <tr > <td class="header">DAYNIGHT_CONFIG, Day-Night Config </td> </tr> <tr> <td> <table style="width:100%;" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table style="width:99%;" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC" class=" tablewithborder"> <tr> <td class="row1" align="center" style="width:40px;height:30px;"><input type="checkbox" id="setbox"></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","TIME_IN").replaceAll("\\*","")%></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","TIME_OUT").replaceAll("\\*","")%></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","PAYROLL_CODE").replaceAll("\\*","")%></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","AMOUNT").replaceAll("\\*","")%></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","PROFILE").replaceAll("\\*","")%></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","CONDITIONS").replaceAll("\\*","")%></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","EFF_DATE").replaceAll("\\*","")%></td> <td class="row1" align="center"><%=multi.getLabel("DAYNIGHT_CONFIG","EXPIRED_DATE").replaceAll("\\*","")%></td> </tr> <% for(int i=1;!multi.eof();i++){ %> <tr> <td align="center" class="dn_chkbox"><%=multi.getInputCheckBox()%><%//=multi.getDataLabel("DAYNIGHT_CONFIG","SHIFTID")%></td> <td align="center"><%=multi.getInput("DAYNIGHT_CONFIG","TIME_IN")%></td> <td align="center"><%=multi.getInput("DAYNIGHT_CONFIG","TIME_OUT")%></td> <td align="center" class="dn_prcode"><%=multi.getInput("DAYNIGHT_CONFIG","PAYROLL_CODE")%></td> <td align="center"><%=multi.getInput("DAYNIGHT_CONFIG","AMOUNT")%></td> <td align="center"><%=multi.getInput("DAYNIGHT_CONFIG","PROFILE")%></td> <td align="center" class="dn_con"><%=multi.getInput("DAYNIGHT_CONFIG","CONDITIONS")%></td> <td align="center"><%=multi.getInput("DAYNIGHT_CONFIG","EFF_DATE")%></td> <td align="center"><%=multi.getInput("DAYNIGHT_CONFIG","EXPIRED_DATE")%></td> </tr> <% multi.next(); } %> <tr> <td width="640" class="buttonline" colspan="9"> <button type="button" class="btn btn-primary width100" swlang code="SW013162" onClick="addMultiRound();">ADD</button> <button type="button" class="btn btn-primary width100" swlang code="SW013166" onClick="deleteMulti();">DELETE</button> </td> </tr> </table> <input type="hidden" name="__minorkey" value="<%=multi.getDataLabel("DAYNIGHT_CONFIG","SHIFTID")%>"> </td> </tr> <tr> <td> <HR> <table cellpadding="0" cellspacing="0"> <% String [] TL = { multi.getLabel("DAYNIGHT_CONFIG","TIME_IN").replaceAll("\\*",""), multi.getLabel("DAYNIGHT_CONFIG","TIME_OUT").replaceAll("\\*",""), multi.getLabel("DAYNIGHT_CONFIG","PAYROLL_CODE").replaceAll("\\*",""), multi.getLabel("DAYNIGHT_CONFIG","AMOUNT").replaceAll("\\*",""), multi.getLabel("DAYNIGHT_CONFIG","PROFILE").replaceAll("\\*",""), multi.getLabel("DAYNIGHT_CONFIG","CONDITIONS").replaceAll("\\*",""), multi.getLabel("DAYNIGHT_CONFIG","EFF_DATE").replaceAll("\\*",""), multi.getLabel("DAYNIGHT_CONFIG","EXPIRED_DATE").replaceAll("\\*","") }; String [] FT_text = { "???" ,"???" ,"???" ,"???" ,"???" ,"???" ,"???" ,"???" }; String [] FE_text = { "???" ,"???" ,"???" ,"???" ,"???" ,"???" ,"???" ,"???" }; %> <tr > <td width="200"><b><span swlang code="SW000302">Remark</span></b></td> <td></td> </tr> <% if(u.get("lang").equals("eng")){ %> <%for(int x = 0 ; x < TL.length ; x++){%> <tr > <td align="left" nowrap>   <%=TL[x]%></td> <td align="left" >: <%=FT_text[x]%></td> </tr> <% } }else{ %> <%for(int x = 0 ; x < TL.length ; x++){%> <tr > <td align="left" nowrap>   <%=TL[x]%></td> <td align="left" >: <%=FE_text[x]%></td> </tr> <% } } %> </table> </td> </tr> <tr> <td class="blankspace"></td> </tr> <tr> <td align="right" ><script language="javascript">printEditCheck('<%=multi.getData("DAYNIGHT_CONFIG","edit_by")%>','<%=multi.getData("DAYNIGHT_CONFIG","edit_date")%>','<%=multi.getData("DAYNIGHT_CONFIG","edit_time")%>','<%=multi.getData("DAYNIGHT_CONFIG","approve")%>');</script> </td> </tr> <tr> <td class="blankspace"></td> </tr> </table></td> </tr> <tr> <td class="bottom"></td> </tr> </table> </div> <!----------BEGIN CSC ENDING ZONE ------------------------> <%=screen.endJSP()%> <!----------END CSC ENDING ZONE --------------------------> </form> </div> </body> </html> <%! String yamatos = "a;lsdfja;lsdjfl;kasjdlkfjaksl"; %>