bonusescontrol.ascx
来自「C#语言制作asp.net网上商店的」· ASCX 代码 · 共 322 行 · 第 1/2 页
ASCX
322 行
<asp:GridView ID="gvFreeShippingProducts" runat="server" AllowPaging="True" EmptyDataText="范围:全部商品"
AutoGenerateColumns="False" DataKeyNames="ID" Width="100%">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="cbSelect" runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle Width="25px" HorizontalAlign="Center" />
<HeaderTemplate>
<uc1:CheckAllCheckBoxControl ID="CheckAllCheckBoxControl1" runat="server" Prefix="cbSelect" />
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="商品或者类别">
<ItemTemplate>
<asp:HiddenField ID="hfCategoryID" runat="server" Value='<%#Eval("CategoryID")%>' />
<asp:HiddenField ID="hfProductID" runat="server" Value='<%#Eval("ProductID")%>' />
<asp:Label ID="lbCategoryName" runat="server" Text='<%#Eval("CategoryName")%>'></asp:Label>
<asp:Label ID="lbProductName" runat="server" Text='<%#Eval("ProductName")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td>
<br />
<asp:Button ID="btnDeleteFreeShipping" runat="server" Text="删除选中" /></td>
</tr>
</table>
</asp:View>
<asp:View ID="vPoint" runat="server">
<div class ="editzone">
<p>
<asp:Label ID="lbMinPoint" runat="server" AssociatedControlID="txtMinPoint" Text="最小积分:"></asp:Label> <asp:TextBox ID="txtMinPoint" runat="server">0.00</asp:TextBox><asp:RegularExpressionValidator
ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtMinPoint"
ErrorMessage="请输入正确的最小积分" ValidationExpression="^\d+(\.\d+)?$" ValidationGroup="BonusPoint">*</asp:RegularExpressionValidator>
</p>
<p>
<asp:Label ID="lbMaxPoint" runat="server" AssociatedControlID="txtMaxPoint" Text="最大积分:"></asp:Label> <asp:TextBox ID="txtMaxPoint" runat="server">0.00</asp:TextBox><asp:RegularExpressionValidator
ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtMaxPoint"
ErrorMessage="请输入正确的最大积分" ValidationExpression="^\d+(\.\d+)?$" ValidationGroup="BonusPoint">*</asp:RegularExpressionValidator><br />
<b> 说明</b>: 最大积分是0.00时表明没有限制.
</p>
<div style ="margin-left:150px"> <asp:Button ID="btnUpdatePoint" runat="server" Text="更新" Width="119px" ValidationGroup="BonusPoint" />
</div>
</div>
<asp:ValidationSummary ID="ValidationSummary2" DisplayMode="List" ValidationGroup="BonusPoint" runat="server" />
</asp:View>
<asp:View ID="vOfferMemberShip" runat="server">
xxxxxxx</asp:View>
</asp:MultiView>
</div>
<div class="blankbox">
</div>
<asp:Panel ID="pChooseProducts" runat="server" Width="100%" Visible="False">
<script language="javascript" type="text/javascript">
function selectionChanged(type) {
var p = document.getElementById('spanProduct');
var c = document.getElementById('spanCategory');
if (document.getElementById ("<%=gvSpecailPriceProducts.ClientID%>"))
{
p.style.display = '';
c.style.display = 'none';
document.getElementById('rdProduct').style.display = 'none';
document.getElementById('rdCategory').style.display = 'none';
document.getElementById('lbProduct').style.display = 'none';
document.getElementById('lbCategory').style.display = 'none';
return;
}
if (type =="p")
{ p.style.display = '';
c.style.display = 'none';
document.cookie = 'specialOffer_Bonuses_isShowProduct=' + escape('true')+';';
}
else
{ p.style.display = 'none';
c.style.display = '';
document.cookie = 'specialOffer_Bonuses_isShowProduct=' + escape('false')+';';
}
}
//*********获取指定的Cookie的值***********
function getCookie(cookieName) {
var cookieString = document.cookie;
var start = cookieString.indexOf(cookieName + '=');
// 加上等号的原因是避免在某些 Cookie 的值里有
// 与 cookieName 一样的字符串。
if (start == -1) // 找不到
return null;
start += cookieName.length + 1;
var end = cookieString.indexOf(';', start);
if (end == -1) return unescape(cookieString.substring(start));
return unescape(cookieString.substring(start, end));
}
//******************保持上一次的状态***********************************
function SaveState(CookieName){
if (getCookie(CookieName)=='false'){
document.getElementById("rdCategory").checked="true"
selectionChanged("c")
}
if (getCookie(CookieName)=='true'){
document.getElementById("rdProduct").checked="true"
selectionChanged("p")
}
}
</script>
<div style="margin-left: 10px">
<div id="title">
<asp:Label ID="lbAddProductOrCategory" runat="server" Text="添加商品或者类别"></asp:Label></div>
<div class="hr">
</div>
<div>
<input id="rdProduct" type="radio" onclick='selectionChanged("p")' checked="checked"
name="xxGroup" /><label for="rdProduct">商品</label>
<input id="rdCategory" onclick='selectionChanged("c")' type="radio" name="xxGroup" />
<label for="rdCategory">
类别</label>
</div>
<div>
<span id="spanProduct">
<uc3:ChooseProductsControl ID="ChooseProductsControl1" runat="server" />
</span><span id="spanCategory" style="display: none;">选择分类: <asp:DropDownList
ID="ddlCategory" runat="server">
</asp:DropDownList>
<asp:Button ID="btnAddCategory" runat="server" Text="添加分类" Width="85px" />
</span>
</div>
</div>
<script type="text/javascript" language="javascript">SaveState("specialOffer_Bonuses_isShowProduct")</script>
</asp:Panel>
<div class="row-middle">
<asp:Button ID="btnGoCondition" runat="server" Text="上一步(设置条件)" />
<asp:Button ID="btnGoPromo" runat="server" Text="下一步(详细内容)" />
</div>
</div>
<asp:HiddenField ID="hfOfferID" runat="server" />
<asp:HiddenField ID="hfIsComplete" runat="server" Value="0" />
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?