Esempio n. 1
0
        /// <summary>
        /// 指定导出Excel类型
        /// </summary>
        /// <param name="type">导出类型</param>
        public ExcelExportIgnoreTypeAttribute(ExcelExportType type)
        {
            ExportType = type;
            switch (type)
            {
            case ExcelExportType.String:
                break;

            case ExcelExportType.DataTime:
                Fomat = "yyyy年mm月dd日";
                break;

            case ExcelExportType.Numeric:
                Fomat = "0";
                break;

            case ExcelExportType.Money:
                Fomat = "¥#,##0";
                break;

            case ExcelExportType.Percent:
                Fomat = "0.00%";
                break;

            case ExcelExportType.ChineseCapital:
                Fomat = "[DbNum2][$-804]0";
                break;

            default:
                break;
            }
        }
        public IExcelExport CreateExcelExport(ExcelExportType type)
        {
            if (type == ExcelExportType.Bracket)
            {
                return(new TournamentBracketLog());
            }
            if (type == ExcelExportType.DoubleKo)
            {
                return(new TournamentDoubleKoLog());
            }
            if (type == ExcelExportType.Groups)
            {
                return(new TournamentGroupLog());
            }

            return(null);
        }
Esempio n. 3
0
 /// <summary>
 /// 指定导出Excel类型
 /// </summary>
 /// <param name="type">导出类型</param>
 /// <param name="type">格式化</param>
 public ExcelExportIgnoreTypeAttribute(ExcelExportType type, string fomat)
 {
     ExportType = type;
     Fomat      = fomat;
 }