/// <summary> /// 获取指定日期区间内(除权基准日)所有的股票分红记录_现金 /// (开始或结束日期为空则取今天的日期) /// </summary> /// <param name="startDate">开始日期</param> /// <param name="endDate">结束日期</param> /// <returns>股票分红记录_现金</returns> public List <CM_StockMelonCash> GetStockMelonCashByDateRange(DateTime?startDate, DateTime?endDate) { if (startDate == null) { startDate = DateTime.Now; } if (endDate == null) { endDate = DateTime.Now; } try { LogHelper.WriteDebug("Debug-8216获取所有的股票分红记录_现金方法名称:GetStockMelonCashByDateRange(),开始日期=" + startDate.Value.ToShortDateString() + ",结束日期=" + endDate.Value.ToShortDateString()); CM_StockMelonCashBLL cM_StockMelonCash = new CM_StockMelonCashBLL(); return(cM_StockMelonCash.GetListArray(string.Format("(StockRightLogoutDatumDate>='{0}' AND StockRightLogoutDatumDate<'{1}')", startDate.Value.ToShortDateString(), endDate.Value.AddDays(1).ToShortDateString()))); } catch (Exception ex) { string errCode = "GL-8216"; 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_StockMelonCash> GetAllStockMelonCash() { try { LogHelper.WriteDebug("Debug-8216获取所有的股票分红记录_现金方法名称:GetAllStockMelonCash()" + DateTime.Now); CM_StockMelonCashBLL cM_StockMelonCash = new CM_StockMelonCashBLL(); return (cM_StockMelonCash.GetListArray(string.Format("(StockRightRegisterDate>='{0}' AND StockRightRegisterDate<'{1}') OR (StockRightLogoutDatumDate>='{1}' AND StockRightLogoutDatumDate<'{2}')", System.DateTime.Now.ToShortDateString(), System.DateTime.Now.AddDays(1).ToShortDateString(), System.DateTime.Now.AddDays(2).ToShortDateString()))); } catch (Exception ex) { string errCode = "GL-8216"; string errMsg = "获取所有的股票分红记录_现金失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }