/// <summary> /// 根据商品代码返回交易商品 /// </summary> /// <param name="commodityCode">商品代码</param> /// <returns></returns> public Entity.CM_Commodity GetCommodityByCommodityCode(string commodityCode) { try { LogHelper.WriteDebug("Debug-8207根据商品代码返回交易商品方法名称:GetCommodityByCommodityCode(string commodityCode)参数是:" + commodityCode + "时间是:" + DateTime.Now); CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL(); List <Entity.CM_Commodity> cM_CommodityList = cM_CommodityBLL.GetListArray(string.Format("CommodityCode='{0}'", commodityCode)); if (cM_CommodityList.Count > 0) { Entity.CM_Commodity cM_Commodity = cM_CommodityList[0]; if (cM_Commodity != null) { return(cM_Commodity); } } return(null); } catch (Exception ex) { string errCode = "GL-8207"; string errMsg = "根据商品代码返回交易商品实体失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
//================================ 交易商品 方法 ================================ #region 获取所有交易商品 /// <summary> /// 获取所有交易商品 /// </summary> /// <param name="CommodityCode">商品代码</param> /// <param name="CommodityName">商品名称</param> /// <param name="BreedClassID">品种ID</param> /// <param name="pageNo">当前页</param> /// <param name="pageSize">显示记录数</param> /// <param name="rowCount">总行数</param> /// <returns></returns> public static DataSet GetAllCMCommodity(string CommodityCode, string CommodityName, int BreedClassID, int pageNo, int pageSize, out int rowCount) { CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL(); return(cM_CommodityBLL.GetAllCMCommodity(CommodityCode, CommodityName, BreedClassID, pageNo, pageSize, out rowCount)); }
/// <summary> /// 获取所有商品代码 /// </summary> /// <returns></returns> public List <Entity.CommonTable.OnstageCommodity> GetCommodityListArray() { try { CM_CommodityBLL cM_Commodity = new CM_CommodityBLL(); return(cM_Commodity.GetCommodityListArray(string.Empty)); } catch (Exception ex) { string errCode = "GL-8242"; string errMsg = "获取所有商品代码失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 根据品种标识返回交易商品 /// </summary> /// <param name="breedClassID">品种标识</param> /// <returns></returns> public List <Entity.CM_Commodity> GetCommodityByBreedClassID(int breedClassID) { try { LogHelper.WriteDebug("Debug-8208根据品种标识返回交易商品方法名称:GetCommodityByBreedClassID(int breedClassID)参数是:" + breedClassID + "时间是:" + DateTime.Now); CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL(); return(cM_CommodityBLL.GetListArray(string.Format("BreedClassID={0}", breedClassID))); } catch (Exception ex) { string errCode = "GL-8208"; string errMsg = "根据品种标识返回交易商品列表失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 获取所有的交易商品 /// </summary> /// <returns></returns> public List <Entity.CM_Commodity> GetAllCommodity() { try { LogHelper.WriteDebug("Debug-8206获取所有的交易商品方法名称:GetAllCommodity()" + DateTime.Now); CM_CommodityBLL cM_Commodity = new CM_CommodityBLL(); return(cM_Commodity.GetListArray(string.Empty)); } catch (Exception ex) { string errCode = "GL-8206"; string errMsg = "获取所有的交易商品失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 获取所有新股上市的商品代码 /// </summary> /// <returns></returns> public List <Entity.CM_Commodity> GetNewCommodity() { try { LogHelper.WriteDebug("Debug-8240获取所有新股上市的商品代码方法名称:GetNewCommodity()" + DateTime.Now); CM_CommodityBLL cM_Commodity = new CM_CommodityBLL(); string strWhere = string.Format("MarketDate='{0}'", System.DateTime.Now.ToShortDateString()); LogHelper.WriteDebug("获取新股的条件:" + strWhere); return(cM_Commodity.GetListArray(strWhere)); } catch (Exception ex) { string errCode = "GL-8240"; string errMsg = "获取所有新股上市的商品代码失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 获取品种类型股指期货的商品代码 /// </summary> /// <returns></returns> public static DataSet GetQHSIFCommodityCode() { CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL(); return(cM_CommodityBLL.GetQHSIFCommodityCode()); }
/// <summary> /// 判断交易商品名称是否已经存在 /// </summary> /// <param name="CommodityName">商品名称</param> /// <returns></returns> public static bool IsExistCommodityName(string CommodityName) { CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL(); return(cM_CommodityBLL.IsExistCommodityName(CommodityName)); }
/// <summary> /// 根据商品代码删除交易商品 /// </summary> /// <param name="CommodityCode">商品代码</param> /// <param name="BreedClassID">品种ID</param> /// <returns></returns> public static bool DeleteCMCommodity(string CommodityCode, int BreedClassID) { CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL(); return(cM_CommodityBLL.DeleteCMCommodity(CommodityCode, BreedClassID)); }
/// <summary> /// 更新交易商品 /// </summary> /// <param name="model">交易商品实体</param> /// <returns></returns> public static bool UpdateCMCommodity(ManagementCenter.Model.CM_Commodity model) { CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL(); return(cM_CommodityBLL.UpdateCMCommodity(model)); }