📄 addcompany.aspx
字号:
<%@ Page language="c#" Codebehind="AddCompany.aspx.cs" AutoEventWireup="false" Inherits="NewGlassBook.AddCompany" %>
<%@ Register TagPrefix="cc1" Namespace="NewGlassBook" Assembly="NewGlassBook" %>
<HTML>
<HEAD>
<title></title>
<LINK href="../../NewGlassBook.css" type="text/css" rel="stylesheet"></LINK>
<script language="javascript">
//任意字符,不可以为空
function IsValidEmpty(ErrMsg,str)
{
var reg=/(.)+/;
if(!str.match(reg))
{
alert(ErrMsg);
return false;
}
}
function subcompanyValid()
{
if(IsValidEmpty("请填写公司编号",document.all("aID").value)==false)
{
return false;
}
if(document.all("aID").value.length!=2)
{
alert("公司编号输入错误!");
return false;
}
if(IsValidNumber(document.all("aID").value)==false)
{
alert("公司编号输入错误!");
return false;
}
if(IsValidEmpty("请填写公司名称",document.all("aCompanyName").value)==false)
{
return false;
}
if(document.all("aZip").value!="")
{
if(IsValidPostcode(document.all("aZip").value)==false)
{
return false;
}
}
if(IsValidEmpty("请选择公司主仓库",document.all("astorecode").value)==false)
{
return false;
}
}
//检测是否是数字
function IsValidNumber(num)
{
numstring="0123456789."
for(i=0;i<num.length;i++)
{
if (numstring.indexOf(num.charAt(i))==-1)
{
alert("请输入合法数字");
return false;
}
}
}
//邮政编码
function IsValidPostcode(str)
{
var reg=/^(\d{6})$/;
if(!str.match(reg))
{
alert("邮政编码输入错误");
return false;
}
}
</script>
</HEAD>
<body>
<form id="employee" method="post" runat="server">
<TABLE cellSpacing="0" cellPadding="3">
<TR>
<TD colSpan="2" align="middle"><STRONG>添加公司信息</STRONG></TD>
</TR>
<TR>
<TD>公司编号</TD>
<TD><cc1:mytextbox id="aID" runat="server" MaxLength="3" EnableViewState="False"></cc1:mytextbox>公司编号用00(总公司)
01 02 03 ...</TD>
</TR>
<TR>
<TD>公司名称</TD>
<TD><cc1:mytextbox id="aCompanyName" runat="server" MaxLength="50"></cc1:mytextbox><FONT face="宋体" color="#ff3333">*</FONT></TD>
</TR>
<TR>
<TD>负责人</TD>
<TD><cc1:mytextbox id="aContact" runat="server" MaxLength="10"></cc1:mytextbox></TD>
</TR>
<TR>
<TD>电话</TD>
<TD><cc1:mytextbox id="aTel" runat="server" MaxLength="16"></cc1:mytextbox></TD>
</TR>
<TR>
<TD>传真</TD>
<TD><cc1:mytextbox id="aFax" runat="server" MaxLength="16"></cc1:mytextbox></TD>
</TR>
<TR>
<TD>地址</TD>
<TD><cc1:mytextbox id="aAddress" runat="server" MaxLength="50"></cc1:mytextbox></TD>
</TR>
<TR>
<TD>邮政编码</TD>
<TD><cc1:mytextbox id="aZip" runat="server" MaxLength="6"></cc1:mytextbox></TD>
</TR>
<TR>
<TD>主 仓 库</TD>
<TD><asp:dropdownlist id="astorecode" runat="server" Width="151px" CssClass="dropdown"></asp:dropdownlist><FONT face="宋体" color="#ff3333">*</FONT></TD>
</TR>
<TR>
<TD colSpan="2"><asp:label id="lblWarning" runat="server" CssClass="lblWarning"></asp:label></TD>
</TR>
<TR>
<TD colSpan="2" align="middle"><cc1:mybutton id="dbtnOk" runat="server" Text="确定"></cc1:mybutton>
<cc1:mybutton id="dbtnreset" runat="server" Text="重置"></cc1:mybutton></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -