예제 #1
0
 public SepaIBAN(string sCountryCode, string sBankCode, string sAcctNo)
 {
     if ((sCountryCode == null) || (sAcctNo == null))
     {
         throw new ArgumentNullException();
     }
     if (sBankCode == null)
     {
         sBankCode = "";
     }
     if ((((sCountryCode.Length != 2) || !SepaUtil.IsAlpha(sCountryCode)) || (!SepaUtil.IsAlphaNumeric(sBankCode) || (sAcctNo.Length == 0))) || (!SepaUtil.IsAlphaNumeric(sAcctNo) || ((sBankCode.Length + sAcctNo.Length) > 30)))
     {
         throw new ArgumentException();
     }
     if (sCountryCode == "DE")
     {
         if ((!SepaUtil.IsNumeric(sBankCode) || (sBankCode.Length != 8)) || (!SepaUtil.IsNumeric(sAcctNo) || (sAcctNo.Length > 10)))
         {
             throw new ArgumentException();
         }
         sAcctNo = sAcctNo.PadLeft(10, '0');
     }
     this.f_sIBAN = SepaUtil.BuildID(sCountryCode, sBankCode + sAcctNo);
 }