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;
using JuSNS.Home;

namespace JuSNS.Web.Inc.Ajax.mail
{
    public partial class DelAjax : JuSNS.UI.Page.UserPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            StartDel();
        }

        /// <summary>
        /// ¿ªÊ¼É¾³ý
        /// </summary>
        /// <returns></returns>
        protected void StartDel()
        {
            string s_Type = Request.QueryString["Type"];
            string s_ID = Request.QueryString["ID"];
            int ID = Convert.ToInt32(s_ID);
            int n = 0;

            switch (s_Type)
            {
                case "OutLett":
                    Mail letter0 = new Mail();
                    n = letter0.Del(0, ID, UserID);
                    break;
                case "InLett":
                    Mail letter1 = new Mail();
                    n = letter1.Del(1, ID, UserID);
                    break;
            }
            Response.Write(n.ToString());
            Response.End();
        }
    }
}
