SVN r474
SVN-Revision: r474
This commit is contained in:
@@ -2636,12 +2636,15 @@ namespace Lskj.PubBill
|
|||||||
if (sourceTable != null && impRtnModel.FileNames != null)
|
if (sourceTable != null && impRtnModel.FileNames != null)
|
||||||
{
|
{
|
||||||
string afterBomFieldName = impRtnModel.AfterBomFieldName;
|
string afterBomFieldName = impRtnModel.AfterBomFieldName;
|
||||||
|
if (!sourceTable.Columns.Contains("BomFieldNameDir"))
|
||||||
|
{
|
||||||
|
sourceTable.Columns.Add("BomFieldNameDir");
|
||||||
|
}
|
||||||
DataTable dataTable = new DataTable();
|
DataTable dataTable = new DataTable();
|
||||||
dataTable.Columns.Add(afterBomFieldName);
|
dataTable.Columns.Add(afterBomFieldName);
|
||||||
dataTable.Columns.Add("BomFieldNameDir");
|
dataTable.Columns.Add("BomFieldNameDir");
|
||||||
IEnumerable<DataRow> rowsIEnumerable = sourceTable.Rows.Cast<DataRow>();
|
IEnumerable<DataRow> rowsIEnumerable = sourceTable.Rows.Cast<DataRow>();
|
||||||
string namepattern = @"([A-Za-z]+(-[A-Za-z0-9]+)*-\d+(-\d+)*)";
|
string namepattern = @"([A-Za-z]+(-[A-Za-z0-9]+)*-\d+(-\d+)*)";
|
||||||
Dictionary<DataRow, string> filesDic = new Dictionary<DataRow, string>();
|
|
||||||
foreach (string fileName in impRtnModel.FileNames)
|
foreach (string fileName in impRtnModel.FileNames)
|
||||||
{
|
{
|
||||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName).Trim();
|
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName).Trim();
|
||||||
@@ -2677,9 +2680,8 @@ namespace Lskj.PubBill
|
|||||||
foreach (DataRow item in dataTable.Rows)
|
foreach (DataRow item in dataTable.Rows)
|
||||||
{
|
{
|
||||||
DataRow sourceRow = this.AddRowToGridView(item, true);
|
DataRow sourceRow = this.AddRowToGridView(item, true);
|
||||||
filesDic.Add(sourceRow, item["BomFieldNameDir"] + "");
|
sourceRow["BomFieldNameDir"] = item["BomFieldNameDir"] + "";
|
||||||
}
|
}
|
||||||
gcMain.GridView.Tag = filesDic;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user