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_returnstatus : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie GetCookie = Request.Cookies["cook_admin"];
        if (Request.Cookies["cook_admin"] == null)
        {
            Response.Redirect("index.aspx");
        }
        if (!IsPostBack)
        {
           int id=Convert.ToInt32( Request.QueryString["id"].ToString());
           int chatid = Convert.ToInt32(Request.QueryString["chatid"].ToString());
           etw.etw_translate lead = new etw.etw_translate();
           lead.id = id;
           lead.GetModel();
           string ischild =Convert.ToString( lead.ischild);
           if (ischild == "0")
           {
               DbHelperSQL.ExecuteSql("update etw_onlines set readed='0' where id=" + chatid + "");
           }
           else
           {
               DbHelperSQL.ExecuteSql("update etw_onlines set childreaded='0' where id=" + chatid + " ");
           }
           DbHelperSQL.ExecuteSql("update etw_translate set achivetime=0 where id=" + id + "");
           Response.Write("<script type='text/javascript'>history.back();</script>");
        }
    }
}
