1
This commit is contained in:
@@ -90,18 +90,18 @@ namespace Tnb.WarehouseMgr
|
||||
return row > 0;
|
||||
}
|
||||
|
||||
public async Task DataImport<T>(IFormFile file) where T : BaseEntity<string>, new()
|
||||
public async Task DataImport<T>(IFormFile file,Func<List<T>> getColumns) where T : BaseEntity<string>, new()
|
||||
{
|
||||
var nonBeNullColumnList = new List<string>();
|
||||
var entityInfo = _db.EntityMaintenance.GetEntityInfo<T>();
|
||||
foreach (var column in entityInfo.Columns)
|
||||
{
|
||||
if (!column.IsEmpty())
|
||||
if (!column.IsNullable)
|
||||
{
|
||||
nonBeNullColumnList.Add(column.DbColumnName);
|
||||
}
|
||||
}
|
||||
var importData = WmsImport(file);
|
||||
var importData = WmsImport(file); //ImportExcelToMemory<T> where T:BaseEntity<string>,new()
|
||||
var fillColumns = nonBeNullColumnList.Except(importData.Keys).ToList();
|
||||
if (fillColumns?.Count > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user