<%--
  - FileName   : dlgSearchSpotDept_Change.jsp
  - Author(s)  : gyeongmo an
  - Date       : 2014-07-11
  - Copyright  : Copyright (c) 2014 www.udapsoft.co.kr, Inc.
  -
  - Description: 
  --%>

<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="kr.co.hsnc.common.util.*"%>

<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />

<%    	
	ctx.init(request, response);

	ValueObject user = ctx.getUser();
	ValueObject params = ctx.getParams();

	boolean success = false;
	
	String site_code  = params.get("site_code");		
	String dept_nm    = params.get("dept_nm");	
	//String site_ac_unit_cd = params.get("site_ac_unit_cd");

	if( ! site_code.equals("") && ! dept_nm.equals("") )
	{		
		user.set("dept_cd" , site_code);//코드
		user.set("dept_nm",  dept_nm);//명
		//user.set("site_ac_unit_cd", site_ac_unit_cd);//사업부
		
		success = true;
	}		
%>

<%
	if( success ) {
%>

<SCRIPT language="javascript">
	
	parent.doSelect();
	
</SCRIPT>

<%	
	}
	else {
%>

<SCRIPT language="javascript">
	dlgAlert("현장변경 실패하였습니다."); 
</SCRIPT>

<%	} %>