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 join : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Ajax.Utility.RegisterTypeForAjax(this.GetType());
        this.ClientScript.RegisterClientScriptInclude("ggg", "js/Reg.js");
        this.ClientScript.RegisterClientScriptInclude("kgk", "js/md5.js");
        if (IsPostBack)
            this.RegUser(this.Request);
        
    }
    /// <summary>
    /// 注册一个用户
    /// </summary>
    /// <param name="requst"></param>
    private void RegUser(HttpRequest requst)
    {

        try
        {
            EUser user = new EUser(requst.Form["userName"], requst.Form["userPwd"], requst.Form["sex"], requst.Form["userDisplay"], requst.Form["mark"], requst.Form["contact"], requst.Form["tel"]);

        }
        catch (Exception ex)
        {
            WebConvert.JScript.JsAlert(ex.Message);
        }
    }
    /// <summary>
    /// 判断用户名是否已经存在
    /// </summary>
    /// <param name="userName">用户登陆名</param>
    /// <returns></returns>
    [Ajax.AjaxMethod]
    public string ExsitUser(string userName)
    {
        EUser user = new EUser();
        return user.ExsitUser(userName);
    }
}
