usercolor.cs

来自「动易SiteFactory&#8482 网上商店系统1.0源代码」· CS 代码 · 共 42 行

CS
42
字号
namespace PowerEasy.SqlServerDal.Analytics.Report
{
    using PowerEasy.Common;
    using PowerEasy.SqlServerDal;
    using System;
    using System.Collections.Generic;
    using System.Data;

    public class UserColor : AbstractUserDataReport
    {
        public override Dictionary<string, int> GetList(int startRowIndexId, int maxiNumRows)
        {
            return base.GetDictionary(startRowIndexId, maxiNumRows, "PE_StatColor", "TColor", "TColNum");
        }

        public override string MaxValue
        {
            get
            {
                string str = string.Empty;
                using (NullableDataReader reader = DBHelper.ExecuteReader(CommandType.Text, "Select Top 1 * From PE_StatColor Order By TColNum DESC", null))
                {
                    if (reader.Read())
                    {
                        str = reader.GetString("TColor") + " (" + reader.GetInt32("TColNum").ToString() + ")";
                    }
                }
                return str;
            }
        }

        public override int Sum
        {
            get
            {
                return DataConverter.CLng(DBHelper.ExecuteScalarSql("select sum(TColNum) from PE_StatColor"));
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?