SVN r443
SVN-Revision: r443
This commit is contained in:
@@ -47,16 +47,16 @@ namespace Lskj.Control.Model
|
||||
/// Initializes a new instance of the <see cref="CommonMenu"/> class.
|
||||
/// </summary>
|
||||
/// <param name="rowItem">常用工具数据行.</param>
|
||||
public CommonMenu(DynamicModel model, MyControl control, System.Windows.Forms.Control view=null)
|
||||
public CommonMenu(DynamicModel model, MyControl control, System.Windows.Forms.Control view = null)
|
||||
{
|
||||
this._model = model;
|
||||
this._controlObj = control;
|
||||
if(view!=null) this.GridControlObj = view as GridControlEx;
|
||||
if (view != null) this.GridControlObj = view as GridControlEx;
|
||||
if (this.GridControlObj != null)
|
||||
{
|
||||
this.BaseGridView = this.GridControlObj.GridView;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -89,7 +89,7 @@ namespace Lskj.Control.Model
|
||||
if (!string.IsNullOrWhiteSpace(prompt))
|
||||
{
|
||||
DialogResult result = MessageUtil.Show(prompt, MessageBoxButtons.YesNo);
|
||||
// DialogResult result = MessageUtil.Show(this._controlObj.ReplaceControlValue(model.BeforeMsg), MessageBoxButtons.YesNo);
|
||||
// DialogResult result = MessageUtil.Show(this._controlObj.ReplaceControlValue(model.BeforeMsg), MessageBoxButtons.YesNo);
|
||||
if (result != DialogResult.Yes)
|
||||
{
|
||||
return resultValue;
|
||||
@@ -107,6 +107,7 @@ namespace Lskj.Control.Model
|
||||
if (applyArgs.CancelFlag) return false;
|
||||
|
||||
List<string> paramList = HandleRightMenuParams(model.ParamList);
|
||||
|
||||
string dllName = this._controlObj.ReplaceControlValue(model.DllName).Trim();
|
||||
|
||||
switch (model.ActionType)
|
||||
@@ -115,7 +116,7 @@ namespace Lskj.Control.Model
|
||||
resultValue = ExecProcedure(model.Action, paramList);
|
||||
break;
|
||||
case 2: // 调用dll程序
|
||||
resultValue = ExecDynamicLinkLibary(model, paramList);
|
||||
resultValue = ExecDynamicLinkLibary(model, paramList, rowItem);
|
||||
break;
|
||||
case 3: //调用delphi程序
|
||||
resultValue = ExecDelphiLibary(model.DllName, paramList);
|
||||
@@ -332,7 +333,7 @@ namespace Lskj.Control.Model
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
private bool ExecDynamicLinkLibary(GridRightMenuModel model, List<string> paramList)
|
||||
private bool ExecDynamicLinkLibary(GridRightMenuModel model, List<string> paramList, DataRow rowItem)
|
||||
{
|
||||
issuccess = true;
|
||||
if (string.IsNullOrWhiteSpace(model.DllName))
|
||||
@@ -364,24 +365,33 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
break;
|
||||
default:
|
||||
string[] str = {
|
||||
_model.FormText,
|
||||
ERPInfo.Instance.UserId,
|
||||
ERPInfo.Instance.UserName,
|
||||
"3",
|
||||
_model.ModuleCode,
|
||||
paramList[0],
|
||||
paramList[1],
|
||||
paramList[2],
|
||||
paramList[3],
|
||||
paramList[4],
|
||||
paramList[5],
|
||||
paramList[6],
|
||||
paramList[7],
|
||||
paramList[8],
|
||||
paramList[9]
|
||||
};
|
||||
IForm form = FormHelper.LoadDllForm(model.DllName, str);
|
||||
List<string> str = new List<string>
|
||||
{
|
||||
_model.FormText,
|
||||
ERPInfo.Instance.UserId,
|
||||
ERPInfo.Instance.UserName,
|
||||
"3",
|
||||
_model.ModuleCode,
|
||||
paramList[0],
|
||||
paramList[1],
|
||||
paramList[2],
|
||||
paramList[3],
|
||||
paramList[4],
|
||||
paramList[5],
|
||||
paramList[6],
|
||||
paramList[7],
|
||||
paramList[8],
|
||||
paramList[9]
|
||||
};
|
||||
string maintabFocusedRowJson = "";
|
||||
if (BaseGridView.GetFocusedDataRow() != null)
|
||||
{
|
||||
maintabFocusedRowJson = BaseGridView.GetFocusedDataRow().ToJsonObject(); // 假设 ToJsonObject() 是将对象转换为 JSON 字符串的方法
|
||||
}
|
||||
str.Add(maintabFocusedRowJson); // 现在可以添加元素了,因为 str 是 List<string>
|
||||
// 假设你需要将 List<string> 转回字符串数组,可以这样操作
|
||||
string[] strArray = str.ToArray();
|
||||
IForm form = FormHelper.LoadDllForm(model.DllName, strArray);
|
||||
if (form == null)
|
||||
{
|
||||
MessageUtil.Show(ResourceKeys.DyncmicDllNotFount);
|
||||
|
||||
Reference in New Issue
Block a user