/// <summary> /// 根据程序类型获取对应的程序信息 /// </summary> /// <param name="programType"></param> /// <returns></returns> public AdvertManage.Model.ProgramUpgradeModel GetProgramInfoByProgramType(Model.Enum.SeatManageSubsystem programType) { StringBuilder strWhere = new StringBuilder(); strWhere.AppendFormat(" Application={0}", (int)programType); DataSet ds = programUpgradeDal.GetList(strWhere.ToString(), null); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToProgramUpgradeModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 根据类型获取对应的程序信息 /// </summary> /// <param name="programType"></param> /// <returns></returns> public static AMS.Model.ProgramUpgrade GetProgramInfoByProgramType(Model.Enum.SeatManageSubsystem programType) { AMS.IBllService.IAdvertManageBllService bllService = AMS.ServiceConnectChannel.AdvertManageBllServiceChannel.CreateServiceChannel(); try { return(bllService.GetProgramInfoByProgramType(programType)); } 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(); } } }
/// <summary> /// 根据类型获取对应的程序信息 /// </summary> /// <param name="programType"></param> /// <returns></returns> public static AdvertManage.Model.ProgramUpgradeModel GetProgramInfoByProgramType(Model.Enum.SeatManageSubsystem programType) { IWCFService.IAdvertManageService advertService = WcfAccessProxy.AMS_ServiceProxy.CreateChannelAdvertManageService(); bool error = false; try { return(advertService.GetProgramInfoByProgramType(programType)); } 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(); } } }
public Model.ProgramUpgrade GetProgramInfoByProgramType(Model.Enum.SeatManageSubsystem programType) { throw new NotImplementedException(); }