using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CB.Entity;
using CB.Interface.Infrastructure;
namespace CB.Data
{
    public class SC11X5TrendChartDataService
    {
        public static bool Save(TrendChartData entity)
        {
            return DatabaseProvider.GetDbProvider<ISC11X5TrendChartDataService>().Save(entity);
        }

        public static bool Update(TrendChartData entity)
        {
            throw new NotImplementedException();
        }

        public static bool Delete(BaseEntity entity)
        {
            throw new NotImplementedException();
        }

        public static TrendChartData Get<TKey>(TKey key)
        {
            throw new NotImplementedException();
        }

        public static IList<TrendChartData> ToList()
        {
            throw new NotImplementedException();
        }

        public static IList<TrendChartData> ToList(TrendChartData entity)
        {
            throw new NotImplementedException();
        }

        public static IList<TrendChartData> ToPaging(TrendChartData entity, int pageSize, int pageIndex, out int recordCount)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 前台读取走势图
        /// </summary>
        /// <param name="entity">查询条件</param>
        /// <returns></returns>
        public static IList<TrendChartData> ToList(TrendChartSearchField entity)
        {
            return DatabaseProvider.GetDbProvider<ISC11X5TrendChartDataService>().ToList(entity);
        }

        /// <summary>
        /// 根据期数获取对应期数的走势遗漏信息
        /// </summary>
        /// <param name="chartId">走势图ID</param>
        /// <param name="term">期数</param>
        /// <param name="chartType">走势图类型</param>
        /// <returns></returns>
        public static TrendChartData GetTrendChartDataByTerm(int chartId, TrendChartType chartType, long term)
        {
            return DatabaseProvider.GetDbProvider<ISC11X5TrendChartDataService>().GetTrendChartDataByTerm(chartId, chartType, term);
        }
    }
}