<%@ page import="java.io.*, java.util.*"%>
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ page import="com.eactive.eai.common.c2rservice.C2RServiceManager"%>
<%@ page import="com.eactive.eai.common.c2rservice.C2RServiceVO"%>
<%@ page import="java.util.HashMap"%>

<%!
	/**
	* <pre>
	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
	* </pre>
	* @param	String		변환 대상
	* @return	'String'
	*/
	public static String checkNull( String str ) {

		String sResult = new String();
		if ( str == null ) {
			sResult = "";
		}
		else {
			sResult = str.trim();
		}
		return sResult;
	}
%>
<%
    
    String  action      = request.getParameter("actionType");
 
	C2RServiceManager manager = C2RServiceManager.getInstance();  
    String key[] = manager.getAllKeys();
    
    String selectedKey = request.getParameter("selectKeys");
    int seq = 1;
    if(selectedKey == null && key.length>0) {
        selectedKey  = key[0];
    }
   
    C2RServiceVO sm   = null;
  
    if(selectedKey!=null) {
       sm = manager.getC2RServiceVO(selectedKey);
    }
    
%>


<html>
    <head>
    
        <title>
            C2RServiceManager
        </title>
         <script>
        function doAction() {
            document.frm.submit();
        }
        
        </script>
    </head>
    <body>
        <p style="font-size:12pt;">
        <b>C2RService Configuration</b> <br><br>
        </p>
        <form name="frm" action="">
        <input type="hidden" name="actionType" value="">
        <input type="hidden" name="actionSeq" value="">
        <table border='0' width="800" >
        <tr>
        <td align='left'>
        <table width="450" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
        <tr bgcolor='white'>
            <td align='right' width='180' bgcolor="#ccccff"><label value="eaiSvcCds : "/>&nbsp;</td>
            <td align='left'>&nbsp;<select name="selectKeys" onchange="doAction();">
            <%
                for(int i=0;i<key.length;i++) {
            %>
                <option value="<%=key[i]%>" <%= (key[i].equals(selectedKey)) ? "selected" : "" %> ><%=key[i]%>
            <%           
                }
            %></select>
            </td>
        </tr>
        </table>
        </td>

        </tr>
        </table><br>
        <table width="800" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
        <tr bgcolor='white'>
            <td align='right' colspan='2' width='350' bgcolor="#003366">&nbsp; <font color="yellow"><b>내용</b> &nbsp;</font></td>
            
        </tr>


<%
    if(sm != null ){
        
%>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp;기관코드  : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="svcPssSeq" size='60' value="<%=sm.getC2rExtnlInstiCd()%>"></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp;서비스처리순서 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="svcPssSeq" size='60' value="<%=sm.getSvcPssSeq()%>"></td>
        </tr>
         <tr bgcolor='white'>                                                                                                                                     
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 수동인터페이스유형 : &nbsp;</td>                                                                           
            <td align='left'>&nbsp;<input type="text" name="psvItfTp" size='60' value="<%=sm.getPsvItfTp()%>">                                                                                                                              
            </td>                                                                                                                                                
        </tr>
                <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 수동업무시스템명 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="psvBwkSysNm" size='60' value="<%=sm.getPsvBwkSysNm()%>"></td>
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 수동시스템ID : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="psvSysID" size='60' value="<%=sm.getPsvSysID()%>"></td>
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 수동시스템서비스코드 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="psvSysSvcCd" size='60' value="<%=sm.getPsvSysSvcCd()%>"></td>
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 수동시스템인터페이스유형 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="psvSysItfTp" size='60' value="<%=sm.getPsvSysItfTp()%>"></td>
        </tr>
        

        <tr bgcolor='white'>                                                                                                                                     
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; FailOver여부 : &nbsp;</td>                                                                           
            <td align='left'>&nbsp;<input type="text" name="flOvrCls" size='60' value="<%=sm.getFlOvrCls()%>">                                                          
            </td>                                                                                                                                                
        </tr>
        
        <tr bgcolor='white'>                                                                                                                                     
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 변환유무 : &nbsp;</td>                                                                           
            <td align='left'>&nbsp;<input type="text" name="cnvEn" size='60' value="<%=sm.getCnvEn()%>">                                                                                                                                          
            </td>                                                                                                                                                
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 변환메시지ID : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="cnvMsgID" size='60' value="<%=sm.getCnvMsgID()%>"></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 기본응답메시지비교값 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="bsRspMsgCprVl" size='60' value="<%=sm.getBsRspMsgCprVl()%>"></td>
        </tr>

        <tr bgcolor='white'>                                                                                                                                     
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 기본응답변환유무 : &nbsp;</td>                                                                           
            <td align='left'>&nbsp;<input type="text" name="bsRspCnvEn" size='60' value="<%=sm.getBsRspCnvEn()%>"></td>                                          
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 기본응답변환메시지ID : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="bsRspCnvMsgID" size='60' value="<%=sm.getBsRspCnvMsgID()%>"></td>
        </tr>

        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 오류응답메시지비교값 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="errRspMsgCprVl" size='60' value="<%=sm.getErrRspMsgCprVl()%>"></td>
        </tr>
        
        <tr bgcolor='white'>                                                                                                                                     
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 오류응답변환유무 : &nbsp;</td>                                                                           
            <td align='left'>&nbsp;<input type="text" name="errRspCnvEn" size='60' value="<%=sm.getErrRspCnvEn()%>"></td>
                                                                                                                                                       
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 오류응답변환메시지ID : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="errRspCnvMsgID" size='60' value="<%=sm.getErrRspCnvMsgID()%>"></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 다음서비스처리순서 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="nxtSvcPssSeq" size='60' value="<%=sm.getNxtSvcPssSeq()%>"></td>
        </tr>

        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; Outbound라우팅명 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="outbRtnNm" size='60' value="<%=sm.getOutbRtnNm()%>"></td>
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 타임아웃값 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="tmoVl" size='60' value="<%=sm.getTmoVl()%>"></td>
        </tr>

        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 보상서비스처리코드 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="cpnsSvcPssCd" size='60' value="<%=sm.getCpnsSvcPssCd()%>"></td>
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 추가삭제여부 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="supplDelYn" size='60' value="<%=sm.getSupplDelYn()%>"></td>
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 헤더제어구분코드 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="hdrCtrlDstcd" size='60' value="<%=sm.getHdrCtrlDstcd()%>"></td>
        </tr>
        
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 참고클래스명 : &nbsp;</td>
            <td align='left'>&nbsp;<input type="text" name="hdrRefClsName" size='60' value="<%=sm.getHdrRefClsName()%>"></td>
        </tr>
        
<%
}
%>    
        </table>
        </form>
    </body>
</html>