/// <summary> /// 下发优惠券 /// </summary> /// <param name="SlipId"></param> /// <param name="campusid"></param> /// <returns></returns> public static int AddSlipRelease(int SlipId, int campusid) { IWCFService.IAdvertManageService advertService = WcfAccessProxy.AMS_ServiceProxy.CreateChannelAdvertManageService(); bool error = false; try { return(advertService.AddSlipRelease(SlipId, campusid)); } catch (Exception ex) { error = true; SeatManage.SeatManageComm.WriteLog.Write(string.Format("下发优惠券遇到异常,异常模块:{0};信息:{1}", ex.Source, ex.Message)); throw ex; } finally { ICommunicationObject ICommObjectService = advertService as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }