本文整理汇总了C#中BusinessObjects.MasterDataBLL.GetBankCodeById方法的典型用法代码示例。如果您正苦于以下问题:C# MasterDataBLL.GetBankCodeById方法的具体用法?C# MasterDataBLL.GetBankCodeById怎么用?C# MasterDataBLL.GetBankCodeById使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BusinessObjects.MasterDataBLL
的用法示例。
在下文中一共展示了MasterDataBLL.GetBankCodeById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExportVendorAVMX
private bool ExportVendorAVMX(MasterData.VendorRow vendor, int logId)
{
string BakPath = ConfigurationManager.AppSettings["ExportService.BakPath"];
try {
string FileName = ConfigurationManager.AppSettings["ExportService.VendorAVMXFileName"];
string spit = "\t";
MasterDataBLL masterdatabll = new MasterDataBLL();
MasterData.CurrencyRow currency = null;
MasterData.VendorTypeRow vendorType = null;
MasterData.TransTypeRow transType = null;
MasterData.BankCodeRow bankCode = null;
MasterData.ACTypeRow acType = null;
vendorType = masterdatabll.GetVendorTypeById(vendor.VendorTypeID);
currency = masterdatabll.GetCurrencyByID(vendorType.CurrencyID);
if (!vendor.IsBankCodeIDNull()) {
MasterData.BankCodeDataTable tbBankCode = masterdatabll.GetBankCodeById(vendor.BankCodeID);
bankCode = tbBankCode[0];
if (bankCode.BankCode.Equals("999")) {
throw new Exception("BankCode为999不导出!");
}
}
if (!vendor.IsTransTypeIDNull()) {
MasterData.TransTypeDataTable tbTransType = masterdatabll.GetTransTypeById(vendor.TransTypeID);
transType = tbTransType[0];
}
if (!vendor.IsACTypeIDNull()) {
MasterData.ACTypeDataTable tbACType = masterdatabll.GetACTypeById(vendor.ACTypeID);
acType = masterdatabll.GetACTypeById(vendor.ACTypeID)[0];
}
if (vendor.IsAccountNoNull()) {
throw new Exception("银行账号为空的不导出!");
}
string content =
(vendor.IsActive ? "VM" : "VZ") + spit +
bSubstring(vendor.VendorCode, 5) + spit +
bSubstring(currency.CurrencyShortName, 3) + spit +
bSubstring(bankCode.BankCode, 3) + spit +
bSubstring(transType == null ? "" : transType.TransTypeName, 2) + spit +
bSubstring(vendor.IsBankNameNull() ? "" : vendor.BankName, 68) + spit +
bSubstring(vendor.IsAccountNoNull() ? "" : vendor.AccountNo, 32) + spit +
bSubstring(vendor.VendorName, 58) + spit +
bSubstring(acType == null ? "" : acType.ACTypeName, 1) + spit +
0 + spit +
bSubstring(vendor.IsBankNoNull() ? "" : vendor.BankNo, 11);
content = content.Replace("\r", "").Replace("\n", "") + "\r\n";
File.AppendAllText(path + FileName, content, Encoding.Default);
File.AppendAllText(BakPath + DateTime.Now.ToString("yyyyMMddhhmmss") + FileName, content, Encoding.Default);
} catch (Exception e) {
logbll.InsertExportLogDetail(logId, "VendorCode:" + vendor.VendorCode + ",VendorName:" + vendor.VendorName + "" + ",错误信息:" + e.Message);
return false;
}
return true;
}
示例2: ExportVendorAVM
/// <summary>
/// Vendor导出
/// </summary>
/// <param name="FormID"></param>
/// <returns></returns>
private bool ExportVendorAVM(MasterData.VendorRow vendor, int logId)
{
string BakPath = ConfigurationManager.AppSettings["ExportService.BakPath"];
FormVendorBLL formvendorbll = new FormVendorBLL();
MasterDataBLL masterdatabll = new MasterDataBLL();
try {
string FileName = ConfigurationManager.AppSettings["ExportService.VendorAVMFileName"];
string spit = "\t";
MasterData.PaymentTermRow paymentTerm = null;
MasterData.VendorTypeRow vendorType = null;
MasterData.CompanyRow company = null;
MasterData.CurrencyRow currency = null;
MasterData.MethodPaymentRow paymentType = null;
MasterData.VatTypeRow VatType = null;
MasterData.BankCodeRow bankCode = null;
MasterData.TransTypeRow transType = null;
MasterData.ACTypeRow acType = null;
paymentTerm = masterdatabll.GetPaymentTermById(vendor.PaymentTermID)[0];
vendorType = masterdatabll.GetVendorTypeById(vendor.VendorTypeID);
company = masterdatabll.GetCompanyById(vendor.CompanyID);
currency = masterdatabll.GetCurrencyByID(vendorType.CurrencyID);
paymentType = masterdatabll.GetMethodPaymentById(vendor.MethodPaymentID)[0];
VatType = masterdatabll.GetVatTypeById(vendor.VATTypeID)[0];
bankCode = masterdatabll.GetBankCodeById(vendor.BankCodeID)[0];
transType = masterdatabll.GetTransTypeById(vendor.TransTypeID)[0];
acType = masterdatabll.GetACTypeById(vendor.ACTypeID)[0];
string ActionName = "";
string content = "";
switch (vendor.ActionType) {
case 0:
ActionName = "D";
#region 删除
content =
"" + spit +
ActionName + spit +
"" + spit +
"VZ" + spit +
bSubstring(vendor.VendorCode, 5) + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
0 + spit +
0 + spit +
0 + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
0 + spit +
"" + spit +
"" + spit +
"" + spit +
0 + spit +
"" + spit +
0 + spit +
0 + spit +
0 + spit +
0 + spit +
0 + spit +
0 + spit +
"" + spit +
"" + spit +
0 + spit +
"" + spit +
"" + spit +
0 + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
0 + spit +
0 + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
0 + spit +
0 + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
"" + spit +
//.........这里部分代码省略.........