SVN-Revision: r752
This commit is contained in:
tdx
2025-06-17 10:20:38 +00:00
parent 0fcd6b53b0
commit c1680ca4dd
3 changed files with 27 additions and 60 deletions
+6 -1
View File
@@ -167,7 +167,6 @@ namespace Lskj.Control.Model
private List<string> HandleRightMenuParams(List<string> paramList)
{
List<string> handleParamList = new List<string>();
foreach (string item in paramList)
{
if (!string.IsNullOrWhiteSpace(item))
@@ -184,6 +183,7 @@ namespace Lskj.Control.Model
break;
case "{": // 字段特殊替换
{
handleParamList.Add(this._controlObj.ReplaceControlValue(item));
}
break;
@@ -201,6 +201,11 @@ namespace Lskj.Control.Model
}
break;
default:
if (BaseGridView != null && BaseGridView.GetFocusedDataRow() != null)
{
DataRow parentitem = BaseGridView.GetFocusedDataRow();
fieldValue = ReplaceHelper.ReplaceRowParam(parentitem, item) + "";
}
handleParamList.Add(this._controlObj.ReplaceControlValue(fieldValue));
break;
}
+5 -2
View File
@@ -443,9 +443,12 @@ namespace Lskj.Control.Model
public const int LabApiBtuton = 163;
/// <summary>
///超链接
/// </summary>
/// </ summary>
public const int LabHyperlink = 164;
/// <summary>
///关联右键列
/// </ summary>
public const int LabRightlink = 165;
/// <summary>
/// <para>说明:是否为Value类型</para>
+16 -57
View File
@@ -83,10 +83,6 @@ namespace Lskj.Control
/// </summary>
private bool _isExcPrint;
/// <summary>
/// 最新的名字
/// </summary>
public string lastrichtext;
/// <summary>
/// 主打印Sql
/// </summary>
private string _mainPrintSql;
@@ -1847,6 +1843,20 @@ namespace Lskj.Control
AddGridViewRecord();
}
/// <summary>
/// 表格触发右键功能
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnAfterLinkCilkCall(object sender, EventArgs e)
{
string unioright = sender + "";
DataRow rowItem = this.GridControlObj.GetViewFocusedDataRow();
DataRow rightrowitem = this.GridControlObj.gridViewRightMenu.MenuTable.Rows.Cast<DataRow>().FirstOrDefault(x=>(x["orderid"]+"").Equals(unioright));
CommonMenu menu = new CommonMenu(this.Model, this.SearchObj, this.gcMain);
menu.Apply(rightrowitem);
}
/// <summary>
/// <para>说明:</para>
@@ -3477,7 +3487,8 @@ namespace Lskj.Control
InitializeUpperRightMenu();
//绑定老版粘贴回调新增行事件
this.gcMain.OnAfterPasting += GcMain_OnAfterPasting;
//触发右键回调
this.gcMain.OnAfterLinkCilk += OnAfterLinkCilkCall;
if (!string.IsNullOrWhiteSpace(this.SysModel.SelectDisplayColumn))
{
//this.gcMain.GridView.CustomColumnDisplayText += GridView_CustomColumnDisplayText;
@@ -4076,35 +4087,6 @@ namespace Lskj.Control
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnGridViewRightCallBack(object sender, EventArgs e)
{
try
{
int oldRowHandle = gcMain.GridView.FocusedRowHandle;
if (!(gcMain is TreeGridControlEx) && oldRowHandle < 0) return;
DataTable dt = this.gcMain.GridView.GetGridViewFilteredAndSortedDataToDataTable();
if (gcMain is TreeGridControlEx) dt = (gcMain as TreeGridControlEx).GetGridViewDataSource();
if (dt == null || dt.Rows.Count == 0) return;
DataRow SelectTheLine = gcMain is TreeGridControlEx ? (gcMain as TreeGridControlEx).GetViewFocusedDataRow() : dt.Rows[oldRowHandle];
this.SearchObj.RememberRow = (this.SysModel.AccordingNameSelected == 0);
this.SearchObj.SearchLastGrid();
if (this.SysModel.AccordingNameSelected != 0)//根据主键刷新目标选中行
{
DataRow items = dt.Rows.Cast<DataRow>().FirstOrDefault(x => x[ParmaryKey].Equals(SelectTheLine[ParmaryKey]));
dt = this.gcMain.GridView.GetGridViewFilteredAndSortedDataToDataTable();
BindingSource bindingSource = new BindingSource();
bindingSource.DataSource = dt;
int numberOfRows = bindingSource.Find(ParmaryKey, SelectTheLine[ParmaryKey].ToString());
this.gcMain.GridView.ClearSelection();
this.gcMain.GridView.FocusedRowHandle = numberOfRows;
this.gcMain.GridView.SelectRow(numberOfRows);
}
if (this.RightGridCallBack != null) this.RightGridCallBack(sender, e);
if (DetailRightGridCallBack != null) this.DetailRightGridCallBack(sender, e);
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -4747,19 +4729,6 @@ namespace Lskj.Control
/// <param name="e">The e.</param>
protected void OnReportPrintAfter(object sender, EventArgs e)
{
try
{
if (_printSaveParams != null && _printSaveParams.Count > 0)
{
//打印完成后添加数据库
int result = BaseModuleImpl.SavePrintRecord(_printSaveParams[0], _printSaveParams[1], _printSaveParams[2], _printSaveParams[3], _printSaveParams[4]);
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -4827,15 +4796,6 @@ namespace Lskj.Control
/// <param name="e"></param>
protected void OnTsmExportClick(object sender, EventArgs e)
{
try
{
this.ExportGridRecord();
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -5384,7 +5344,6 @@ namespace Lskj.Control
{
if (!this.SysModel.SearchEnable)
{
lastrichtext = text;
PromptBox.EditText = text;
// 获取文档对象
Document document = this.PromptBox.TextEdit.Document;