/// <summary> /// 下发优惠券的命令 /// </summary> /// <param name="model"></param> /// <returns></returns> public int AddNewCampusCommandList(Model.SlipReleaseCampus model) { try { return(dal_SlipReleaseCampus.Add(model)); } catch (Exception ex) { throw new Exception(string.Format("下发命令出错:{0}", ex.Message)); } }
/// <summary> /// 下发文件 /// </summary> /// <returns></returns> public static int IssuedSlipCommand(Model.SlipReleaseCampus model) { AMS.IBllService.IAdvertManageBllService bllService = AMS.ServiceConnectChannel.AdvertManageBllServiceChannel.CreateServiceChannel(); try { return(bllService.AddNewCampusCommandList(model)); } catch (EndpointNotFoundException ex) { throw new AMS.Model.CustomerException("连接服务器失败"); } catch (CommunicationException ex) { throw ex; } catch (Exception ex) { throw ex; } finally { ICommunicationObject ICommObjectService = bllService as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }