feat: 更新业务及控件功能
This commit is contained in:
@@ -143,6 +143,10 @@ namespace Lskj.Control
|
||||
}
|
||||
bool isAdmin = ERPInfo.Instance.UserName.Equals("管理员");
|
||||
this.btnCover.Visible = SysModel == null ? isAdmin : isAdmin ? true : SysModel.OperPermissionsUser.Contains(ERPInfo.Instance.UserName);
|
||||
|
||||
//if (SysModel!=null&&!string.IsNullOrWhiteSpace(SysModel.OperPermissionsUser) && SysModel.OperPermissionsUser.Equals("无")) this.btnCover.Visible = false;
|
||||
|
||||
|
||||
this.SourceColumns = BaseImpl.GetDataTableResult(string.Format("select * from {0} where 1<>1", _tableName)).Columns;
|
||||
DataTable dtCalcFields = BaseImpl.GetDataTableResult(string.Format("select name from sys.columns where object_id=object_id('{0}') and is_computed=1", _tableName));
|
||||
if ((dtCalcFields != null) && (dtCalcFields.Rows.Count > 0))
|
||||
@@ -632,7 +636,11 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
dt.AcceptChanges();
|
||||
XtraMessageBox.Show("数据导入完成,成功" + success.ToString() + "条,失败" + failed.ToString() + "条", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
if (failedData.Rows.Count > 0 || !SystemInfo.Instance.SuppressImportSuccessTip)
|
||||
{
|
||||
XtraMessageBox.Show("数据导入完成,成功" + success.ToString() + "条,失败" + failed.ToString() + "条", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
if (failedData.Rows.Count > 0)
|
||||
{
|
||||
MessageUtil.Show(failedData.Rows[0]["import_errormsg"].ToString());
|
||||
@@ -658,6 +666,9 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (failed == 0 && datatb.Rows.Count > 0) this._isImported = true;
|
||||
|
||||
datatb.Clear();
|
||||
dt.Clear();
|
||||
if (failed > 0)
|
||||
@@ -1026,7 +1037,7 @@ namespace Lskj.Control
|
||||
{
|
||||
if (MessageUtil.Show("如果导入数据量太多将花费较长时间,是否确认导入", MessageBoxButtons.YesNo) != DialogResult.Yes)
|
||||
return;
|
||||
this._isImported = true;
|
||||
|
||||
|
||||
if (!this.DetermineImportConditions())
|
||||
{
|
||||
@@ -1038,6 +1049,8 @@ namespace Lskj.Control
|
||||
|
||||
// 采用存储过程保存
|
||||
//this.SaveImportData(table);
|
||||
|
||||
if(this._isImported&& SystemInfo.Instance.SuppressImportSuccessTip) this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user