sql语句:
CS代码:
aspx代码:
if
exists
(
select
1
from sysobjects
where id = object_id ( ' eb_b2c_system_merchandise ' )
and type = ' U ' )
drop table eb_b2c_system_merchandise
go
/*==============================================================*/
/* Table: eb_b2c_system_merchandise */
/*==============================================================*/
create table eb_b2c_system_merchandise (
auto numeric identity ,
MerId nvarchar ( 50 ) null ,
MerName nvarchar ( 50 ) null ,
CatId nvarchar ( 50 ) null ,
PicName nvarchar ( 50 ) null ,
Price numeric null ,
VIPPrice numeric null ,
Summary text null ,
userID nvarchar ( 50 ) null ,
RecordTime datetime null default getdate (),
MerState char ( 1 ) null default ' 0 ' ,
LastStateChangeTime datetime null ,
UseBondLimit numeric null default 0 ,
NewMerTag char ( 1 ) null default ' 0 ' ,
BestMerTag char ( 1 ) null default ' 0 ' ,
PreferentialMerTag char ( 1 ) null default ' 0 ' ,
PreferentialPrice numeric null ,
PreferentialLastTime datetime null ,
SellHotTag char ( 1 ) null default ' 0 ' ,
CancellationTag char ( 1 ) null default ' 0 ' ,
JZHCarriage numeric null ,
OtherCarriage numeric null ,
AlarmCount numeric null default - 1 ,
CarriageFreeCount numeric null default - 1 ,
BarCode nvarchar ( 100 ) null default ' -1 ' ,
Stock numeric null default 0 ,
SortFlag char ( 1 ) null ,
CatIdMerId nvarchar ( 100 ) not null ,
CommendTag char ( 1 ) null default ' 0 ' ,
MerBrand nvarchar ( 50 ) null ,
constraint PK_EB_B2C_SYSTEM_MERCHANDISE primary key (CatIdMerId)
)
go
from sysobjects
where id = object_id ( ' eb_b2c_system_merchandise ' )
and type = ' U ' )
drop table eb_b2c_system_merchandise
go
/*==============================================================*/
/* Table: eb_b2c_system_merchandise */
/*==============================================================*/
create table eb_b2c_system_merchandise (
auto numeric identity ,
MerId nvarchar ( 50 ) null ,
MerName nvarchar ( 50 ) null ,
CatId nvarchar ( 50 ) null ,
PicName nvarchar ( 50 ) null ,
Price numeric null ,
VIPPrice numeric null ,
Summary text null ,
userID nvarchar ( 50 ) null ,
RecordTime datetime null default getdate (),
MerState char ( 1 ) null default ' 0 ' ,
LastStateChangeTime datetime null ,
UseBondLimit numeric null default 0 ,
NewMerTag char ( 1 ) null default ' 0 ' ,
BestMerTag char ( 1 ) null default ' 0 ' ,
PreferentialMerTag char ( 1 ) null default ' 0 ' ,
PreferentialPrice numeric null ,
PreferentialLastTime datetime null ,
SellHotTag char ( 1 ) null default ' 0 ' ,
CancellationTag char ( 1 ) null default ' 0 ' ,
JZHCarriage numeric null ,
OtherCarriage numeric null ,
AlarmCount numeric null default - 1 ,
CarriageFreeCount numeric null default - 1 ,
BarCode nvarchar ( 100 ) null default ' -1 ' ,
Stock numeric null default 0 ,
SortFlag char ( 1 ) null ,
CatIdMerId nvarchar ( 100 ) not null ,
CommendTag char ( 1 ) null default ' 0 ' ,
MerBrand nvarchar ( 50 ) null ,
constraint PK_EB_B2C_SYSTEM_MERCHANDISE primary key (CatIdMerId)
)
go
CS代码:
using
System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class system_B2C_MerchandiseUpDown : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDataGridView();
Bindrepeater();
}
}
protected void anp_user_PageChanged(object sender, EventArgs e)
{
}
/// <summary>
/// 绑定GridView
/// </summary>
public void BindDataGridView()
{
eb_b2c_system_merchandise mer = new eb_b2c_system_merchandise();
DataTable dt = mer.GetAllMer();
if (dt != null && dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["MerState"].ToString() == "1")
{ dt.Rows[i]["MerState"] = "√"; }
else
{ dt.Rows[i]["MerState"] = "×"; }
if (dt.Rows[i]["NewMerTag"].ToString() == "1")
{ dt.Rows[i]["NewMerTag"] = "√"; }
else
{ dt.Rows[i]["NewMerTag"] = ""; }
if (dt.Rows[i]["BestMerTag"].ToString() == "1")
{ dt.Rows[i]["BestMerTag"] = "√"; }
else
{ dt.Rows[i]["BestMerTag"] = ""; }
if (dt.Rows[i]["PreferentialMerTag"].ToString() == "1")
{ dt.Rows[i]["PreferentialMerTag"] = "√"; }
else
{ dt.Rows[i]["PreferentialMerTag"] = ""; }
if (dt.Rows[i]["SortFlag"].ToString() == "1")
{ dt.Rows[i]["SortFlag"] = "√"; }
else
{ dt.Rows[i]["SortFlag"] = ""; }
if (dt.Rows[i]["SellHotTag"].ToString() == "1")
{ dt.Rows[i]["SellHotTag"] = "√"; }
else
{ dt.Rows[i]["SellHotTag"] = ""; }
if (dt.Rows[i]["CommendTag"].ToString() == "1")
{ dt.Rows[i]["CommendTag"] = "√"; }
else
{ dt.Rows[i]["CommendTag"] = ""; }
dt.Rows[i]["PicName"] = "image/productimg/" + dt.Rows[i]["PicName"].ToString();
}
}
SortPags sp = new SortPags(dt);
this.GridView1.DataSource = sp.GetCurrentPage(anp_user.PageSize, anp_user.CurrentPageIndex);
this.GridView1.DataBind();
anp_user.RecordCount = dt.Rows.Count;
//动态设置用户自定义文本内容
anp_user.CustomInfoHTML = "记录总数:<font color="blue"><b>" + anp_user.RecordCount.ToString() + "</b></font>";
anp_user.CustomInfoHTML += " 总页数:<font color="blue"><b>" + anp_user.PageCount.ToString() + "</b></font>";
anp_user.CustomInfoHTML += " 当前页:<font color="red"><b>" + anp_user.CurrentPageIndex.ToString() + "</b></font>";
}
public void Bindrepeater()
{
eb_b2c_system_merchandise mer = new eb_b2c_system_merchandise();
DataTable dt = mer.GetAllMer();
if (dt != null && dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["MerState"].ToString() == "1")
{ dt.Rows[i]["MerState"] = "√"; }
else
{ dt.Rows[i]["MerState"] = "×"; }
if (dt.Rows[i]["NewMerTag"].ToString() == "1")
{ dt.Rows[i]["NewMerTag"] = "√"; }
else
{ dt.Rows[i]["NewMerTag"] = ""; }
if (dt.Rows[i]["BestMerTag"].ToString() == "1")
{ dt.Rows[i]["BestMerTag"] = "√"; }
else
{ dt.Rows[i]["BestMerTag"] = ""; }
if (dt.Rows[i]["PreferentialMerTag"].ToString() == "1")
{ dt.Rows[i]["PreferentialMerTag"] = "√"; }
else
{ dt.Rows[i]["PreferentialMerTag"] = ""; }
if (dt.Rows[i]["SortFlag"].ToString() == "1")
{ dt.Rows[i]["SortFlag"] = "√"; }
else
{ dt.Rows[i]["SortFlag"] = ""; }
if (dt.Rows[i]["SellHotTag"].ToString() == "1")
{ dt.Rows[i]["SellHotTag"] = "√"; }
else
{ dt.Rows[i]["SellHotTag"] = ""; }
if (dt.Rows[i]["CommendTag"].ToString() == "1")
{ dt.Rows[i]["CommendTag"] = "√"; }
else
{ dt.Rows[i]["CommendTag"] = ""; }
dt.Rows[i]["PicName"] = "image/productimg/" + dt.Rows[i]["PicName"].ToString();
}
}
rep_noJoin.DataSource = dt.DefaultView;
rep_noJoin.DataBind();
}
protected void bt_Up_Click(object sender, EventArgs e)
{
gridview
for (int i = 0; i < rep_noJoin.Items.Count; i++)
{
System.Web.UI.HtmlControls.HtmlInputCheckBox checkbox = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rep_noJoin.Items[i].FindControl("checkbox1");
if (checkbox != null)
{
if (checkbox.Checked)
{
string catIDMerID = ((System.Web.UI.HtmlControls.HtmlInputHidden)rep_noJoin.Items[i].FindControl("hd_id")).Value;
if (catIDMerID != "")
{
eb_b2c_system_merchandise eb = new eb_b2c_system_merchandise();
eb.UpdataMerState("1", catIDMerID);
}
}
}
}
Bindrepeater();
}
protected void bt_Down_Click(object sender, EventArgs e)
{
GridView
for (int i = 0; i < rep_noJoin.Items.Count; i++)
{
System.Web.UI.HtmlControls.HtmlInputCheckBox checkbox = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rep_noJoin.Items[i].FindControl("checkbox1");
// System.Web.UI.HtmlControls.HtmlInputHidden hiddenCatIdMerId= (System.Web.UI.HtmlControls.HtmlInputHidden)rep_noJoin.Items[i].FindControl("hiddenCatIdMerId");
if (checkbox != null)
{
if (checkbox.Checked)
{
string catIDMerID = ((System.Web.UI.HtmlControls.HtmlInputHidden)rep_noJoin.Items[i].FindControl("hd_id")).Value;
if (catIDMerID != "")
{
eb_b2c_system_merchandise eb = new eb_b2c_system_merchandise();
eb.UpdataMerState("0", catIDMerID);
}
}
}
}
Bindrepeater();
}
protected void GridView1_DataBound(object sender, EventArgs e)
{
foreach (GridViewRow r in GridView1.Rows)
{
if (r.RowType == DataControlRowType.DataRow)
{
Label leb1 = ((Label)r.FindControl("Label1"));
HyperLink hl = (HyperLink)r.FindControl("HyperLink1");
if (leb1.Text == "√")
{
hl.Visible = false;
}
Label lb = (Label)r.FindControl("Label2");
string catIDMerID = lb.Text.ToString().Trim();
hl.NavigateUrl = "B2C_MerchandiseEdit.aspx?catIDMerID=" + catIDMerID;
}
}
}
protected void rep_noJoin_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
//for (int i = 0; i < rep_noJoin.Items.Count; i++)
//{
System.Web.UI.HtmlControls.HtmlInputHidden MerState = (System.Web.UI.HtmlControls.HtmlInputHidden)e.Item.FindControl("MerState");
//checkbox = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rep_noJoin.Items[i].FindControl("checkbox1");
System.Web.UI.HtmlControls.HtmlAnchor HtmlAnchor = (System.Web.UI.HtmlControls.HtmlAnchor)e.Item.FindControl("a_edit");
System.Web.UI.HtmlControls.HtmlInputHidden catIDMerID = (System.Web.UI.HtmlControls.HtmlInputHidden)e.Item.FindControl("hd_id");
if (MerState != null && HtmlAnchor != null && catIDMerID!=null)
{
if (MerState.Value == "√")
{
HtmlAnchor.Visible = false;
}
else
{
HtmlAnchor.Visible = true; HtmlAnchor.HRef = "B2C_MerchandiseEdit.aspx?catIDMerID=" + catIDMerID.Value;
}
//}
}
}
}
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class system_B2C_MerchandiseUpDown : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDataGridView();
Bindrepeater();
}
}
protected void anp_user_PageChanged(object sender, EventArgs e)
{
}
/// <summary>
/// 绑定GridView
/// </summary>
public void BindDataGridView()
{
eb_b2c_system_merchandise mer = new eb_b2c_system_merchandise();
DataTable dt = mer.GetAllMer();
if (dt != null && dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["MerState"].ToString() == "1")
{ dt.Rows[i]["MerState"] = "√"; }
else
{ dt.Rows[i]["MerState"] = "×"; }
if (dt.Rows[i]["NewMerTag"].ToString() == "1")
{ dt.Rows[i]["NewMerTag"] = "√"; }
else
{ dt.Rows[i]["NewMerTag"] = ""; }
if (dt.Rows[i]["BestMerTag"].ToString() == "1")
{ dt.Rows[i]["BestMerTag"] = "√"; }
else
{ dt.Rows[i]["BestMerTag"] = ""; }
if (dt.Rows[i]["PreferentialMerTag"].ToString() == "1")
{ dt.Rows[i]["PreferentialMerTag"] = "√"; }
else
{ dt.Rows[i]["PreferentialMerTag"] = ""; }
if (dt.Rows[i]["SortFlag"].ToString() == "1")
{ dt.Rows[i]["SortFlag"] = "√"; }
else
{ dt.Rows[i]["SortFlag"] = ""; }
if (dt.Rows[i]["SellHotTag"].ToString() == "1")
{ dt.Rows[i]["SellHotTag"] = "√"; }
else
{ dt.Rows[i]["SellHotTag"] = ""; }
if (dt.Rows[i]["CommendTag"].ToString() == "1")
{ dt.Rows[i]["CommendTag"] = "√"; }
else
{ dt.Rows[i]["CommendTag"] = ""; }
dt.Rows[i]["PicName"] = "image/productimg/" + dt.Rows[i]["PicName"].ToString();
}
}
SortPags sp = new SortPags(dt);
this.GridView1.DataSource = sp.GetCurrentPage(anp_user.PageSize, anp_user.CurrentPageIndex);
this.GridView1.DataBind();
anp_user.RecordCount = dt.Rows.Count;
//动态设置用户自定义文本内容
anp_user.CustomInfoHTML = "记录总数:<font color="blue"><b>" + anp_user.RecordCount.ToString() + "</b></font>";
anp_user.CustomInfoHTML += " 总页数:<font color="blue"><b>" + anp_user.PageCount.ToString() + "</b></font>";
anp_user.CustomInfoHTML += " 当前页:<font color="red"><b>" + anp_user.CurrentPageIndex.ToString() + "</b></font>";
}
public void Bindrepeater()
{
eb_b2c_system_merchandise mer = new eb_b2c_system_merchandise();
DataTable dt = mer.GetAllMer();
if (dt != null && dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["MerState"].ToString() == "1")
{ dt.Rows[i]["MerState"] = "√"; }
else
{ dt.Rows[i]["MerState"] = "×"; }
if (dt.Rows[i]["NewMerTag"].ToString() == "1")
{ dt.Rows[i]["NewMerTag"] = "√"; }
else
{ dt.Rows[i]["NewMerTag"] = ""; }
if (dt.Rows[i]["BestMerTag"].ToString() == "1")
{ dt.Rows[i]["BestMerTag"] = "√"; }
else
{ dt.Rows[i]["BestMerTag"] = ""; }
if (dt.Rows[i]["PreferentialMerTag"].ToString() == "1")
{ dt.Rows[i]["PreferentialMerTag"] = "√"; }
else
{ dt.Rows[i]["PreferentialMerTag"] = ""; }
if (dt.Rows[i]["SortFlag"].ToString() == "1")
{ dt.Rows[i]["SortFlag"] = "√"; }
else
{ dt.Rows[i]["SortFlag"] = ""; }
if (dt.Rows[i]["SellHotTag"].ToString() == "1")
{ dt.Rows[i]["SellHotTag"] = "√"; }
else
{ dt.Rows[i]["SellHotTag"] = ""; }
if (dt.Rows[i]["CommendTag"].ToString() == "1")
{ dt.Rows[i]["CommendTag"] = "√"; }
else
{ dt.Rows[i]["CommendTag"] = ""; }
dt.Rows[i]["PicName"] = "image/productimg/" + dt.Rows[i]["PicName"].ToString();
}
}
rep_noJoin.DataSource = dt.DefaultView;
rep_noJoin.DataBind();
}
protected void bt_Up_Click(object sender, EventArgs e)
{
gridview
for (int i = 0; i < rep_noJoin.Items.Count; i++)
{
System.Web.UI.HtmlControls.HtmlInputCheckBox checkbox = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rep_noJoin.Items[i].FindControl("checkbox1");
if (checkbox != null)
{
if (checkbox.Checked)
{
string catIDMerID = ((System.Web.UI.HtmlControls.HtmlInputHidden)rep_noJoin.Items[i].FindControl("hd_id")).Value;
if (catIDMerID != "")
{
eb_b2c_system_merchandise eb = new eb_b2c_system_merchandise();
eb.UpdataMerState("1", catIDMerID);
}
}
}
}
Bindrepeater();
}
protected void bt_Down_Click(object sender, EventArgs e)
{
GridView
for (int i = 0; i < rep_noJoin.Items.Count; i++)
{
System.Web.UI.HtmlControls.HtmlInputCheckBox checkbox = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rep_noJoin.Items[i].FindControl("checkbox1");
// System.Web.UI.HtmlControls.HtmlInputHidden hiddenCatIdMerId= (System.Web.UI.HtmlControls.HtmlInputHidden)rep_noJoin.Items[i].FindControl("hiddenCatIdMerId");
if (checkbox != null)
{
if (checkbox.Checked)
{
string catIDMerID = ((System.Web.UI.HtmlControls.HtmlInputHidden)rep_noJoin.Items[i].FindControl("hd_id")).Value;
if (catIDMerID != "")
{
eb_b2c_system_merchandise eb = new eb_b2c_system_merchandise();
eb.UpdataMerState("0", catIDMerID);
}
}
}
}
Bindrepeater();
}
protected void GridView1_DataBound(object sender, EventArgs e)
{
foreach (GridViewRow r in GridView1.Rows)
{
if (r.RowType == DataControlRowType.DataRow)
{
Label leb1 = ((Label)r.FindControl("Label1"));
HyperLink hl = (HyperLink)r.FindControl("HyperLink1");
if (leb1.Text == "√")
{
hl.Visible = false;
}
Label lb = (Label)r.FindControl("Label2");
string catIDMerID = lb.Text.ToString().Trim();
hl.NavigateUrl = "B2C_MerchandiseEdit.aspx?catIDMerID=" + catIDMerID;
}
}
}
protected void rep_noJoin_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
//for (int i = 0; i < rep_noJoin.Items.Count; i++)
//{
System.Web.UI.HtmlControls.HtmlInputHidden MerState = (System.Web.UI.HtmlControls.HtmlInputHidden)e.Item.FindControl("MerState");
//checkbox = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rep_noJoin.Items[i].FindControl("checkbox1");
System.Web.UI.HtmlControls.HtmlAnchor HtmlAnchor = (System.Web.UI.HtmlControls.HtmlAnchor)e.Item.FindControl("a_edit");
System.Web.UI.HtmlControls.HtmlInputHidden catIDMerID = (System.Web.UI.HtmlControls.HtmlInputHidden)e.Item.FindControl("hd_id");
if (MerState != null && HtmlAnchor != null && catIDMerID!=null)
{
if (MerState.Value == "√")
{
HtmlAnchor.Visible = false;
}
else
{
HtmlAnchor.Visible = true; HtmlAnchor.HRef = "B2C_MerchandiseEdit.aspx?catIDMerID=" + catIDMerID.Value;
}
//}
}
}
}
aspx代码:
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="B2C_MerchandiseUpDown.aspx.cs"
Inherits="system_B2C_MerchandiseUpDown" %>
<% @ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<% --<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %> --%>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< html xmlns ="http://www.w3.org/1999/xhtml" >
< head runat ="server" >
< title > 无标题页 </ title >
< script language ="javascript" src ="js/Merchandise.js" type ="text/javascript" >
function ChooseAll(sel,check)
{
var objtb=document.getElementById(sel);
var num=objtb.getElementsByTagName("input");
var check=document.getElementById(check);
for(i=0;i<num.length;i++)
{
if(num[i].id!="chk_New" && num[i].id!="chk_best" && num[i].id!="chk_Hot" && num[i].id!="chk_Preferent" && num[i].id!="chk_Sort" && num[i].id!="chk_Commend" && num[i].id!="chk_Up" && num[i].id!="chk_Down")
if(num[i].tagName=="INPUT")
{
if(check.checked==true)
{num[i].checked=true;}
else{num[i].checked=false;}
}
}
}
</ script >
< link type ="text/css" href ="css/sub.css" rel ="stylesheet" />
</ head >
< body >
< form id ="form1" runat ="server" >
< div >
< asp:CheckBox ID ="chk_New" runat ="server" />
< asp:CheckBox ID ="chk_best" runat ="server" />
< asp:CheckBox ID ="chk_Preferent" runat ="server" />
< br />
< asp:CheckBox ID ="chk_Sort" runat ="server" />
< asp:CheckBox ID ="chk_Hot" runat ="server" />
< asp:CheckBox ID ="chk_Commend" runat ="server" />< br />
< asp:CheckBox ID ="chk_Up" runat ="server" />
< asp:CheckBox ID ="chk_Down" runat ="server" />< br />
< asp:Label ID ="Label1" runat ="server" Text ="Label" ></ asp:Label >
< br />
< asp:TextBox ID ="TextBox1" runat ="server" ></ asp:TextBox >
< asp:TextBox ID ="TextBox2" runat ="server" ></ asp:TextBox >< br />
< asp:TextBox ID ="TextBox3" runat ="server" ></ asp:TextBox >
< asp:DropDownList ID ="DropDownList1" runat ="server" >
</ asp:DropDownList >< br />
< asp:GridView ID ="GridView1" runat ="server" AutoGenerateColumns ="False" OnDataBound ="GridView1_DataBound" >
< Columns >
< asp:TemplateField HeaderText ="上架下架" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox1" runat ="server" ></ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:CheckBox ID ="CheckBox9" runat ="server" />
</ ItemTemplate >
< HeaderTemplate >
全选 < asp:CheckBox ID ="CheckBox10" runat ="server" onclick ='ChooseAll("form1","GridView1_ctl01_CheckBox10")' />
</ HeaderTemplate >
</ asp:TemplateField >
< asp:TemplateField HeaderText ="查看详细" >
< ItemTemplate >
< asp:LinkButton ID ="LinkButton1" runat ="server" CommandName ="show" > 详细 </ asp:LinkButton >
</ ItemTemplate >
</ asp:TemplateField >
< asp:TemplateField HeaderText ="编辑" >
< ItemTemplate >
< asp:HyperLink ID ="HyperLink1" runat ="server" > 编辑 </ asp:HyperLink >
</ ItemTemplate >
</ asp:TemplateField >
< asp:TemplateField HeaderText ="架状态" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox3" runat ="server" Text ='<%# Bind("MerState") % > '> </ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:Label ID ="Label1" runat ="server" Text ='<%# Bind("MerState") % > '> </ asp:Label >
</ ItemTemplate >
</ asp:TemplateField >
< asp:BoundField DataField ="NewMerTag" HeaderText ="新品" />
< asp:BoundField DataField ="BestMerTag" HeaderText ="最好品" />
< asp:BoundField DataField ="PreferentialMerTag" HeaderText ="优惠品" />
< asp:BoundField DataField ="SortFlag" HeaderText ="查询优先" />
< asp:BoundField DataField ="SellHotTag" HeaderText ="热销品" />
< asp:BoundField DataField ="CommendTag" HeaderText ="推荐品" />
< asp:TemplateField HeaderText ="商品编号" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox4" runat ="server" Text ='<%# Bind("CatIdMerId") % > '> </ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:Label ID ="Label2" runat ="server" Text ='<%# Bind("CatIdMerId") % > '> </ asp:Label >
</ ItemTemplate >
</ asp:TemplateField >
< asp:BoundField DataField ="MerName" HeaderText ="商品名称" />
< asp:TemplateField HeaderText ="图片" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox2" runat ="server" Text ='<%# Bind("PicName") % > '> </ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:Image ID ="Image1" runat ="server" ImageUrl ='<%#Bind("PicName")% > ' Width="50px"
Height="50px" />
</ ItemTemplate >
</ asp:TemplateField >
</ Columns >
< RowStyle HorizontalAlign ="Center" CssClass ="item1" />
< HeaderStyle CssClass ="header1" />
</ asp:GridView >
< table width ="100%" border ="0" align ="center" cellpadding ="0" cellspacing ="0" >
< tr >
< td class ="header1" >< input name ="checkbox1" id ="checkbox1" type ="checkbox" value ="checkbox" onclick ='ChooseAll("form1","checkbox1")' />
全选 </ td >
< td class ="header1" >
查看详细 </ td >
< td class ="header1" >
编辑 </ td >
< td class ="header1" >
架状态 </ td >
< td class ="header1" >
是否在删除区 </ td >
< td class ="header1" >
新品 </ td >
< td class ="header1" >
最好品 </ td >
< td class ="header1" >
优惠品 </ td >
< td class ="header1" >
查询优先 </ td >
< td class ="header1" >
热销品 </ td >
< td class ="header1" >
推荐品 </ td >
< td class ="header1" >
商品代号 </ td >
< td class ="header1" >
商品编号 </ td >
< td class ="header1" >
商品名称 </ td >
< td class ="header1" >
图片 </ td >
</ tr >
< asp:Repeater ID ="rep_noJoin" runat ="server" OnItemDataBound ="rep_noJoin_ItemDataBound" >
< ItemTemplate >
< tr >
< td class ="item1" >
< input name ="checkbox1" id ="checkbox1" type ="checkbox" value ="checkbox" runat ="server" />
</ td >
< td class ="item1" >
< a href ='B2C_UserAdd.aspx?id=<%# DataBinder.Eval(Container, "DataItem.CatIdMerId") % > '>详细 </ a >
</ td >
< td class ="item1" >
< a runat ="server" id ="a_edit" visible ="false" > 编辑 </ a >
<% --<input type="hidden" runat="server" id="hiddenCatIdMerId" value='<%# DataBinder.Eval(Container, "DataItem.CatIdMerId")%>' />--%>
</td>
<td class="item1">
<%# DataBinder.Eval(Container, "DataItem.MerState") %> < input type ="hidden" runat ="server" id ="MerState" value ='<%# DataBinder.Eval(Container, "DataItem.MerState")% > ' />
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.MerState") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.NewMerTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.BestMerTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.PreferentialMerTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.SortFlag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.SellHotTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.CommendTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.MerId") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.CatIdMerId") %> < input type ="hidden" runat ="server" id ="hd_id" value ='<%# DataBinder.Eval(Container, "DataItem.CatIdMerId")% > ' />
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.MerName") %>
</ td >
< td class ="item1" >
< asp:Image ID ="Image2" runat ="server" ImageUrl ='<%# DataBinder.Eval(Container, "DataItem.PicName")% > ' Width="20px" Height="20px"/>
</ td >
</ tr >
</ ItemTemplate >
</ asp:Repeater >
< tr >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
</ tr >
</ table >
< table width ="100%" border ="0" cellspacing ="0" cellpadding ="0" >
< tr >
< td style ="height: 19px" >
< webdiyer:AspNetPager id ="anp_user" runat ="server" pagesize ="10" showcustominfosection ="Left"
horizontalalign ="Right" alwaysshow ="True" onpagechanged ="anp_user_PageChanged" ></ webdiyer:AspNetPager >
<% --<webdiyer:AspNetPager ID="AspNetPager1" runat="server">
</webdiyer:AspNetPager>-- %>
</ td >
</ tr >
</ table >
< asp:Button ID ="bt_Up" runat ="server" Text ="选中商品上架" CssClass ="button3" OnClick ="bt_Up_Click" />
< asp:Button ID ="bt_Down" runat ="server" Text ="选中商品下架" CssClass ="button3" OnClick ="bt_Down_Click" />
</ div >
</ form >
</ body >
</ html >
Inherits="system_B2C_MerchandiseUpDown" %>
<% @ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<% --<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %> --%>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< html xmlns ="http://www.w3.org/1999/xhtml" >
< head runat ="server" >
< title > 无标题页 </ title >
< script language ="javascript" src ="js/Merchandise.js" type ="text/javascript" >
function ChooseAll(sel,check)
{
var objtb=document.getElementById(sel);
var num=objtb.getElementsByTagName("input");
var check=document.getElementById(check);
for(i=0;i<num.length;i++)
{
if(num[i].id!="chk_New" && num[i].id!="chk_best" && num[i].id!="chk_Hot" && num[i].id!="chk_Preferent" && num[i].id!="chk_Sort" && num[i].id!="chk_Commend" && num[i].id!="chk_Up" && num[i].id!="chk_Down")
if(num[i].tagName=="INPUT")
{
if(check.checked==true)
{num[i].checked=true;}
else{num[i].checked=false;}
}
}
}
</ script >
< link type ="text/css" href ="css/sub.css" rel ="stylesheet" />
</ head >
< body >
< form id ="form1" runat ="server" >
< div >
< asp:CheckBox ID ="chk_New" runat ="server" />
< asp:CheckBox ID ="chk_best" runat ="server" />
< asp:CheckBox ID ="chk_Preferent" runat ="server" />
< br />
< asp:CheckBox ID ="chk_Sort" runat ="server" />
< asp:CheckBox ID ="chk_Hot" runat ="server" />
< asp:CheckBox ID ="chk_Commend" runat ="server" />< br />
< asp:CheckBox ID ="chk_Up" runat ="server" />
< asp:CheckBox ID ="chk_Down" runat ="server" />< br />
< asp:Label ID ="Label1" runat ="server" Text ="Label" ></ asp:Label >
< br />
< asp:TextBox ID ="TextBox1" runat ="server" ></ asp:TextBox >
< asp:TextBox ID ="TextBox2" runat ="server" ></ asp:TextBox >< br />
< asp:TextBox ID ="TextBox3" runat ="server" ></ asp:TextBox >
< asp:DropDownList ID ="DropDownList1" runat ="server" >
</ asp:DropDownList >< br />
< asp:GridView ID ="GridView1" runat ="server" AutoGenerateColumns ="False" OnDataBound ="GridView1_DataBound" >
< Columns >
< asp:TemplateField HeaderText ="上架下架" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox1" runat ="server" ></ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:CheckBox ID ="CheckBox9" runat ="server" />
</ ItemTemplate >
< HeaderTemplate >
全选 < asp:CheckBox ID ="CheckBox10" runat ="server" onclick ='ChooseAll("form1","GridView1_ctl01_CheckBox10")' />
</ HeaderTemplate >
</ asp:TemplateField >
< asp:TemplateField HeaderText ="查看详细" >
< ItemTemplate >
< asp:LinkButton ID ="LinkButton1" runat ="server" CommandName ="show" > 详细 </ asp:LinkButton >
</ ItemTemplate >
</ asp:TemplateField >
< asp:TemplateField HeaderText ="编辑" >
< ItemTemplate >
< asp:HyperLink ID ="HyperLink1" runat ="server" > 编辑 </ asp:HyperLink >
</ ItemTemplate >
</ asp:TemplateField >
< asp:TemplateField HeaderText ="架状态" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox3" runat ="server" Text ='<%# Bind("MerState") % > '> </ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:Label ID ="Label1" runat ="server" Text ='<%# Bind("MerState") % > '> </ asp:Label >
</ ItemTemplate >
</ asp:TemplateField >
< asp:BoundField DataField ="NewMerTag" HeaderText ="新品" />
< asp:BoundField DataField ="BestMerTag" HeaderText ="最好品" />
< asp:BoundField DataField ="PreferentialMerTag" HeaderText ="优惠品" />
< asp:BoundField DataField ="SortFlag" HeaderText ="查询优先" />
< asp:BoundField DataField ="SellHotTag" HeaderText ="热销品" />
< asp:BoundField DataField ="CommendTag" HeaderText ="推荐品" />
< asp:TemplateField HeaderText ="商品编号" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox4" runat ="server" Text ='<%# Bind("CatIdMerId") % > '> </ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:Label ID ="Label2" runat ="server" Text ='<%# Bind("CatIdMerId") % > '> </ asp:Label >
</ ItemTemplate >
</ asp:TemplateField >
< asp:BoundField DataField ="MerName" HeaderText ="商品名称" />
< asp:TemplateField HeaderText ="图片" >
< EditItemTemplate >
< asp:TextBox ID ="TextBox2" runat ="server" Text ='<%# Bind("PicName") % > '> </ asp:TextBox >
</ EditItemTemplate >
< ItemTemplate >
< asp:Image ID ="Image1" runat ="server" ImageUrl ='<%#Bind("PicName")% > ' Width="50px"
Height="50px" />
</ ItemTemplate >
</ asp:TemplateField >
</ Columns >
< RowStyle HorizontalAlign ="Center" CssClass ="item1" />
< HeaderStyle CssClass ="header1" />
</ asp:GridView >
< table width ="100%" border ="0" align ="center" cellpadding ="0" cellspacing ="0" >
< tr >
< td class ="header1" >< input name ="checkbox1" id ="checkbox1" type ="checkbox" value ="checkbox" onclick ='ChooseAll("form1","checkbox1")' />
全选 </ td >
< td class ="header1" >
查看详细 </ td >
< td class ="header1" >
编辑 </ td >
< td class ="header1" >
架状态 </ td >
< td class ="header1" >
是否在删除区 </ td >
< td class ="header1" >
新品 </ td >
< td class ="header1" >
最好品 </ td >
< td class ="header1" >
优惠品 </ td >
< td class ="header1" >
查询优先 </ td >
< td class ="header1" >
热销品 </ td >
< td class ="header1" >
推荐品 </ td >
< td class ="header1" >
商品代号 </ td >
< td class ="header1" >
商品编号 </ td >
< td class ="header1" >
商品名称 </ td >
< td class ="header1" >
图片 </ td >
</ tr >
< asp:Repeater ID ="rep_noJoin" runat ="server" OnItemDataBound ="rep_noJoin_ItemDataBound" >
< ItemTemplate >
< tr >
< td class ="item1" >
< input name ="checkbox1" id ="checkbox1" type ="checkbox" value ="checkbox" runat ="server" />
</ td >
< td class ="item1" >
< a href ='B2C_UserAdd.aspx?id=<%# DataBinder.Eval(Container, "DataItem.CatIdMerId") % > '>详细 </ a >
</ td >
< td class ="item1" >
< a runat ="server" id ="a_edit" visible ="false" > 编辑 </ a >
<% --<input type="hidden" runat="server" id="hiddenCatIdMerId" value='<%# DataBinder.Eval(Container, "DataItem.CatIdMerId")%>' />--%>
</td>
<td class="item1">
<%# DataBinder.Eval(Container, "DataItem.MerState") %> < input type ="hidden" runat ="server" id ="MerState" value ='<%# DataBinder.Eval(Container, "DataItem.MerState")% > ' />
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.MerState") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.NewMerTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.BestMerTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.PreferentialMerTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.SortFlag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.SellHotTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.CommendTag") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.MerId") %>
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.CatIdMerId") %> < input type ="hidden" runat ="server" id ="hd_id" value ='<%# DataBinder.Eval(Container, "DataItem.CatIdMerId")% > ' />
</ td >
< td class ="item1" >
<% # DataBinder.Eval(Container, "DataItem.MerName") %>
</ td >
< td class ="item1" >
< asp:Image ID ="Image2" runat ="server" ImageUrl ='<%# DataBinder.Eval(Container, "DataItem.PicName")% > ' Width="20px" Height="20px"/>
</ td >
</ tr >
</ ItemTemplate >
</ asp:Repeater >
< tr >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
< td class ="footer1" >
</ td >
</ tr >
</ table >
< table width ="100%" border ="0" cellspacing ="0" cellpadding ="0" >
< tr >
< td style ="height: 19px" >
< webdiyer:AspNetPager id ="anp_user" runat ="server" pagesize ="10" showcustominfosection ="Left"
horizontalalign ="Right" alwaysshow ="True" onpagechanged ="anp_user_PageChanged" ></ webdiyer:AspNetPager >
<% --<webdiyer:AspNetPager ID="AspNetPager1" runat="server">
</webdiyer:AspNetPager>-- %>
</ td >
</ tr >
</ table >
< asp:Button ID ="bt_Up" runat ="server" Text ="选中商品上架" CssClass ="button3" OnClick ="bt_Up_Click" />
< asp:Button ID ="bt_Down" runat ="server" Text ="选中商品下架" CssClass ="button3" OnClick ="bt_Down_Click" />
</ div >
</ form >
</ body >
</ html >