Exemple #1
0
    public static Dictionary <string, object> GetInfoLogin(string _page, string _id)
    {
        Dictionary <string, object> _finServiceLoginResult = FinServiceLogin.GetFinServiceLogin(FinServiceLogin.USERTYPE_STUDENT, "e-Profile");
        Dictionary <string, object> _loginResult           = new Dictionary <string, object>();
        int    _systemError = Util.DBUtil.ChkSystemPermissionStudent(_finServiceLoginResult);
        int    _cookieError = 0;
        int    _userError   = 0;
        string _personId    = _finServiceLoginResult["PersonID"].ToString();
        string _studentId   = _finServiceLoginResult["StudentID"].ToString();

        if (_systemError.Equals(0))
        {
            _systemError = (!String.IsNullOrEmpty(_personId) ? (HCSDB.GetHCSStudentRecords(_personId).Tables[0].Rows.Count > 0 ? 0 : 6) : 6);
        }

        switch (_systemError)
        {
        case 1:
            _cookieError = 1;
            break;

        case 2:
            _userError = 1;
            break;

        case 6:
            _userError = 2;
            break;

        case 3:
            _userError = 4;
            break;

        case 4:
            _userError = 5;
            break;

        case 5:
            _userError = 6;
            break;
        }

        _loginResult.Add("CookieError", _cookieError.ToString());
        _loginResult.Add("UserError", _userError.ToString());
        _loginResult.Add("PersonId", _personId);
        _loginResult.Add("StudentId", _studentId);

        return(_loginResult);
    }
Exemple #2
0
    public static Dictionary <string, object> GetInfoLogin(string _page, string _id)
    {
        Dictionary <string, object> _finServiceLoginResult = FinServiceLogin.GetFinServiceLogin(FinServiceLogin.USERTYPE_STUDENT, "UploadDocumentStudent");
        Dictionary <string, object> _loginResult           = new Dictionary <string, object>();
        int    _systemError = Util.DBUtil.ChkSystemPermissionStudent(_finServiceLoginResult);
        int    _cookieError = 0;
        int    _userError   = 0;
        string _personId    = _finServiceLoginResult["PersonID"].ToString();
        string _studentId   = _finServiceLoginResult["StudentID"].ToString();
        string _studentCode = _finServiceLoginResult["StudentCode"].ToString();
        string _fullnameEN  = _finServiceLoginResult["FullnameEN"].ToString();

        switch (_systemError)
        {
        case 1:
            _cookieError = 1;
            break;

        case 2:
            _userError = 1;
            break;

        case 3:
            _userError = 2;
            break;

        case 4:
            _userError = 3;
            break;

        case 5:
            _userError = 4;
            break;
        }

        _loginResult.Add("CookieError", _cookieError.ToString());
        _loginResult.Add("UserError", _userError.ToString());
        _loginResult.Add("PersonId", _personId);
        _loginResult.Add("StudentId", _studentId);
        _loginResult.Add("StudentCode", _studentCode);
        _loginResult.Add("FullnameEN", _fullnameEN);

        return(_loginResult);
    }
    public static Dictionary <string, object> GetInfoLogin()
    {
        Dictionary <string, object> _loginResult = FinServiceLogin.GetFinServiceLogin(FinServiceLogin.USERTYPE_STUDENT, "e-Profile");

        return(_loginResult);
    }