SVN-Revision: r540
This commit is contained in:
wyf
2025-05-07 08:43:46 +00:00
parent ffa65eec12
commit b190d6ef51
3 changed files with 22 additions and 20 deletions
+1 -1
View File
@@ -384,7 +384,7 @@ namespace Lskj.Control.Model
paramList[9]
};
string maintabFocusedRowJson = "";
if (BaseGridView.GetFocusedDataRow() != null)
if (BaseGridView != null && BaseGridView.GetFocusedDataRow() != null)
{
maintabFocusedRowJson = BaseGridView.GetFocusedDataRow().ToJsonObject(); // 假设 ToJsonObject() 是将对象转换为 JSON 字符串的方法
}
+1 -1
View File
@@ -298,4 +298,4 @@ namespace Lskj.Control.Model
/// 条件
/// </summary>
public string SplicingConditions;
/// <su
/// <
+20 -18
View File
@@ -2788,24 +2788,6 @@ namespace Lskj.Control.Model
/// <returns>返回保存成功于否</returns>
public bool SaveBaseModuleData(string menuCode, string tableName, string primaryKey, ref string primaryValue, bool isAdd = true, string leftField = "", bool isTip = true, int newVer = 0)
{
//保存前执行某个右键
if (!string.IsNullOrEmpty(SystemModel.BeforeSaveExec))
{
DataRow menuRow = BaseModuleImpl.GetBaseGridRightMenuById(SystemModel.BeforeSaveExec);
if (menuRow != null)
{
CommonMenu menu = new CommonMenu(Model, this, MainGridEx);
//menu.ApplyBefore += new CommonToolApplyEventHandler(OnMenuApplyBefore);
//menu.DynamicLinkAfter += new CommonToolAfterDynamicLinkEventHandler(OnDynamicLinkAfter);
StaticControl.RightMenuGridView = MainGridEx.GridView;
StaticControl.RightMenuMyControl = this;
menu.Apply(menuRow);
if (!menu.issuccess)
{
return false;
}
}
}
string execSql = string.Empty;
if (string.IsNullOrWhiteSpace(tableName))
{
@@ -2958,6 +2940,7 @@ namespace Lskj.Control.Model
//保存成功
if (newVer == 1 && saveModel.BaseSaveType == SaveType.Add)
saveModel.FieldValue = primaryValue = saveModel.FaultMsg;
this.PrimaryValue = primaryValue;
#region API
if (ApiHelper.IsExecEventApi(Interface.Api.OperateEvent.AfterModuleDataChange, saveModel.MenuCode, 0))
{
@@ -3014,6 +2997,25 @@ namespace Lskj.Control.Model
}
}
#endregion
#region
if (!string.IsNullOrEmpty(SystemModel.AfterSaveExec))
{
DataRow menuRow = BaseModuleImpl.GetBaseGridRightMenuById(SystemModel.AfterSaveExec);
if (menuRow != null)
{
CommonMenu menu = new CommonMenu(Model, this, MainGridEx);
//menu.ApplyBefore += new CommonToolApplyEventHandler(OnMenuApplyBefore);
//menu.DynamicLinkAfter += new CommonToolAfterDynamicLinkEventHandler(OnDynamicLinkAfter);
//StaticControl.RightMenuGridView = MainGridEx.GridView;
StaticControl.RightMenuMyControl = this;
menu.Apply(menuRow);
if (!menu.issuccess)
{
return false;
}
}
}
#endregion
//if (Autogrowcolumn.Equals(primaryKey, StringComparison.CurrentCultureIgnoreCase))
//{
// primaryValue = "LskjIdebtity" + SqlHelper.ExecuteScalar(string.Format("SELECT {0} FROM P_EmployeePostTab WHERE {0} = @@IDENTITY", Autogrowcolumn)) + "";