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 etw_c_m_Filtering : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DataSet ds = DbHelperSQL.Query("select id,usernameid from etw_onlines where  id not in(select Max(id) from etw_onlines  group by title,cast(contacter as varchar(6000)),email,address,cast(content as varchar(6000)))");
        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            DataSet dss = DbHelperSQL.Query("select id from etw_repeat where onlines_id=" + ds.Tables[0].Rows[i]["id"].ToString() + "");
            if (dss.Tables[0].Rows.Count > 0)
            { }
            else
            {
                DbHelperSQL.ExecuteSql("insert into etw_repeat(onlines_id,usernameid) values (" + ds.Tables[0].Rows[i]["id"].ToString() + "," + ds.Tables[0].Rows[i]["usernameid"].ToString() + ")");
            }
        }
    }
}
