using System;
using System.Data;
using System.Configuration;
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;
//该源码下载自www.51aspx.com(５１aｓｐｘ．ｃｏｍ)

/// <summary>
/// MyHandler 的摘要说明
/// </summary>
public class MyHandler:IHttpHandler
{
    public MyHandler()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }

    #region IHttpHandler 成员

    public bool IsReusable
    {
        get { throw new Exception("The method or operation is not implemented."); }
    }

    public void ProcessRequest(HttpContext context)
    {
        int i = context.Request.RawUrl.LastIndexOf("?");
        string path = context.Request.RawUrl.Substring(i);
        int n = path.IndexOf("=");
        string catid = path.Substring(1, n - 1);
        string id = path.Substring(n + 1);
        string[] arg = id.Split(new char[] { '*' });
        string loginName = context.User.Identity.Name;
        Model.User user = new Model.User();
        user.LoginName = loginName;
        user.Pwd = arg[1];
        user.DisPlay = arg[0];
        user.Contact= arg[2];
        user.Tel = arg[3];
        Business.BUser userOp = new Business.BUser();
        try
        {
            userOp.ModifyUserInfo(user);
        }
        catch (Exception ex)
        {
            
            throw new Exception(ex.Message);
        }
    }

    #endregion
}
