zoukankan      html  css  js  c++  java
  • [K/3Cloud] 动态表单打开时传递一个自定义参数并在插件中获取

    插件中在调用动态表单时,通过DynamicFormShowParameter的CustomParams,增加自定义的参数。

            /// <summary>
            /// 库存查询
            /// </summary>
            private void ShowMaterialStock()
            {
                object useOrgId = (this.View.Model.GetValue("FUseOrgId") as DynamicObject)["Id"];
                object materialId = this.View.Model.GetPKValue();
                List<long> orgIds = PermissionServiceHelper.GetPermissionOrg(this.Context, new BusinessObject() { Id = K3.Core.SCM.SCMFormIdConst.STK_Inventory }, PermissionConst.View);
    
                DynamicFormShowParameter ShowPara = new DynamicFormShowParameter();
                ShowPara.ParentPageId = this.View.PageId;
                ShowPara.MultiSelect = false;
                ShowPara.FormId = K3.Core.SCM.SCMFormIdConst.STK_InventoryQuery;
                ShowPara.Height = 600;
                ShowPara.Width = 1000;
                string filter = string.Format(" FStockOrgId = {0} And FMaterialId = {1} And FOwnerTypeId='BD_OwnerOrg' And FOwnerId={2} ", useOrgId, materialId, useOrgId);
                ShowPara.CustomParams.Add("QueryFilter", filter);
                ShowPara.CustomParams.Add("QueryOrgId", (this.View.Model.GetValue("FUseOrgId") as DynamicObject)["Id"].ToString());
                this.View.ShowForm(ShowPara);
            }



    目标单据的插件中,通过View.OpenParameter.GetCustomParameter("xxx")获取传递的自定义参数:

        /// <summary>
        /// 即时库存查询界面插件
        /// </summary>
        public class InventoryQuery : AbstractDynamicFormPlugIn
        {
            public override void OnInitialize(InitializeEventArgs e)
            {
                base.OnInitialize(e);
                object paraQueryFilter = this.View.OpenParameter.GetCustomParameter("QueryFilter");
                object paraOrgId = this.View.OpenParameter.GetCustomParameter("QueryOrgId");
                
            }
        }


  • 相关阅读:
    现代操作系统读书笔记 2
    java8 中 ImageIO 读取 tiff 格式的图片失败
    word 转 pdf,c#代码
    spring 技术内幕读书笔记1
    操作系统精髓与设计读书笔记1
    手把手教你WEB套打程序开发
    WEB打印控件Lodop使用体会
    listview下拉刷新 上拉(滑动分页)加载更多
    如何解析android访问webservice返回的SoapObject数据(可用)
    统计子串在另一个字符中出现的次数
  • 原文地址:https://www.cnblogs.com/fyq891014/p/4188833.html
Copyright © 2011-2022 走看看