电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

二开案例.列表插件.列表条件格式化之按用户进行格式化

来源:金蝶云社区作者:金蝶2024-09-239

二开案例.列表插件.列表条件格式化之按用户进行格式化

【应用场景】按用户进行列表条件格式化。

【案例演示】采购订单列表,不同用户查看时,显示不同的前景色。

【实现步骤】

<1>编写列表插件,如下所示。

using Kingdee.BOS.Core.List.PlugIn;

using Kingdee.BOS.Core.List.PlugIn.Args;

using Kingdee.BOS.Core.Metadata;

using Kingdee.BOS.Util;

using System.ComponentModel;


namespace Jac.XkDemo.BOS.Business.PlugIn

{

    /// <summary>

    /// 【列表插件】列表条件格式化之按用户进行格式化

    /// </summary>

    [HotUpdate]

    [Description("【列表插件】列表条件格式化之按用户进行格式化")]

    public class FormatRowByUserListPlugIn : AbstractListPlugIn

    {

        /// <summary>

        /// 列表行数据格式化

        /// </summary>

        /// <param name="args"></param>

        public override void OnFormatRowConditions(ListFormatConditionArgs args)

        {

            base.OnFormatRowConditions(args);

            if (this.Context.UserName == "demo")

            {

                var fc = new FormatCondition();

                fc.ApplayRow = true;// 格式化整行

                fc.ForeColor = "#FF0000";

                args.FormatConditions.Add(fc);

            }

            else if (this.Context.UserName == "张三")

            {

                var fc = new FormatCondition();

                fc.ApplayRow = true;

                fc.ForeColor = "#00FF00";

                args.FormatConditions.Add(fc);

            }

            else if (this.Context.UserName == "李四")

            {

                var fc = new FormatCondition();

                fc.ApplayRow = true

二开案例.列表插件.列表条件格式化之按用户进行格式化

【应用场景】按用户进行列表条件格式化。【案例演示】采购订单列表,不同用户查看时,显示不同的前景色。【实现步骤】<1>编写列表插件,如...
点击下载文档文档为doc格式

声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

已经是第一篇
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信