⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example.aspx

📁 企业管理信息化之财务管理系统
💻 ASPX
字号:
<%@ Page language="c#" Codebehind="Example.aspx.cs" AutoEventWireup="false" Inherits="com.ascs.plp.publics.Example" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<TITLE>Example</TITLE>
		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<LINK href="../CSS/PLP-DRP.css" type="text/css" rel="stylesheet">
		<script language="javascript">
		function ProductResearch()
		{
			window.open('ProductId.aspx?FormName=Example&ControlName=TextBox1', '', 'scrollbars=no,width=400px,height=470px,resizable=no,left=' + (screen.availWidth-620)/2 + ',top=' + (screen.availHeight-470)/2 );
		} 
		
		function ProductInfo(ProductId)
		{
			window.open('ProductInfo.aspx?CPDM='+ProductId, '', 'scrollbars=no,width=400px,height=470px,resizable=no,left=' + (screen.availWidth-620)/2 + ',top=' + (screen.availHeight-470)/2 );
		} 
		</script>
	</HEAD>
	<body MS_POSITIONING="FlowLayout">
		<FONT face="宋体"></FONT>
		<form id="Example" method="post" runat="server">
			<P align="center">
				<FONT face="宋体">
					<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="95%" border="0">
						<TR>
							<TD>
								<HR width="100%" color="#0099ff" SIZE="1" DESIGNTIMEDRAGDROP="89">
								&nbsp;</TD>
						</TR>
						<TR>
							<TD><STRONG>一、获取产品代码弹出窗口示例</STRONG></TD>
						</TR>
						<TR>
							<TD style="HEIGHT: 30px">
								<P>
									<asp:TextBox id="TextBox1" runat="server" Font-Size="9pt"></asp:TextBox>
									<INPUT style="WIDTH: 23px; HEIGHT: 24px" type="button" value="..." onclick="ProductResearch()"></P>
							</TD>
						</TR>
						<TR>
							<TD>
								<P>使用方法:在按钮点击时执行javascript函数ProductResearch(),打开窗口ProductId.aspx,并以查询字符串的形式传递本页面的Form名和接收返回值的TextBox名。本例中为ProductId.aspx?FormName=Example&amp;ControlName=TextBox1</P>
							</TD>
						</TR>
						<TR>
							<TD>
								<HR width="100%" color="#0099ff" SIZE="1" DESIGNTIMEDRAGDROP="86">
							</TD>
						</TR>
						<TR>
							<TD><STRONG>二、根据产品代号查询产品详细信息</STRONG></TD>
						</TR>
						<TR>
							<TD><a href="javascript:ProductInfo('001301');">001301</a></TD>
						</TR>
						<TR>
							<TD>使用方法:在很多情况下需要用到产品信息,但同时显示在页面上空间可能不够,可以使用只显示产品代码,通过链接打开新窗口的方法查看产品详细信息。在点击链接时执行javascript函数ProductId(),并传递产品代码参数,打开ProductInfo.aspx页面。本例中为ProductInfo.aspx?CPDM=00001301</TD>
						</TR>
						<TR>
							<TD>
								<HR width="100%" color="#0099ff" SIZE="1" DESIGNTIMEDRAGDROP="90">
								&nbsp;</TD>
						</TR>
						<TR>
							<TD><STRONG>三、链接到错误页面</STRONG></TD>
						</TR>
						<TR>
							<TD>
								<asp:TextBox id="TextBox2" runat="server" Font-Size="9pt">这里是错误信息</asp:TextBox>&nbsp;
								<asp:Button id="Button1" runat="server" Text="转到错误页面" CssClass="button12" Width="107px"></asp:Button></TD>
						</TR>
						<TR>
							<TD>
								<P>使用方法:当程序执行错误或在调用的方法返回false时,可能需要给出错误信息提示。调用时将错误信息以查询字符串的形式传递给错误页面。
								</P>
								<P>调用方式举例:this.Response.Redirect("../publics/Error.aspx?errmsg=在执行某某操作时未成功。"); 
									以后该页面会加以美化或修改,但调用的接口即文件存放位置、文件名和查询字符串名等,如无特殊情况将固定不变。</P>
							</TD>
						</TR>
						<TR>
							<TD>
								<HR width="100%" color="#0099ff" SIZE="1" DESIGNTIMEDRAGDROP="91">
							</TD>
						</TR>
						<TR>
							<TD><STRONG>四、根据代号查询名称</STRONG></TD>
						</TR>
						<TR>
							<TD>
								<P>在系统中有很多用于显示信息时,根据代号查询名称的情况,要临时编码来实现,不便于结构化的编程。本例中使用了已经写好的若干个方法,可以直接通过代号获取名称。目前已经定义的有<FONT color="#3399ff">员工、机构、供应商、仓库、库位、产品、客户、承运商、维修站、出入库类型、信用级别、竞争对手、系统参数(包括学历、职务、客户类型、质量状况、单据类型、物品管理方式、运输方式)</FONT>等。所有方法均在com.ascs.plp.publics.FindInfo类下定义,都是静态方法,无须创建类对象。参数为代码,查询成功时返回名称,发生错误时返回"Error"。</P>
								<P>调用方法举例:FindInfo.Find***(***ID); 例如:string zlzk = FindInfo.FindXtcs("0602"); 
									//根据质量状况代码查询质量状况名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P>
								<P>
									<asp:TextBox id="TextBox3" runat="server" Font-Size="9pt" Width="114px">0602</asp:TextBox>
									<asp:Button id="Button3" runat="server" Width="136px" CssClass="button12" Text="转化成质量状况名称"></asp:Button></P>
							</TD>
						</TR>
						<TR>
							<TD>
								<HR width="100%" color="#0099ff" SIZE="1" DESIGNTIMEDRAGDROP="92">
							</TD>
						</TR>
						<TR>
							<TD><STRONG>五、为下拉列表框绑定数据</STRONG></TD>
						</TR>
						<TR>
							<TD>
								<P>学历列表:
									<asp:DropDownList id="DropDownList1" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp; 
									职务列表:
									<asp:DropDownList id="DropDownList2" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp;&nbsp; 
									客户类型列表:
									<asp:DropDownList id="DropDownList3" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp; 
									质量状况列表:
									<asp:DropDownList id="DropDownList4" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp; 
									单据类型列表:
									<asp:DropDownList id="DropDownList5" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp;</P>
								<P>物品管理方式列表:
									<asp:DropDownList id="DropDownList6" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp; 
									货币类型列表:
									<asp:DropDownList id="DropDownList7" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp;&nbsp;&nbsp; 
									运输方式列表:
									<asp:DropDownList id="DropDownList8" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp; 
									机构列表:
									<asp:DropDownList id="DropDownList9" runat="server" Font-Size="9pt" Width="80px"></asp:DropDownList>&nbsp;&nbsp;&nbsp;
									<asp:Button id="Button2" runat="server" CssClass="button12" Text="获取数据"></asp:Button></P>
							</TD>
						</TR>
						<TR>
							<TD>
								<P>调用方法:在系统中有很多情况下要采用下拉列表框的形式来要求用户输入信息,为了向控件中添加相应信息,要临时编码来实现,不便于结构化的编程。本例中使用了已经写好的若干个方法,可以直接使下拉列表控件获得所需的数据。目前已经定义的有<FONT color="#3399ff">学历、职务、客户类型、质量状况、单据类型、物品管理方式、货币类型、运输方式、机构</FONT>等。所有方法均在com.ascs.plp.publics.ListInfo类下定义,都是静态方法,无须创建类对象,参数是存储数据的下拉列表对象,执行成功时将下拉列表控件绑定数据,文本域为名称字段,值域为代码字段,并返回true,发生错误时返回false。</P>
								<P>调用举例:ListInfo.ListXl(DropDownList1);&nbsp; 
									ListInfo.ListZw(DropDownList2);&nbsp;ListInfo.ListKhlx(DropDownList3);&nbsp;ListInfo.ListZlzk(DropDownList4);&nbsp;ListInfo.ListDjlx(DropDownList5); 
									ListInfo.ListWpglfs(DropDownList6);&nbsp;ListInfo.ListHblx(DropDownList7);&nbsp;ListInfo.ListYsfs(DropDownList8);ListInfo.ListJg(DropDownList9);</P>
							</TD>
						</TR>
						<TR>
							<TD>
								<HR width="100%" color="#0099ff" SIZE="1">
								&nbsp;</TD>
						</TR>
					</TABLE>
				</FONT>
			</P>
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -