移动表单插件

移动表单插件

【插件基类】

【插件注册】

【代码示例】

1、插件示例:

using Kingdee.BOS.Mobile.PlugIn;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LKD.MobileDemoPlugins
{
    /// <summary>
    /// 移动表单插件
    /// </summary>
    public class MobileFormEdit : AbstractMobilePlugin
    {
        public override void AfterBindData(EventArgs e)
        {
            //单据头字段赋值
            this.View.Model.SetValue("F_LKD_Text","文本字段设置值");

            //单据头字段取值
            string strText = this.View.Model.GetValue("F_LKD_Text").ToString();

            //移动列表字段赋值
            int row = 0; //移动列表行索引,索引号从 0开始
            this.View.Model.SetValue("F_LKD_Text1", "文本字段设置值", row);

            //移动列表字段取值
            string strRowText = this.View.Model.GetValue("F_LKD_Text1", row).ToString();

            //移动列表新增行、并给字段赋值
            for (int i = 0; i < 5; i++)
            {
                this.View.Model.CreateNewEntryRow("F_LKD_MobileListViewEntity");
                int rowCount = this.View.Model.GetEntryRowCount("F_LKD_MobileListViewEntity");
                this.View.Model.SetValue("F_LKD_Text1", "F_LKD_Text1" + rowCount, rowCount);
                this.View.Model.SetValue("F_LKD_Integer", rowCount, rowCount);
            }
        }
    }
}

【附件】

移动附件_上传篇-6.0版本以上 移动附件_下载篇-6.0版本以上

Last updated