# 移动表单插件

## 【插件基类】

![](http://clubimg.kingdee.com/club/attachments/forum/201902/27/1551258157b3s08gqn4nu3unttu40gu64rujtjjnd3.png)

\
【插件注册】
------

![](http://clubimg.kingdee.com/club/attachments/forum/201902/27/1551258380x355x06p3xzhppzio5pddw5dphy3dpyi.png)

## **【代码示例】**

### 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);
            }
        }
    }
}
```

### &#x20;2、[控件属性设置代码示例](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1237879)

### 3、[移动列表行格式示例代码](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1407890)

### 4、[底部菜单属性设置代码示例](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1186906)

### 5、[调用移动端特性功能示例代码（定位、扫描等）](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1097311)

### 6、[移动BOS中如何响应点击发短信和打电话](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1323498)

### 7、[移动BOS中如何打开一个网页链接](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1095930)

## 【附件】

&#x20;     [移动附件\_上传篇-6.0版本以上](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1147545)\
&#x20;     [移动附件\_下载篇-6.0版本以上](http://club.kingdee.com/forum.php?mod=viewthread\&tid=1147567)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bos.gitbook.io/mobilebos/yi-dong-biao-dan/yi-dong-biao-dan-cha-jian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
