示例#1
0
        public static bool getAccountInfo(int Account, ref TAccountInfo CardInfo)
        {
            bool flag;

            try
            {
                CardInfo.Size = (ushort)Marshal.SizeOf(typeof(TAccountInfo));
                if (GetAccountInfo(Account, ref CardInfo))
                {
                    LastMsg = "The request GetAccountInfo is successful";
                    p_IsGAI = true;
                    return(true);
                }
                p_IsGAI = false;
                LastMsg = GetError();
                flag    = false;
            }
            catch (Exception e)
            {
                p_IsGAI = false;
                LastMsg = e.ToString();
                flag    = false;
            }
            return(flag);
        }
示例#2
0
 public static bool setAccountInfo(TAccountInfo CardInfo)
 {
     try
     {
         if (p_IsGAI)
         {
             if (SetAccountInfo(ref CardInfo))
             {
                 LastMsg = "The request SetAccountInfo is successful";
                 return(true);
             }
             LastMsg = GetError();
             return(false);
         }
         LastMsg = "Please first call the function GetAccountInfo";
         return(false);
     }
     catch (Exception e)
     {
         LastMsg = e.ToString();
         p_IsGAI = false;
         return(false);
     }
 }
示例#3
0
 private static extern bool SetAccountInfo(ref TAccountInfo Info);
示例#4
0
 private static extern bool GetAccountInfo(int Account, ref TAccountInfo Info);
示例#5
0
 private static void AddAccount(ref TAccountInfo info)
 {
     ListAccountsInfo.Add(info);
 }