SVN r540
SVN-Revision: r540
This commit is contained in:
@@ -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 字符串的方法
|
||||
}
|
||||
|
||||
@@ -298,4 +298,4 @@ namespace Lskj.Control.Model
|
||||
/// 条件
|
||||
/// </summary>
|
||||
public string SplicingConditions;
|
||||
/// <su
|
||||
/// <
|
||||
@@ -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)) + "";
|
||||
|
||||
Reference in New Issue
Block a user