using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HteamDd.Web.ashx
{
    /// <summary>
    /// Dd_music 的摘要说明
    /// </summary>
    public class Dd_music : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            HaTeam.Dd.Model.Dd_Music Minfo = new HaTeam.Dd.Model.Dd_Music();
            HaTeam.Dd.BLL.Dd_Music bll = new HaTeam.Dd.BLL.Dd_Music();
            Minfo.User_ID = Convert.ToInt32(context.Request.Form["UserID"]);
            Minfo.Music_Address = context.Request.Form["Music_Address"] + "&artist=" + context.Request.Form["artist"] + "&extra=";
            Minfo.Music_Description = context.Request.Form["Music_Description"];
            Minfo.Music_Tag = context.Request.Form["Music_Tag"];
            Minfo.Music_OriginId = Convert.ToInt32(context.Request.Form["Music_Originld"]);
            Minfo.Music_Fever = 0;
            Minfo.Music_Datetime = DateTime.Now;
            Minfo.Music_UpDatetime = DateTime.Now;
            Minfo.Music_Verify = 0;
            Minfo.Music_Lock = 0;
            Minfo.Music_State = 0;
            Minfo.Music_Delete = 0;
            Minfo.Music_Count = 0;
            Minfo.Music_Order =2;
            if (bll.Add(Minfo) != 0)
            {
                context.Response.Write("添加成功");
            }
            else
            {
                context.Response.Write("添加失败");
            }
           
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}