protected void LoginButton_Click(object sender, EventArgs e)
    {
        App_Code.SessionManager sm=new App_Code.SessionManager(this.Page);
        BLL.VCFDataSet.UserDataTable udt =new BLL.VCFDataSetTableAdapters.UserTableAdapter().Login(UserNameTextBox.Text, PasswordTextBox.Text);
        if (udt.Count == 1)
        {
            sm.User = udt[0];

            if (sm.User.Role == Convert.ToInt16(VCFDataSet.UserDataTable.UserRoles.Admin))
                Response.Redirect("/web/AdminHome.aspx");
            else if (sm.User.Role == Convert.ToInt16(VCFDataSet.UserDataTable.UserRoles.Beneficiary))
                Response.Redirect("/web/BeneficiaryHome.aspx");
            else if (sm.User.Role == Convert.ToInt16(VCFDataSet.UserDataTable.UserRoles.Donor))
                Response.Redirect("/web/DonorHome.aspx");
            else if (sm.User.Role == Convert.ToInt16(VCFDataSet.UserDataTable.UserRoles.Manager))
                Response.Redirect("/web/ManagerHome.aspx");

        }
        else
        {
            sm.Message = "用户名或密码错误";
            Response.Redirect("/web/Login.aspx");
        }
    }
    public string[] GetCompletionList(string prefixText, int count)
    {
        if (count == 0)
        {
            count = 10;
        }

        if (prefixText.Equals("xyz"))
        {
            return new string[0];
        }

        //Random random = new Random();
        List<string> items = new List<string>();
        BLL.VCFDataSetTableAdapters.UserTableAdapter uta = new BLL.VCFDataSetTableAdapters.UserTableAdapter();

        BLL.VCFDataSet.UserDataTable udt=uta.GetTopNSystemUserWhereRealNameStartWith(prefixText, count);

        for (int i = 0; i < udt.Count; i++)
        {
            items.Add(VCFDataSet.UserDataTable.FormatUserName_RealName(udt[i]));
        }
        return items.ToArray();
    }