审核
来源:互联网 发布:类似it桔子 编辑:程序博客网 时间:2024/04/19 21:13
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class admin_advers : System.Web.UI.Page
{
/// <summary>
/// 广告位审核管理
/// 20091127vidy
/// 积分兑换广告位
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
upimgbind();
}
}
public void upimgbind()
{
//查询积分用户
string str = "select upimg.*,yonghu.score from Useradmin yonghu,adaddress upimg order by score desc";
DataSet ds = new DBOpea().getvalue(str);
this.GridView1.DataSource = ds;
this.GridView1.DataBind();
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals(""))
{
int ck = 0;//审核
int index = ((GridViewRow)((Button)e.CommandSource).Parent.Parent).RowIndex;
Button btn = (Button)this.GridView1.Rows[index].FindControl("Button1");
int uid = Convert.ToInt32(btn.CommandArgument.ToString());//获取id
bool chek = ((CheckBox)this.GridView1.Rows[index].FindControl("okshen")).Checked;
if (chek == true)
{
ck = 1;
}
string str = "update adaddress set shenhe=" + ck + " where id=" + uid + "";
bool ifok = new DBOpea().DataOpera(str);
if (ifok)
{
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "alert('审核成功!');", true);
}
}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridView1.PageIndex = e.NewPageIndex;
upimgbind();
}
}
//////////////////////////////////
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="advers.aspx.cs" Inherits="admin_advers" %>
<html>
<head runat="server">
<title>积分广告位管理</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width:800px;border-right: #ff9999 1px solid; border-top: #ff9999 1px solid; border-left: #ff9999 1px solid; border-bottom: #ff9999 1px solid; background-color: #ffebed;">
<tr>
<td style=" height: 16px;background-color: #ff99cc;">
<strong><span style="color: #ffffff; font-size: 12px;">官方强烈推荐,最新奇迹私服,网通奇迹私服,变态奇迹私服管理
<asp:Literal ID="Literal2" runat="server"></asp:Literal></span></strong></td>
</tr>
<tr>
<td style=" text-align: center;">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand" Width="766px" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="15">
<Columns>
<asp:BoundField DataField="id" HeaderText="编号" />
<asp:BoundField DataField="path" HeaderText="图片路径" />
<asp:BoundField DataField="adname" HeaderText="名称" />
<asp:BoundField DataField="shentime" HeaderText="审核时间" />
<asp:BoundField DataField="shenhe" HeaderText="是否审核" />
<asp:TemplateField HeaderText="审核">
<ItemTemplate>
<asp:CheckBox ID="okshen" Text="确定" runat="server" Checked='<%# Eval("shenhe") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="提交">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text="提交" CommandArgument='<%# Eval("id") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle BackColor="#FFC0FF" />
</asp:GridView>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
- 审核
- 审核。。审核。。
- 华为审核
- 审核Auditing
- 代码审核
- 多级审核
- 紧急审核。
- IOS 审核
- 加急审核
- 原始凭证审核
- 待审核?
- 紧急审核
- app审核
- 紧急审核
- 测试审核
- 加急审核
- 加急审核
- 加急审核
- oracle中dual表的用法
- Visual C#读取Excel表格中的数据
- ubuntu9.04 安装openoffice , 数学公式, 字体等
- 必备武器-skycc营销软件
- asp.net取得系统时间日期的各种形式
- 审核
- 太恐怖了,什么都能查!
- Database Update
- u盘又中了招
- 用js判断中文字符串的长度
- ASP.NET - 使用 SqlDataSource 控件修改数据
- VS 使用技巧
- C#高级编程
- 一致性代码段和非一致性代码段