[K/3Cloud]在插件中根据条件取消表单打开过程
2013-08-30 11:49
99 查看
新建一个类,继承自动态表单抽象插件类AbstractBillPlugIn,重写PreOpenForm。
/// <summary> /// 销售订单 单据维护界面插件 /// </summary> public class SaleOrderEdit : AbstractBillPlugIn { // // Summary: // 动态表单打开前事件 // // Parameters: // e: // 动态表单打开前事件参数 public override void PreOpenForm(BOS.Core.DynamicForm.PlugIn.Args.PreOpenFormEventArgs e) { if (e.OpenParameter.Status == OperationStatus.ADDNEW) { long orgId = e.Context.CurrentOrganizationInfo.ID; Object objEqualSaler = CommonServiceHelper.GetSystemProfile(e.Context, orgId, Kingdee.K3.Core.SCM.SCMFormIdConst.SAL_SystemParameter, SCMConst.PARAM_SELLEREQUALCREATOR, false); para_EqualSaler = objEqualSaler == null ? false : Convert.ToBoolean(objEqualSaler); if (para_EqualSaler) { long sellerId = SaleServiceHelper.GetSellerIdFromUserId(e.Context, orgId, e.Context.UserId); if (sellerId == 0) { e.Cancel = true; e.CancelMessage = Kingdee.BOS.Resource.ResManager.LoadKDString("当前用户不是销售员,不能录入订单!", "004019030003349", Kingdee.BOS.Resource.SubSystemType.SCM); } } } } }
相关文章推荐
- [K/3Cloud]在插件中根据条件取消表单打开过程
- [K/3Cloud]在插件中根据条件取消表单打开过程
- [K/3Cloud] 动态表单打开时传递一个自定义参数并在插件中获取
- [K/3Cloud] 动态表单打开时传递一个自定义参数并在插件中获取
- 根据条件,弹出带确定取消的对话框.
- [K/3Cloud] 创建一个业务单据表单插件
- [K/3Cloud] 创建一个业务单据表单插件
- Vue表单验证插件的制作过程
- rcp(插件开发)如何根据不同后缀文件打开不同编辑器?
- 通用存储过程之五: 根据查询条件,获取表记录数的存储过程。
- QTP打开IE循环输入Ation1表单内容关闭IE过程
- 一个根据条件查询数据的存储过程
- 如何在页面打开后根据条件让EditorGridPanel的某一行的复选框默认选中?
- 根据条件取消一个事件
- 根据条件进行判断事务存储过程
- jQuery-extend扩展插件之实现多表单标注颜色(常用于多条件联合查询)
- LigerUI中根据表单查询条件进行查询,使用表格Grid展示
- wicket:根据条件加载不同的form表单数据
- 根据jquery.validate.js写的一个通用的form表单校验插件
- Vue 表单验证插件的写作过程