public void SaveYB_Invoice_Report_Swap()
        {
            try
            {
                utils.WriteLog("开始导入YB_Invoice_Report_Swap");
                ABi_Invoice abi_invoice = new ABi_Invoice();
                List<YB_Invoice_Report_Swap> list = abi_invoice.GetYB_Invoice_Report_SwapList();
                if (list != null && list.Count > 0)
                {
                    utils.WriteLog("YB_Invoice_Report_Swap总数" + list.Count);
                    foreach (YB_Invoice_Report_Swap invoice in list)
                    {
                        utils.WriteLog("YB_Invoice_Report_Swap发票编号" + invoice.Invoice_no);
                        if (invoice.SaveYB_Invoice_Report_Swap())//如果保存成功
                        {
                            utils.WriteLog("YB_Invoice_Report_Swap编号" + invoice.Invoice_no + "保存成功");
                            abi_invoice.UpdateInvoiceSynced(invoice.Invoice_no,invoice.Bukrs, "1");
                        }
                        else
                            utils.WriteErrorLog("YB_Invoice_Report_Swap编号" + invoice.Invoice_no + "保存失败");

                    }
                }
                utils.WriteLog("导入YB_Invoice_Report_Swap完成");
            }
            catch (Exception error)
            {
                utils.WriteErrorLog("导入YB_Invoice_Report_Swap发生异常" + error.Message);
            }
        }
 /// <summary>
 /// 更新Abi_Invoice
 /// </summary>
 public void UpdateAbi_Invoice()
 {
     //先处理YB_Payment_Report_Swap
     YB_Payment_Report_Swap yb_payment_report_swap=new YB_Payment_Report_Swap();
     List<YB_Payment_Report_Swap> list = yb_payment_report_swap.GetYB_Payment_Report_SwapList();
     if (list != null && list.Count > 0)
     {
         foreach (YB_Payment_Report_Swap yb in list)
         {
             ABi_Invoice abi = new ABi_Invoice();
             if (abi.Update(yb))
             {
                 yb.SaveStatus("1");
             }
         }
     }
     //然后处理YB_Miro_IV_Swap
     YB_Miro_IV_Swap yb_miro_iv_swap=new YB_Miro_IV_Swap();
     List<YB_Miro_IV_Swap> miroList = yb_miro_iv_swap.GetYB_Miro_IV_SwapList();
     if (miroList != null && miroList.Count > 0)
     {
         foreach (YB_Miro_IV_Swap yb in miroList)
         {
             ABi_Invoice abi = new ABi_Invoice();
             if (abi.Update(yb))
             {
                 yb.SaveStatus("1");
             }
         }
     }
     //最后处理YB_DP_Item_Swap
     YB_DP_Item_Swap yb_dp_item_swap = new YB_DP_Item_Swap();
     List<YB_DP_Item_Swap> itemList = yb_dp_item_swap.GetYB_DP_Item_SwapList();
     if (itemList != null && itemList.Count > 0)
     {
         foreach (YB_DP_Item_Swap yb in itemList)
         {
             ABi_Invoice abi = new ABi_Invoice();
             if (abi.Update(yb))
             {
                 yb.SaveStatus("1");
             }
         }
     }
 }
 public YB_Invoice_Report_Swap(ABi_Invoice abi)
 {
 }