<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExcelConfigSetChargeModeManage.aspx.cs" Inherits="M_Main.UFJDVoucher.ExcelConfigSetChargeModeManage" %>

<%@ Register TagPrefix="dslbc" NameSpace="DualSelectListBoxControl" Assembly="DualSelectListBoxControl" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>ExcelConfigSetChargeModeManage</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
        <link href="../css/button.css" rel="stylesheet" />
		<script language="javascript" src="../jscript/JSClient.js"></script>
		<script language="javascript" src="../jscript/DateControl.js"></script>
		<script language="javascript" src="../jscript/Keydown.js" event="onkeydown" for="document"></script>
		<script language="javascript">
		<!--
            //兼容谷歌
            if (!window.showModalDialog) {
                window.showModalDialog = function (url, name, option) {
                    if (window.hasOpenWindow) {
                        window.newWindow.focus();
                    }
                    var re = new RegExp(";", "g");
                    var option = option.replace(re, '","'); //把option转为json字符串
                    var re2 = new RegExp(":", "g");
                    option = '{"' + option.replace(re2, '":"') + '"}';
                    option = JSON.parse(option);
                    var openOption = 'width=' + parseInt(option.dialogWidth) + ',height=' + parseInt(option.dialogHeight) + ',left=' + (window.screen.width - parseInt(option.dialogWidth)) / 2 + ',top=' + (window.screen.height - 30 - parseInt(option.dialogHeight)) / 2;
                    window.hasOpenWindow = true;
                    window.newWindow = window.open(url, name, openOption);
                }
            }

             function SetComm(varReturn)
            {
                //alert(varReturn);
				if(varReturn!="")
				{//**获得返回的参数信息
					
					var varObjects=varReturn.split("\t");
					
					ExcelConfigSetChargeModeManage.CommID.value=varObjects[0];
					ExcelConfigSetChargeModeManage.CommName.value=varObjects[1];
					ExcelConfigSetChargeModeManage.hiCommName.value=varObjects[1];
				}
            }

            //选择管理项目
			function btnSelComm_OnClick()
			{
                 var varReturn = "";												
				//varReturn=showModalDlg("../dialog/CommDlg.aspx"+"?Ram="+Math.random(),"",600,450);               
               var returnValue = window.showModalDialog("../dialog/CommDlg.aspx"+"?Ram="+Math.random(),window,"dialogWidth:600px;dialogHeight:550px");

                if (returnValue == undefined) {
                    returnValue = window.returnValue;
                }
            
                 if (returnValue != undefined) {
                    varReturn = returnValue;
                }

                SetComm(varReturn);
            }
            
			
			function CheckData()
			{
				if(ExcelConfigSetChargeModeManage.CommID.value=="0")
				{
					ExcelConfigSetChargeModeManage.CommID.value=="";
				}
				
				if(ExcelConfigSetChargeModeManage.CommID.value=="")
				{
					alert("请选择管理项目,此项不能为空!");
					ExcelConfigSetChargeModeManage.btnSelComm.focus();
					return false;
				}
				
				window.location.href = "ExcelConfigSetChargeModeManage.aspx";				
				return true;
			}
		
			//-->
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="ExcelConfigSetChargeModeManage" method="post" runat="server">
			<table height="100%" cellSpacing="0" cellPadding="0" width="100%">
				<tr>
					<td vAlign="top" bgColor="#ffffff">
						<table cellSpacing="2" cellPadding="2" width="100%">
							<tr>
								<td style="height: 22px; background-color: #e6e6e6;font-size:16px;" align="center"><span id="lbl_WorkflowName">生成Excel文件</span></td>
							</tr>
							<tr>
								<td align="center">管理项目
                                    <input class="Control_ItemInput" id="CommName" readOnly type="text" maxLength="50" size="10" name="CommName" runat="server">
                                    <input class="Button_sel" id="btnSelComm" onclick="btnSelComm_OnClick();" type="button" name="btnSelComm" runat="server">
                                    <input id="CommID" style="WIDTH: 16px; HEIGHT: 22px" type="hidden" size="1" name="CommID" runat="server">
                                    <input id="hiCommName" style="WIDTH: 16px; HEIGHT: 22px" type="hidden" size="1" name="hiCommName" runat="server">
								</td>
							</tr>
							<tr>
								<td align="center">
                                    <input class="button" id="btnCreExcel" type="button" value="生成格式文件"
										name="btnCreExcel" runat="server" onclick="javascript:if(CheckData()==false) return false;" />&nbsp;
									<input class="button" id="btnReturn" type="button" value="放弃返回" name="btnReturn" runat="server">
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
