/// <summary> /// 根据港股商品代码返回交易商品 /// </summary> /// <param name="hkcommodityCode">港股商品代码</param> /// <returns>返回港股代码实体</returns> public Entity.HK_Commodity GetHKCommodityByHKCommodityCode(string hkcommodityCode) { try { LogHelper.WriteDebug("Debug-8605根据港股商品代码返回交易商品方法名称:GetHKCommodityByHKCommodityCode(string hkcommodityCode)参数是:" + hkcommodityCode + "时间是:" + DateTime.Now); HK_CommodityBLL hK_CommodityBLL = new HK_CommodityBLL(); List <Entity.HK_Commodity> hK_CommodityList = hK_CommodityBLL.GetListArray(string.Format("HKCommodityCode='{0}'", hkcommodityCode)); if (hK_CommodityList.Count > 0) { Entity.HK_Commodity hK_Commodity = hK_CommodityList[0]; if (hK_Commodity != null) { return(hK_Commodity); } } return(null); } catch (Exception ex) { string errCode = "GL-8605";// "GL-8207"; string errMsg = "根据商品代码返回港股交易商品实体失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
//================================港股交易商品代码管理 方法 ================================ #region 获取所有港股交易商品 /// <summary> /// 获取所有港股交易商品 /// </summary> /// <param name="HKCommodityCode">港股商品代码</param> /// <param name="HKCommodityName">港股商品名称</param> /// <param name="pageNo">当前页</param> /// <param name="pageSize">显示记录数</param> /// <param name="rowCount">总行数</param> /// <returns></returns> public static DataSet GetAllHKCommodity(string HKCommodityCode, string HKCommodityName, int pageNo, int pageSize, out int rowCount) { HK_CommodityBLL hK_CommodityBLL = new HK_CommodityBLL(); return(hK_CommodityBLL.GetAllHKCommodity(HKCommodityCode, HKCommodityName, pageNo, pageSize, out rowCount)); }
/// <summary> /// 提供前台获取港股商品代码列表 /// </summary> /// <returns></returns> public List <ManagementCenter.Model.OnstageHK_Commodity> GetHKCommodityListArray() { try { HK_CommodityBLL hK_Commodity = new HK_CommodityBLL(); return(hK_Commodity.GetHKCommodityListArray(string.Empty)); } catch (Exception ex) { string errCode = "GL-8613"; 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.HK_Commodity> GetHKCommodityByBreedClassID(int breedClassID) { try { LogHelper.WriteDebug("Debug-8606根据品种标识返回港股交易商品方法名称:GetHKCommodityByBreedClassID(int breedClassID)参数是:" + breedClassID + "时间是:" + DateTime.Now); HK_CommodityBLL hK_CommodityBLL = new HK_CommodityBLL(); return(hK_CommodityBLL.GetListArray(string.Format("BreedClassID={0}", breedClassID))); } catch (Exception ex) { string errCode = "GL-8606";// "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.HK_Commodity> GetAllHKCommodity() { try { LogHelper.WriteDebug("Debug-8604获取所有的港股交易商品方法名称:GetAllHKCommodity()" + DateTime.Now); HK_CommodityBLL hK_CommodityBLL = new HK_CommodityBLL(); return(hK_CommodityBLL.GetListArray(string.Empty)); } catch (Exception ex) { string errCode = "GL-8604"; string errMsg = "获取所有的港股交易商品失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 获取所有港股新股上市的商品代码 /// </summary> /// <returns></returns> public List <Entity.HK_Commodity> GetNewHKCommodity() { try { LogHelper.WriteDebug("Debug-8607获取所有港股新股上市的商品代码方法名称:GetNewHKCommodity()" + DateTime.Now); HK_CommodityBLL hK_CommodityBLL = new HK_CommodityBLL(); return (hK_CommodityBLL.GetListArray(string.Format("MarketDate='{0}'", System.DateTime.Now.ToShortDateString()))); } catch (Exception ex) { string errCode = "GL-8607";//"GL-8240"; string errMsg = "获取所有港股新股上市的商品代码失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 判断港股交易商品代码是否已经存在 /// </summary> /// <param name="HKCommodityCode">港股商品代码</param> /// <returns></returns> public static bool IsExistHKCommodityCode(string HKCommodityCode) { HK_CommodityBLL hM_CommodityBLL = new HK_CommodityBLL(); return(hM_CommodityBLL.IsExistHKCommodityCode(HKCommodityCode)); }
/// <summary> /// 根据港股交易商品代码删除港股交易商品(相关表的记录同时删除) /// </summary> /// <param name="HKCommodityCode">港股商品代码</param> /// <returns></returns> public static bool DeleteHKCommodity(string HKCommodityCode) { HK_CommodityBLL hM_CommodityBLL = new HK_CommodityBLL(); return(hM_CommodityBLL.DeleteHKCommodity(HKCommodityCode)); }
/// <summary> /// 更新港股交易商品 /// </summary> /// <param name="model">港股交易商品实体</param> /// <returns></returns> public static bool UpdateHKCommodity(ManagementCenter.Model.HK_Commodity model) { HK_CommodityBLL hM_CommodityBLL = new HK_CommodityBLL(); return(hM_CommodityBLL.UpdateHKCommodity(model)); }