大文本字段修改详细信息后,如何回写到文本摘要:插件示例演示

【案例演示】大文本字段修改详细信息后,如何回写到文本摘要
【实现步骤】
<1>编写动态表单插件,代码如下。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Util;
using Kingdee.BOS.Core.Metadata.FieldElement;
using Kingdee.BOS.Orm.DataEntity;
namespace Kingdee.DevBOSTest.Business.PlugIn
{
[HotUpdate]
[Description("大文本字段修改实时回写插件")]
public class LargeTextSyncPlugIn:AbstractDynamicFormPlugIn
{
/// <summary>
/// 大文本字段标示;据此去父页面读取/设置大文本详细信息数据流
/// </summary>
private string _fieldKey = string.Empty;
/// <summary>
/// 参数名:本次编辑的父页面大文本字段标示
/// </summary>
private string _paraName_FieldKey = "FieldKey";
public override void ButtonClick(ButtonClickEventArgs e)
{
base.ButtonClick(e);
// 判断父页面是否存在
if (this.View.ParentFormView == null)
return;
// 接收大文本字段标示
var para = this.View.OpenParameter.GetCustomParameter(this._paraName_FieldKey);
if (para != null)
{
this._fieldKey = para.ToString();
}
if (this._fieldKey.IsNullOrEmptyOrWhiteSpace())
return;
if (e.Key.EqualsIgnoreCase("FbtnOK"))
{
SetLargeTextValue(GetLargeTextValue());
}
}
/// <summary>
/// 从父界面Model大文本字段中,读取大文本详细内容并返回
/// </summary>
/// <returns></returns>
private string GetLargeTextValue()
{
// 大文本字段
Field field = this.View.ParentFormView.BillBusinessInfo.GetField(this._fieldKey);
LargeTextField largeTextField = field as LargeTextField;
if (largeTextField == null) return string.Empty;
// 所在分录当前行号
int row = this.View.ParentFormView.Model.GetEntryCurrentRowIndex(field.Entity.Key);
// 当前行所在的动态模型数据包大文本字段修改详细信息后,如何回写到文本摘要:插件示例演示
【案例演示】大文本字段修改详细信息后,如何回写到文本摘要【实现步骤】<1>编写动态表单插件,代码如下。using System;using System.Colle...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



