Esempio n. 1
0
    public static string Login(string str_code)
    {
        comm_fun.WriteLog("str_code=" + str_code);
        string str_userID = string.Empty;

        try
        {
            Password_Encrypt_ASC.Password_Encrypt_ASC encry = new Password_Encrypt_ASC.Password_Encrypt_ASC();
            string str_encry = encry.get_password_ASC(HttpUtility.UrlDecode(str_code));
            str_userID       = str_encry.Substring(0, str_encry.IndexOf("/"));
            Cookies.UserCode = str_userID;
            comm_fun.WriteLog("str_userID=" + str_userID);
        }
        catch (Exception)
        {
            try
            {
                Password_Encrypt_ASC.Password_Encrypt_ASC encry = new Password_Encrypt_ASC.Password_Encrypt_ASC();
                string str_encry = encry.get_password_ASC(str_code);
                str_userID       = str_encry.Substring(0, str_encry.IndexOf("/"));
                Cookies.UserCode = str_userID;
                comm_fun.WriteLog("str_userID1=" + str_userID);
            }
            catch
            {
                comm_fun.WriteLog("ex");
            }
        }
        return(str_userID);
    }