예제 #1
0
    public void isExistingAccount()
    {
        try
        {
            string ReturnValue = "false";
            try
            {
                IList <NguoiDung> listNguoiDung = new NguoiDungManagement().getNguoiDung(" where TenDangNhap=N'" + Request.QueryString["tenDangNhap"].ToString() + "'");
                if (listNguoiDung.Count > 0)
                {
                    ReturnValue = "true";
                }
            }
            catch (Exception ex)
            {
            }

            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.ContentType = "application/json; charset=utf-8";
            String resultResponse = "{\"Result\":" + ReturnValue + "}";
            HttpContext.Current.Response.Write(resultResponse);

            HttpContext.Current.Response.End();
        }
        catch (Exception ex)
        {
            //HttpContext.Current.Response.Write("err: " + ex.ToString());
            return;
        }
    }