📄 lensprice.aspx
字号:
<%@ Page language="c#" Codebehind="LensPrice.aspx.cs" AutoEventWireup="false" Inherits="NewGlassBook.LensPrice" %>
<%@ Register TagPrefix="cc1" Namespace="NewGlassBook" Assembly="NewGlassBook" %>
<HTML>
<HEAD>
<title></title>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function lenspriceValid()
{
if(document.lensPrice.bDegreeS.value==""||document.lensPrice.bDegreeE.value=="")
{
alert("请您填写级光度数");
return false;
}
if(document.lensPrice.bPrice.value=="")
{
alert("请您填写镜片价格");
return false;
}
if(document.lensPrice.aLevels.value=="0")
{
alert("请你选择级光");
return false;
}
if(IsValidNumber(document.lensPrice.bPrice.value)==false)
{
alert("请输入正确的价格");
return false;
}
if(IsValidNumber(document.lensPrice.bDegreeS.value)==false)
{
alert("请输入正确的度数");
return false;
}
if(IsValidNumber(document.lensPrice.bDegreeE.value)==false)
{
alert("请输入正确的度数");
return false;
}
if(parseFloat(document.lensPrice.bDegreeE.value)<=parseFloat(document.lensPrice.bDegreeS.value)||parseFloat(document.lensPrice.bDegreeE.value)>30||parseFloat(document.lensPrice.bDegreeS.value)>30)
{
alert("度数输入错误");
return false;
}
if(parseFloat(document.all("bDegreeE").value)%parseFloat('0.25')!=0||parseFloat(document.all("bDegreeS").value)%parseFloat('0.25')!=0)
{
alert("起止光度应该是0.25的倍数");
return false;
}
}
//检测是否是数字
function IsValidNumber(num)
{
numstring="0123456789."
for(i=0;i<num.length;i++)
{
if (numstring.indexOf(num.charAt(i))==-1)
{
alert("请输入合法数字");
return false;
}
}
}
</script>
</HEAD>
<body bgcolor="lightgrey">
<form method="post" runat="server" id="lensPrice">
<TABLE class="tblBody" cellSpacing="0">
<TR>
<TD class="tblHeader">
<P align="center">镜片价格设置</P>
</TD>
</TR>
<TR>
<TD class="tdCenter">
<TABLE id="Table1" cellSpacing="1">
<TR>
<TD class="tdRight" height="18">品 牌</TD>
<TD height="18"><cc1:mydropdownlist id="aBrandId" runat="server"></cc1:mydropdownlist></TD>
</TR>
<TR>
<TD class="tdRight">级光数</TD>
<TD><cc1:mydropdownlist id="aLevels" runat="server" Width="154px">
<asp:ListItem Value="0">请选择级光</asp:ListItem>
<asp:ListItem Value="一级光">一级光</asp:ListItem>
<asp:ListItem Value="二级光">二级光</asp:ListItem>
<asp:ListItem Value="三级光">三级光</asp:ListItem>
<asp:ListItem Value="四级光">四级光</asp:ListItem>
<asp:ListItem Value="五级光">五级光</asp:ListItem>
<asp:ListItem Value="六级光">六级光</asp:ListItem>
<asp:ListItem Value="七级光">七级光</asp:ListItem>
<asp:ListItem Value="八级光">八级光</asp:ListItem>
<asp:ListItem Value="九级光">九级光</asp:ListItem>
<asp:ListItem Value="其它级光">其它级光</asp:ListItem>
</cc1:mydropdownlist></TD>
</TR>
<TR>
<TD class="tdRight">度数起</TD>
<TD><cc1:mytextbox id="bDegreeS" runat="server"></cc1:mytextbox></TD>
</TR>
<TR>
<TD class="tdRight">度数止</TD>
<TD><cc1:mytextbox id="bDegreeE" runat="server"></cc1:mytextbox></TD>
</TR>
<TR>
<TD class="tdRight">零售价</TD>
<TD><cc1:mytextbox id="bPrice" runat="server"></cc1:mytextbox> </TD>
</TR>
<TR>
<TD colSpan="2">
<cc1:mybutton id="dbtnOk" runat="server" Text="确 定"></cc1:mybutton>
<cc1:mybutton id="dbtnReset" runat="server" Text="重 置"></cc1:mybutton></TD>
</TR>
</TABLE>
<asp:label id="lblWarning" runat="server" ForeColor="Red" CssClass="lblWarning"></asp:label></TD>
</TR>
<TR>
<TD class="tblSeparator"></TD>
</TR>
<TR>
<TD class="tdLeft">品牌:
<cc1:mydropdownlist id="dBrand" runat="server" Height="19px"></cc1:mydropdownlist>级光:
<cc1:mydropdownlist id="dlevels" runat="server" Width="77px">
<asp:ListItem Value="0">所有级光</asp:ListItem>
<asp:ListItem Value="一级光">一级光</asp:ListItem>
<asp:ListItem Value="二级光">二级光</asp:ListItem>
<asp:ListItem Value="三级光">三级光</asp:ListItem>
<asp:ListItem Value="四级光">四级光</asp:ListItem>
<asp:ListItem Value="五级光">五级光</asp:ListItem>
<asp:ListItem Value="六级光">六级光</asp:ListItem>
<asp:ListItem Value="七级光">七级光</asp:ListItem>
<asp:ListItem Value="八级光">八级光</asp:ListItem>
<asp:ListItem Value="九级光">九级光</asp:ListItem>
<asp:ListItem Value="其它级光">其它级光</asp:ListItem>
</cc1:mydropdownlist>零售价:
<cc1:mytextbox id="dPrice" runat="server" Width="46px"></cc1:mytextbox>
<cc1:MyButton id="dbtn_query" runat="server" Text="查询" Height="19px"></cc1:MyButton> </TD>
</TR>
<TR>
<TD><cc1:superdatagrid id="dgShow" runat="server" PageSize="5" ShowFooter="True" OnPageIndexChanged="dgShow_Change" AllowPaging="True" AutoGenerateColumns="False" OnDeleteCommand="dgShow_Delete" CellPadding="1" Width="100%" BorderColor="#000000" BorderStyle="Solid" BorderWidth="1px" Font-Size="X-Small" Font-Names="宋体">
<ItemStyle Font-Size="10pt"></ItemStyle>
<HeaderStyle Font-Size="10pt" Wrap="False" HorizontalAlign="Center" BackColor="Transparent"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False" DataField="id" ReadOnly="True"></asp:BoundColumn>
<asp:TemplateColumn>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:linkbutton id="DeleteLink" runat="server" text="删除" commandname="Delete"></asp:linkbutton>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<a href="#" onclick='<%# OpenWin(DataBinder.Eval(Container,"DataItem.ID"))%>'>修改</a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="BrandName" HeaderText="品牌"></asp:BoundColumn>
<asp:BoundColumn DataField="Levels" HeaderText="级光"></asp:BoundColumn>
<asp:BoundColumn DataField="DegreeS" HeaderText="度数起"></asp:BoundColumn>
<asp:BoundColumn DataField="DegreeE" HeaderText="度数止"></asp:BoundColumn>
<asp:BoundColumn DataField="Price" HeaderText="零售价">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle Font-Size="10pt" HorizontalAlign="Right" Mode="NumericPages"></PagerStyle>
</cc1:superdatagrid></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -