public ABi_Vendor(YB_Vendor_Swap vendor) { this.vendorCode = vendor.Lifnr; if (vendorCode.Length > 6) this.vendorCode = this.vendorCode.Substring(this.vendorCode.Length - 6, 6); this.vendorName = vendor.Name1; this.taxNumber = vendor.Stceg; this.industryCode = vendor.Brsch; this.dateCreated = vendor.Date_entered; this.dateModified = vendor.Date_modified; this.blocking = vendor.Sperr; this.deletion = vendor.Loevm; this.bankCode = vendor.Bankl; this.bankName = vendor.Banka; this.bankAccount = vendor.Bankn; this.receiverName = vendor.Name2; this.companyCode = vendor.Bukrs; this.paymentTerm = vendor.Zterm; }
/// <summary> /// 导入ABi_Vendor /// </summary> public void SaveABi_Vendor() { utils.WriteLog("开始导入ABi_Vendor"); YB_Vendor_Swap yb_vendor_swap=new YB_Vendor_Swap(); List<YB_Vendor_Swap> list = yb_vendor_swap.GetYB_Vendor_SwapList(); if (list != null && list.Count > 0) { utils.WriteLog("YB_Vendor_Swap总数" + list.Count); foreach (YB_Vendor_Swap po in list) { utils.WriteLog("YB_Vendor_Swap编号" + po.ID); ABi_Vendor vendor = new ABi_Vendor(po); if (vendor.IsNULL() == false) { if (vendor.SaveABi_Vendor()) { utils.WriteLog("YB_Vendor_Swap编号" + po.ID + "保存成功"); po.Status = "1"; po.SaveStatus(); } else utils.WriteErrorLog("YB_Vendor_Swap编号" + po.ID + "保存失败"); } else { utils.WriteErrorLog("YB_Vendor_Swap编号" + po.ID + "生成ABi_Vendor失败"); } } } utils.WriteLog("导入ABi_Vendor完成"); }