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