Ejemplo n.º 1
0
    /// <summary>
    /// Check the User Account
    /// </summary>
    /// <param name="username"></param>
    /// <returns></returns>
    public static Boolean UserAccountIsExist(string username)
    {
        using (DbAction db = new DbAction("connStr1"))
            {
                string sql = string.Format("select * from GoogleApp_Users_t where username='******'", username);

                SqlCommand cmd = new SqlCommand(sql);

                if (db.ExecuteScalar(cmd) != null)

                    return true;

                else

                    return false;
            }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// distinguish capital
    /// </summary>
    /// <param name="username"></param>
    /// <param name="error"></param>
    public static String GetUserNameInGoogleUser(string username)
    {
        using (DbAction db = new DbAction("connStr1"))
        {
            string sql = string.Format("select username from GoogleApp_Users_t where username = '******'", username);

            SqlCommand cmd = new SqlCommand(sql);

            return db.ExecuteScalar(cmd).ToString();
        }
    }