发送邮件的接收人添加当前用户二开示例
首先在BOS设计器上找到发送邮件这个元数据,然后拓展,挂上二开表单插件。表单插件示例代码如下:
public class SendMailDefault : AbstractDynamicFormPlugIn { private string FMailAddress = "FMailAddress"; private const string FSendee = "FSendee"; private const string FUser = "FUser"; private const string FToAddress = "FToAddress"; private const string FSendeeKey = "FSendeeKey"; public override void AfterBindData(EventArgs e) { base.AfterBindData(e); SetCustomer(); } private void SetCustomer() { BusinessInfo info = this.View.OpenParameter.FormMetaData.BusinessInfo; Entity entity = info.GetEntity(FMailAddress); int count = this.View.Model.GetEntryRowCount(FMailAddress) - 1; this.Model.InsertEntryRow(FMailAddress, count); DynamicObject objRow = this.Model.GetEntityDataObject(entity, count); info.GetField(FSendee).DynamicProperty.SetValue(objRow, this.View.Context.UserName); info.GetField(FSendeeKey).DynamicProperty.SetValue(objRow, this.View.Context.UserId); info.GetField(FToAddress).DynamicProperty.SetValue(objRow, this.View.Context.UserEmail); this.View.StyleManager.SetEnabled(FUser, objRow, "LockFieldService", true); this.View.StyleManager.SetEnabled(FToAddress, objRow, "LockFieldService", false); this.View.UpdateView(FMailAddress); } }
发送邮件的接收人添加当前用户二开示例
首先在BOS设计器上找到发送邮件这个元数据,然后拓展,挂上二开表单插件。表单插件示例代码如下:public class SendMailDefault : Abstract...
点击下载文档
本文2024-09-23 04:18:48发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-164506.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章