?? verifycode.cs
字號:
using System;
using System.Runtime.InteropServices;
namespace HNFS.pjcx
{
/// <summary>
/// VerifyCode 的摘要說明。
/// </summary>
public class VerifyCode
{
[DllImport("VerifyCode.dll", EntryPoint="getBillNumVerifyCode")]
public static extern string getBillNumVerifyCode(String PChar);
public VerifyCode()
{
}
/// <summary>
/// 獲取一般繳款書號碼驗證碼。比如票號000000001X;則傳入參數000000001;返回值是X;
/// </summary>
/// <param name="ph">繳款書號碼的前9位數字</param>
/// <returns></returns>
public static string getBillVerifyCode(string ph)
{
return getBillNumVerifyCode(ph);
}
public static bool IsAuthenticBill(string billNum)
{
if(billNum.Length!=10)
{
return false;
}
string temp=billNum.Substring(0,9);
string temp2=billNum.Substring(9,1);
if(VerifyCode.getBillVerifyCode(temp).ToUpper().Equals(temp2.ToUpper()))
{
return true;
}
else
{
return false;
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -