/// <summary> /// 设置查询实体对象 /// </summary> private void SetMachineQueryEntity() { try { if (matchMachineQueryEntity == null) { matchMachineQueryEntity = new RC_MatchMachine(); } if (!string.IsNullOrEmpty(ddl_Bourse.Text)) { matchMachineQueryEntity.BourseTypeID = ((UComboItem)this.ddl_Bourse.SelectedItem).ValueIndex; } else { matchMachineQueryEntity.BourseTypeID = int.MaxValue; } matchMachineQueryEntity.MatchCenterID = int.MaxValue; matchMachineQueryEntity.MatchMachineID = int.MaxValue; } catch (Exception ex) { LogHelper.WriteError(ex.Message, ex); return; } }
/// <summary> /// 根据撮合机得到所属的交易所类型和所属的撮合中心-即撮合机实体 /// </summary> /// <returns></returns> public Entity.RC_MatchMachine GetMatchMachine(int MatchMachineID) { try { LogHelper.WriteDebug("Debug-8230根据撮合机得到所属的交易所类型和所属的撮合中心-即撮合机实体方法名称:GetMatchMachine(int MatchMachineID)" + DateTime.Now); RC_MatchMachineBLL RC_MatchMachine = new RC_MatchMachineBLL(); List <Entity.RC_MatchMachine> rC_MatchMachineList = RC_MatchMachine.GetListArray(string.Format("MatchMachineID={0}", MatchMachineID)); if (rC_MatchMachineList.Count > 0) { Entity.RC_MatchMachine rC_MatchMachine = rC_MatchMachineList[0]; if (rC_MatchMachine != null) { return(rC_MatchMachine); } } return(null); } catch (Exception ex) { string errCode = "GL-8230"; string errMsg = "根据撮合机得到所属的交易所类型和所属的撮合中心-即撮合机实体失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 分页查询撮合机 /// </summary> /// <param name="machineQueryEntity">查询实体</param> /// <param name="pageNo">查询页号</param> /// <param name="pageSize">每页大小</param> /// <param name="rowCount">总条数</param> /// <returns></returns> public DataSet GetPagingMachine(ManagementCenter.Model.RC_MatchMachine machineQueryEntity, int pageNo, int pageSize, out int rowCount) { try { return(dal.GetPagingMachine(machineQueryEntity, pageNo, pageSize, out rowCount)); } catch (Exception ex) { rowCount = 0; string errCode = "GL-2222"; string errMsg = "分页查询撮合机失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 更新一条数据 /// </summary> public void Update(ManagementCenter.Model.RC_MatchMachine model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(ManagementCenter.Model.RC_MatchMachine model) { return(dal.Add(model)); }