using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;
using DotNet.FrameWork.Data;

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

        public void ProcessRequest(HttpContext context)
        {
            if (context.Request["type"] == "user_image")//个人图片的获取
            {
                string user_image = "select User_HeadPhoto from Dd_User where User_ID=@ID";
                SqlParameter parm_image = new SqlParameter("@ID", SqlDbType.Int);
                string url = "";
                parm_image.Value = context.Request["user_ID"].ToString();
                try
                {
                    url = DbHelperSQL.GetSingle(user_image, parm_image).ToString();
                }
                catch
                {
                    url = "";
                }
                context.Response.Write(url);
            }
        }

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