using System;
using System.Data;
using System.Configuration;
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;

/// <summary>
/// WebCount 的摘要说明
/// </summary>
public class WebCount
{
    private DataSet2 ds = new DataSet2();
    private DataSet2.WebCountDataTable dt = new DataSet2.WebCountDataTable();
    private DataSet2TableAdapters.WebCountTableAdapter da = new DataSet2TableAdapters.WebCountTableAdapter();

    public WebCount()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }
    public void ForCount(int id)
    {
        this.da.Fill(this.dt);
        int Id = id;
        for (int i = 0; i < this.dt.Rows.Count; i++)
        {
            int s = int.Parse(this.dt.Rows[i]["log_id"].ToString());
            if (s == Id)
            {
                int temp = 0;
                temp = int.Parse(this.dt.Rows[i]["click_count"].ToString());
                dt.Rows[i]["click_count"] = temp + 1;
                break;
            }
        }
        this.da.Update(this.dt);
    }

}
