表单插件常用功能汇总原创
金蝶云社区-比邻星
比邻星
6人赞赏了该文章 257次浏览 未经作者许可,禁止转载编辑于2023年10月16日 10:13:43
封面

云想衣裳花想容,春风拂槛露华浓。若非群玉山头见,会向瑶台月下逢


  • 获取单据标题

string FormTitle = this.View.GetFormTitle();
  • 获取单据内码

string FormTitle = this.View.Model.DataObject["Id"].ToString();
string FormTitle = this.View.Model.GetPKValue().ToString();
  • 获取字段焦点

this.View.GetControl("FNote").SetFocus();
  • 锁定字段

this.View.GetControl("FNote").Enabled = false;
  • 隐藏字段

this.View.GetControl("FNote").Visible = false;
  • 锁定保存按钮

this.View.GetMainBarItem("tbSplitSave").Enabled = false;
  • 隐藏保存按钮

this.View.GetMainBarItem("tbSplitSave").Visible = false;
  • 刷新

//前台刷新,不和服务器交互
this.View.UpdateView("FNote");
//整个页面刷新,要和服务器交互,把后台数据库数据刷新过来
this.View.Refresh();
  • 调用保存操作

this.View.InvokeFormOperation("Save");
  • 删除单据体信息

this.View.Model.DeleteEntryData("FSaleOrderEntry");

  • 刷新单据体界面

this.View.UpdateView("FSaleOrderEntry");
  • 逐行,删除单据体分录,0代表第1行

this.View.Model.DeleteEntryRow("FSaleOrderEntry", 0);
  • 新增行

this.View.Model.CreateNewEntryRow("FSaleOrderEntry");
  • 复制行

参数说明: 0代表第1行;  1代表复制到第2行; false代表不携带源单关系
this.View.Model.CopyEntryRow("FSaleOrderEntry", 0, 1, false);
  • 获取单据体行内码

this.View.Model.GetEntryPKValue("FSaleOrderEntry", 0);
this.View.Model.GetEntryPKValue("FSaleOrderEntry", 1);
this.View.Model.GetEntryPKValue("FSaleOrderEntry", 2);
  • 获取单据体,行数

this.View.Model.GetEntryRowCount("FSaleOrderEntry");


赞 6