自定义选单列表添加过滤条件原创
金蝶云社区-士大玉
士大玉
34人赞赏了该文章 276次浏览 未经作者许可,禁止转载编辑于2024年06月17日 17:04:55

//选择基础资料中编码带9的数据

//listShowParameter.ListFilterParameter.Filter = string.Format("FNumber like '%{0}%'", "9");


//弹出列表数据

ListShowParameter listShowParameter = new ListShowParameter();

listShowParameter.FormId = "RLSI_HYKJ_JDJX_LJMXZL";

// 业务对象标识 

listShowParameter.PageId = Guid.NewGuid().ToString();

listShowParameter.ParentPageId = this.View.PageId;

//设置是否能够多选

listShowParameter.MultiSelect = true;

// 是否有返回数据的选项

listShowParameter.IsLookUp = true;

listShowParameter.NoBusy = true;

listShowParameter.Width = 1200; // 设置窗体宽度

listShowParameter.Height = 600; // 设置窗体高度

//showParameter.TitleVisible = false; // 设置无边框样式

// 给列表设置固定过滤条件

listShowParameter.ListFilterParameter.Filter = string.Format("FNumber like '%{0}%'", "9");

this.View.ShowForm(listShowParameter, result =>

{

    Object returnDate = result.ReturnData;

    //返回数据不是空值 并且是RowCollention 这类型

    if (returnDate != null && returnDate is ListSelectedRowCollection)

    {

        ListSelectedRowCollection listSelectedRowCollection = returnDate as ListSelectedRowCollection;

        if (listSelectedRowCollection != null)

        {

            // 给单据体第i行填充数据

            for (int i = 0; i < listSelectedRowCollection.Count; i++)

            {

                //每次进入循环给单据体新增一行

                //this.View.Model.CreateNewEntryRow("FEntity");


                DynamicObjectDataRow datarow = (DynamicObjectDataRow)listSelectedRowCollection[i].DataRow;

                // 给基础资料赋值需要知道你使用的是哪个字段 number 或者  FID  

                //this.View.Model.SetItemValueByNumber("F_XREW_ZILIAOONE", datarow.DynamicObject["FNumber"].ToString(), i);


                //this.View.Model.SetValue("F_XREW_FHSJTEXT", datarow.DynamicObject["FNumber"], i);


            }

        }


    }

});



引用·原文链接:https://vip.kingdee.com/article/154892451012720128?productLineId=1&isKnowledge=2&lang=zh-CN


图标赞 34
34人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!

您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!

请选择打赏金币数 *

10金币20金币30金币40金币50金币60金币
可用金币: 0