diff --git a/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs b/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs index 76135e4..bfae137 100644 --- a/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs +++ b/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs @@ -896,21 +896,29 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire int ISXSNUM = 0; - + errorList = new List(); //循环收款单/新增核销记录 foreach (var item in fCombinaAddSK) { - //创建核销记录单 - string FBILLNO = CommonHelper.CreateAutoWrireRecord2(this.Context, Convert.ToString(FOrgId), item.XSAPList, item); - if (FBILLNO != "") + try { - Message = Message + string.Format("生成核销记录单成功,单号为:'{0}'\r\n", FBILLNO); - strings1.Add(item.FCONTRACTNUMBER); - successFbillNo.Add(item.FBIllNO); - ISXSNUM++; + //创建核销记录单 + string FBILLNO = CommonHelper.CreateAutoWrireRecord2(this.Context, Convert.ToString(FOrgId), item.XSAPList, item); + if (FBILLNO != "") + { + Message = Message + string.Format("生成核销记录单成功,单号为:'{0}'\r\n", FBILLNO); + strings1.Add(item.FCONTRACTNUMBER); + successFbillNo.Add(item.FBIllNO); + ISXSNUM++; + } + } + catch (Exception ex) + { + errorList.Add(ex.Message); } } - + if (errorList.Count > 0) + Message = Message + " 有部分单失败,原因是:"+string.Join(",", errorList); this.View.ShowMessage(Message); if (successFbillNo.Count > 0) {