按钮打开动态表单
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TEST
{
public class Global
{
/// <summary>
/// 用户id
/// </summary>
public string F_PAEZ_Text1 { get; set; }
}
public class DTBD : AbstractDynamicFormPlugIn //父类方法
{
public override void AfterBarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterBarItemClickEventArgs e)
{
base.AfterBarItemClick(e);
if (e.BarItemKey.Equals("tbButton_2", StringComparison.OrdinalIgnoreCase))
{
DynamicFormShowParameter parameter = new DynamicFormShowParameter();
//指定要打开的窗体ID
parameter.FormId = "93741eb406774b1fb66fe4027f7c537b";
//将客户ID添加到自定义参数中,以便在新窗体中获取
/* string F_PAEZ_Text1;
if (this.View.Model.GetValue("F_PAEZ_Text1") != null)
{
F_PAEZ_Text1 = this.View.Model.GetValue("F_PAEZ_Text1").ToString();
}
else
{
F_PAEZ_Text1 = "";
}
parameter.CustomParams.Add("F_PAEZ_Text1", F_PAEZ_Text1); */
this.View.ShowForm(parameter,
new Action<FormResult>((formResult) =>
{
if (formResult != null && formResult.ReturnData != null)
{
this.Model.SetValue("F_PAEZ_Text1",
((Global)formResult.ReturnData).F_PAEZ_Text1);
}
}));
}
base.AfterBarItemClick(e);
}
}
public class SubMain : AbstractDynamicFormPlugIn //子单据方法
{
/* private string F_PAEZ_Text1;
public override void OnInitialize(InitializeEventArgs e)
{
F_PAEZ_Text1 = Convert.ToString(e.Paramter.GetCustomParameter("F_PAEZ_Text1"));
base.OnInitialize(e);
}
public override void BeforeBindData(EventArgs e)
{
base.BeforeBindData(e);
if (F_PAEZ_Text1 != "" && F_PAEZ_Text1 != null)
{
this.View.Model.SetValue("F_PAEZ_Text1", F_PAEZ_Text1);
}
}*/
public override void AfterButtonClick(AfterButtonClickEventArgs e)
{
Global text1 = new Global();
if (e.Key == "F_BZ_BUTTON")
{
if (this.Model.GetValue("F_PAEZ_Text") != null)
{
text1.F_PAEZ_Text1 = this.Model.GetValue("F_PAEZ_Text").ToString();
}
else
{
text1.F_PAEZ_Text1 = "";
}
this.View.ReturnToParentWindow(new FormResult(text1));
this.View.Close();
}
if (e.Key == "F_BZ_BUTTON1")
{
this.View.Close();
}
base.AfterButtonClick(e);
}
}
}
按钮打开动态表单
using Kingdee.BOS.Core.Bill.PlugIn;using Kingdee.BOS.Core.DynamicForm;using Kingdee.BOS.Core.DynamicForm.PlugIn;using Kingdee....
点击下载文档
上一篇:单据转换规则设计下一篇:送给所有学员们的话!
本文2024-09-16 17:28:46发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-15971.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
- 鼎捷EAI整合規範文件V3.1.07 (集團).pdf
- 鼎捷OpenAPI應用場景說明_基礎資料.pdf
- 鼎捷OpenAPI應用場景說明_財務管理.pdf
- 鼎捷T100 API設計器使用手冊T100 APIDesigner(V1.0).docx
- 鼎新e-GoB2雲端ERP B2 線上課程E6-2應付票據整批郵寄 領取.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A4使用者建立權限設定.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程C3會計開帳與會計傳票.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程E6-1應付票據.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A5-1進銷存參數設定(初階篇).pdf
- 鼎新e-GoB2雲端ERP B2 線上課程D2帳款開帳與票據開帳.pdf
热门文章