SVN r352
SVN-Revision: r352
This commit is contained in:
@@ -63,19 +63,19 @@ namespace Lskj.PubSpecialImport
|
||||
{
|
||||
try
|
||||
{
|
||||
bool showType = Model != null && Model.ShowType.Equals("1") && !ERPInfo.Instance.UserName.Equals("管理员");
|
||||
if (showType)
|
||||
{
|
||||
Opacity = 0;
|
||||
}
|
||||
InitlizeSpiltLocation();
|
||||
InitEvents();
|
||||
InitGridColumns();
|
||||
InitMulitControl();
|
||||
InitDataSource();
|
||||
if (Model.ShowType.Equals("1") && !ERPInfo.Instance.UserName.Equals("管理员"))
|
||||
if (showType)
|
||||
{
|
||||
pl_cond.Visible = false;
|
||||
pl_purview.Visible = false;
|
||||
tips.Visible = false;
|
||||
splitMainContainer.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2;
|
||||
btnOk.Visible = false;
|
||||
btnCancel.Visible = false;
|
||||
OnBtnReadClick(btnRead, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -123,8 +123,10 @@ namespace Lskj.PubSpecialImport
|
||||
/// <param name="e"></param>
|
||||
private void OnBtnReadClick(object sender, EventArgs e)
|
||||
{
|
||||
bool showType = false;
|
||||
try
|
||||
{
|
||||
showType = Model != null && Model.ShowType.Equals("1") && !ERPInfo.Instance.UserName.Equals("管理员");
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Title = "选择导入文件";
|
||||
dialog.Filter = SystemInfo.Instance.IsXlsxFirst ? "Excel文件(*.xlsx)|*.xlsx|Excel文件(*.xls)|*.xls" : "Excel文件(*.xls)|*.xls|Excel文件(*.xlsx)|*.xlsx";
|
||||
@@ -248,6 +250,12 @@ namespace Lskj.PubSpecialImport
|
||||
this.gcMain.SetGridViewDataSource(importTable);
|
||||
this.condTxtEdit.Text = "";
|
||||
}
|
||||
OnBtnImportClick(btnImport, null);
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -257,6 +265,13 @@ namespace Lskj.PubSpecialImport
|
||||
tipsEdit.Text = "请导入Excel模板";
|
||||
gc_Right.SetGridViewDataSource(new DataTable());
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (showType)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 确定按钮点击
|
||||
|
||||
Reference in New Issue
Block a user