?? 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 + -