Commit e2648eff authored by 黄奎's avatar 黄奎

页面修改

parent 530cfd2e
...@@ -38,8 +38,10 @@ namespace Edu.Common.Data ...@@ -38,8 +38,10 @@ namespace Edu.Common.Data
/// <returns></returns> /// <returns></returns>
private static WordsItem DataRowToModel(int ChapterId, DataRow dr) private static WordsItem DataRowToModel(int ChapterId, DataRow dr)
{ {
WordsItem model = new WordsItem(); WordsItem model = new WordsItem
model.ChapterId = ChapterId; {
ChapterId = ChapterId
};
if (dr != null) if (dr != null)
{ {
if (dr.Table.Columns.Contains("品詞名") && !string.IsNullOrEmpty(dr["品詞名"].ToString())) if (dr.Table.Columns.Contains("品詞名") && !string.IsNullOrEmpty(dr["品詞名"].ToString()))
......
...@@ -593,8 +593,7 @@ namespace Edu.Common.Plugin ...@@ -593,8 +593,7 @@ namespace Edu.Common.Plugin
/// <returns></returns> /// <returns></returns>
public static DataSet ExcelToDataSet(string excelPath) public static DataSet ExcelToDataSet(string excelPath)
{ {
int sheetCount; return ExcelToDataSet(excelPath, true, out int sheetCount);
return ExcelToDataSet(excelPath, true, out sheetCount);
} }
/// <summary> /// <summary>
...@@ -606,41 +605,37 @@ namespace Edu.Common.Plugin ...@@ -606,41 +605,37 @@ namespace Edu.Common.Plugin
/// <returns></returns> /// <returns></returns>
static DataSet ExcelToDataSet(string excelPath, bool firstRowAsHeader, out int sheetCount) static DataSet ExcelToDataSet(string excelPath, bool firstRowAsHeader, out int sheetCount)
{ {
using (DataSet ds = new DataSet()) using DataSet ds = new DataSet();
using FileStream fileStream = new FileStream(excelPath, FileMode.Open, FileAccess.Read);
string extFile = Path.GetExtension(excelPath).ToLower();
IWorkbook workbook;
if (extFile.Equals(".xls"))
{ {
using (FileStream fileStream = new FileStream(excelPath, FileMode.Open, FileAccess.Read)) workbook = new HSSFWorkbook(fileStream);
HSSFFormulaEvaluator evaluator = new HSSFFormulaEvaluator(workbook);
sheetCount = workbook.NumberOfSheets;
for (int i = 0; i < sheetCount; ++i)
{ {
string extFile = Path.GetExtension(excelPath).ToLower(); HSSFSheet sheet = workbook.GetSheetAt(i) as HSSFSheet;
IWorkbook workbook; DataTable dt = ImportDataTable(sheet, 0, firstRowAsHeader);
if (extFile.Equals(".xls")) dt.TableName = workbook.GetSheetName(i);
{ ds.Tables.Add(dt);
workbook = new HSSFWorkbook(fileStream); }
HSSFFormulaEvaluator evaluator = new HSSFFormulaEvaluator(workbook); return ds;
sheetCount = workbook.NumberOfSheets; }
for (int i = 0; i < sheetCount; ++i) else
{ {
HSSFSheet sheet = workbook.GetSheetAt(i) as HSSFSheet; workbook = new XSSFWorkbook(fileStream);
DataTable dt = ImportDataTable(sheet, 0, firstRowAsHeader); XSSFFormulaEvaluator evaluator = new XSSFFormulaEvaluator(workbook);
dt.TableName = workbook.GetSheetName(i); sheetCount = workbook.NumberOfSheets;
ds.Tables.Add(dt); for (int i = 0; i < sheetCount; ++i)
} {
return ds; XSSFSheet sheet = workbook.GetSheetAt(i) as XSSFSheet;
} DataTable dt = ImportDataTable(sheet, 0, firstRowAsHeader);
else dt.TableName = workbook.GetSheetName(i);
{ ds.Tables.Add(dt);
workbook = new XSSFWorkbook(fileStream);
XSSFFormulaEvaluator evaluator = new XSSFFormulaEvaluator(workbook);
sheetCount = workbook.NumberOfSheets;
for (int i = 0; i < sheetCount; ++i)
{
XSSFSheet sheet = workbook.GetSheetAt(i) as XSSFSheet;
DataTable dt = ImportDataTable(sheet, 0, firstRowAsHeader);
dt.TableName = workbook.GetSheetName(i);
ds.Tables.Add(dt);
}
return ds;
}
} }
return ds;
} }
} }
......
...@@ -55,49 +55,22 @@ namespace Edu.Module.Course ...@@ -55,49 +55,22 @@ namespace Edu.Module.Course
/// 学生 /// 学生
/// </summary> /// </summary>
private readonly RB_StudentRepository studentRepository = new RB_StudentRepository(); private readonly RB_StudentRepository studentRepository = new RB_StudentRepository();
/// <summary>
/// 订单
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary>
/// 订单学生
/// </summary>
private readonly RB_Order_GuestRepository order_GuestRepository = new RB_Order_GuestRepository();
/// <summary>
/// 签到
/// </summary>
private readonly RB_Class_CheckRepository class_CheckRepository = new RB_Class_CheckRepository();
/// <summary>
/// 班级
/// </summary>
private readonly RB_ClassRepository classRepository = new RB_ClassRepository();
/// <summary>
/// 课程
/// </summary>
private readonly RB_CourseRepository courseRepository = new RB_CourseRepository();
/// <summary>
/// 班级类型
/// </summary>
private readonly RB_Class_TypeRepository class_TypeRepository = new RB_Class_TypeRepository();
/// <summary> /// <summary>
/// 账户 /// 账户
/// </summary> /// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository(); private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 部门
/// </summary>
private readonly RB_DepartmentRepository departmentRepository = new RB_DepartmentRepository();
/// <summary> /// <summary>
/// 校区 /// 校区
/// </summary> /// </summary>
private readonly RB_SchoolRepository schoolRepository = new RB_SchoolRepository(); private readonly RB_SchoolRepository schoolRepository = new RB_SchoolRepository();
/// <summary>
/// 财务单据
/// </summary>
private readonly RB_FinanceRepository financeRepository = new RB_FinanceRepository();
private readonly RB_Customer_RemitRepository customer_RemitRepository = new RB_Customer_RemitRepository(); private readonly RB_Customer_RemitRepository customer_RemitRepository = new RB_Customer_RemitRepository();
#region 首页返佣 #region 首页返佣
/// <summary> /// <summary>
/// 获取首页返佣同级 /// 获取首页返佣同级
/// </summary> /// </summary>
......
...@@ -2147,7 +2147,6 @@ namespace Edu.Module.Finance ...@@ -2147,7 +2147,6 @@ namespace Edu.Module.Finance
decimal Money = 0, Fee = 0; decimal Money = 0, Fee = 0;
if (NewfinanceList != null && NewfinanceList.Count() > 0) if (NewfinanceList != null && NewfinanceList.Count() > 0)
{ {
//var costList = costtypeRepository.GetList();
switch (Type) switch (Type)
{ {
//佣金收入 //佣金收入
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment