SVN r475
SVN-Revision: r475
This commit is contained in:
@@ -184,7 +184,7 @@ namespace Lskj.PubBomImport
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
else if (Model.ShowType.Equals("3"))
|
||||
else if (Model.ShowType.Equals("3"))//新增多个清单文件
|
||||
{
|
||||
BomImpRtnModel bomImpRtnModel = new BomImpRtnModel()
|
||||
{
|
||||
@@ -199,9 +199,9 @@ namespace Lskj.PubBomImport
|
||||
ReturnTag = bomImpRtnModel
|
||||
};
|
||||
this.Tag = dialogModel;
|
||||
if (StaticControl.RightMenuGridView.Tag is Dictionary<DataRow, string> filesDic)
|
||||
DataTable sourceTable = StaticControl.RightMenuGridView.GridControl.DataSourceTable();
|
||||
if (sourceTable.Columns.Contains("BomFieldNameDir"))
|
||||
{
|
||||
DataTable sourceTable = StaticControl.RightMenuGridView.GridControl.DataSourceTable();
|
||||
List<DataRow> selectRows = new List<DataRow>();
|
||||
foreach (DataRow sourceRow in sourceTable.Rows)
|
||||
{
|
||||
@@ -210,7 +210,7 @@ namespace Lskj.PubBomImport
|
||||
continue;
|
||||
}
|
||||
string fileName = sourceRow[Model.AfterBomFieldName] + "";
|
||||
string dirPath = filesDic.ContainsKey(sourceRow) ? filesDic[sourceRow] : "";
|
||||
string dirPath = sourceRow["BomFieldNameDir"] + "";
|
||||
FileInfo parentInfo = null;
|
||||
if (string.IsNullOrEmpty(dirPath))
|
||||
{
|
||||
@@ -230,7 +230,7 @@ namespace Lskj.PubBomImport
|
||||
frmProgress.ImportTimer.Tick += (ts, te) =>
|
||||
{
|
||||
frmProgress.ImportTimer.Enabled = false;
|
||||
frmProgress.StartImportInQDFile(selectRows, filesDic);
|
||||
frmProgress.StartImportInQDFile(selectRows);
|
||||
};
|
||||
frmProgress.ImportTimer.Enabled = true;
|
||||
DialogResult dialogResult = frmProgress.ShowDialog();
|
||||
@@ -247,32 +247,32 @@ namespace Lskj.PubBomImport
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
else if (Model.ShowType.Equals("4"))//新增或修改单个清单文件
|
||||
{
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Title = "选择导入文件";
|
||||
dialog.Filter = "Excel文件(*.xlsx)|*.xlsx|Excel文件(*.xls)|*.xls";
|
||||
DialogResult dialogResult = dialog.ShowDialog();
|
||||
if (dialogResult == DialogResult.OK)
|
||||
{
|
||||
string dirPath = dialog.FileName;
|
||||
FrmProgress frmProgress = new FrmProgress();
|
||||
frmProgress.frmMain = this;
|
||||
frmProgress.ImportTimer.Tick += (ts, te) =>
|
||||
{
|
||||
frmProgress.ImportTimer.Enabled = false;
|
||||
frmProgress.StartImportInQDFile(dirPath);
|
||||
};
|
||||
frmProgress.ImportTimer.Enabled = true;
|
||||
frmProgress.ShowDialog();
|
||||
frmProgress.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
//else if (Model.ShowType.Equals("4"))//禁用
|
||||
//{
|
||||
// OpenFileDialog dialog = new OpenFileDialog();
|
||||
// dialog.Title = "选择导入文件";
|
||||
// dialog.Filter = "Excel文件(*.xlsx)|*.xlsx|Excel文件(*.xls)|*.xls";
|
||||
// DialogResult dialogResult = dialog.ShowDialog();
|
||||
// if (dialogResult == DialogResult.OK)
|
||||
// {
|
||||
// string dirPath = dialog.FileName;
|
||||
// FrmProgress frmProgress = new FrmProgress();
|
||||
// frmProgress.frmMain = this;
|
||||
// frmProgress.ImportTimer.Tick += (ts, te) =>
|
||||
// {
|
||||
// frmProgress.ImportTimer.Enabled = false;
|
||||
// frmProgress.StartImportInMxFileNew(dirPath);
|
||||
// };
|
||||
// frmProgress.ImportTimer.Enabled = true;
|
||||
// frmProgress.ShowDialog();
|
||||
// frmProgress.Dispose();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.Close();
|
||||
// }
|
||||
//}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageUtil.Show(ex.Message);
|
||||
|
||||
Reference in New Issue
Block a user