SVN r358
SVN-Revision: r358
This commit is contained in:
@@ -21,6 +21,7 @@ using Lskj.Data;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using Lskj.Business;
|
using Lskj.Business;
|
||||||
|
using DevExpress.XtraGrid.Views.Grid;
|
||||||
|
|
||||||
namespace Lskj.Control.Model
|
namespace Lskj.Control.Model
|
||||||
{
|
{
|
||||||
@@ -29,11 +30,14 @@ namespace Lskj.Control.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class CommonMenu
|
public class CommonMenu
|
||||||
{
|
{
|
||||||
|
protected GridControlEx GridControlObj;
|
||||||
|
protected GridView BaseGridView;
|
||||||
private DynamicModel _model;
|
private DynamicModel _model;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 控件面板
|
/// 控件面板
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private MyControl _controlObj;
|
private MyControl _controlObj;
|
||||||
|
public bool issuccess = true;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when [apply before].
|
/// Occurs when [apply before].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -43,10 +47,16 @@ namespace Lskj.Control.Model
|
|||||||
/// Initializes a new instance of the <see cref="CommonMenu"/> class.
|
/// Initializes a new instance of the <see cref="CommonMenu"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="rowItem">常用工具数据行.</param>
|
/// <param name="rowItem">常用工具数据行.</param>
|
||||||
public CommonMenu(DynamicModel model, MyControl control)
|
public CommonMenu(DynamicModel model, MyControl control, System.Windows.Forms.Control view=null)
|
||||||
{
|
{
|
||||||
this._model = model;
|
this._model = model;
|
||||||
this._controlObj = control;
|
this._controlObj = control;
|
||||||
|
if(view!=null) this.GridControlObj = view as GridControlEx;
|
||||||
|
if (this.GridControlObj != null)
|
||||||
|
{
|
||||||
|
this.BaseGridView = this.GridControlObj.GridView;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -324,6 +334,7 @@ namespace Lskj.Control.Model
|
|||||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
/// <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)
|
||||||
{
|
{
|
||||||
|
issuccess = true;
|
||||||
if (string.IsNullOrWhiteSpace(model.DllName))
|
if (string.IsNullOrWhiteSpace(model.DllName))
|
||||||
{
|
{
|
||||||
MessageUtil.Show(ResourceKeys.OperFault + "未配置动态链接库.");
|
MessageUtil.Show(ResourceKeys.OperFault + "未配置动态链接库.");
|
||||||
@@ -383,6 +394,10 @@ namespace Lskj.Control.Model
|
|||||||
}
|
}
|
||||||
form.SubForm.WindowState = model.MaxWindow ? FormWindowState.Maximized : FormWindowState.Normal;
|
form.SubForm.WindowState = model.MaxWindow ? FormWindowState.Maximized : FormWindowState.Normal;
|
||||||
form.SubForm.Text = model.MenuName;
|
form.SubForm.Text = model.MenuName;
|
||||||
|
if (form.SubForm is BaseForm)
|
||||||
|
{
|
||||||
|
(form.SubForm as BaseForm).ParentView = this.BaseGridView;
|
||||||
|
}
|
||||||
form.SubForm.ShowDialog();
|
form.SubForm.ShowDialog();
|
||||||
if (DynamicLinkAfter != null)
|
if (DynamicLinkAfter != null)
|
||||||
{
|
{
|
||||||
@@ -402,29 +417,4 @@ namespace Lskj.Control.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>说明:</para>
|
/// <para>说明:</para>
|
||||||
/// <para>创建人:龚宇超</para>
|
/// <para>创建人:龚宇超</para>
|
||||||
/// <para>创建日期:2017-11-01 </para>
|
/// <para>创建日期�
|
||||||
/// <para>修改人:</para>
|
|
||||||
/// <para>修改日期:</para>
|
|
||||||
/// <para>修改备注:</para>
|
|
||||||
/// <para>版本:1.0</para>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="libaryName">Name of the libary.</param>
|
|
||||||
/// <param name="paramList">The parameter list.</param>
|
|
||||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
|
||||||
private bool ExecDelphiLibary(string libaryName, List<string> paramList)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
DelphiHelper.LoadDelphiDll(libaryName, paramList[0], paramList[1], paramList[2], paramList[3], Convert.ToInt32(paramList[4]), paramList[5]);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
//MessageUtil.Show(ex);
|
|
||||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
|
||||||
MessageUtil.Show(Message, ex.Message);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user