学习eXpress,现在遇到这样两个问题。

问题一: 如何在“确定”按钮中,获取勾选了记录信息。

如下图所示,我勾选了这两条记录,点击“确定”后,我要在“确定”按钮中,分别获取这两条记录的每个字段的信息,请问这个过程怎么实现?

(按照它自带的“删除”功能?我想知道勾选后,点击删除时,删除按钮的操作过程)

详细描述:a.如何确定勾选了那些记录?b.如何获取每个记录的各个字段信息?

Add a Simple Action (eXpress 求助)

 

问题二:点击一条记录后进入如下界面,现在也要添加“确定”,点击“确定”按钮,获取当前记录的每个字段的信息,并弹出一个新窗口,显示当前记录每个字段的信息。

现在遇到的困难是:a.不知道如何获取当前记录?b.如何弹出窗口?(response.write在此处不能弹出窗口来)

Add a Simple Action (eXpress 求助)

 

最后一个问题,在xaf中是否支持用户自己来添加这样的功能(“确定”)

 

补充:我用的是“eXpressApp Framework”==》“Demos”==“FeatureCenter”这个实例    然后按照它带的帮助文档  在这个基础上将它改成改成自己的项目,现在我要做的是   通过帮助文档Add an Action that Displays a Popup Window 这个例子  在ShowNotesAction_Execute方法里面   把对应的当前记录的各个字段信息取出来

请问 是“ DetailViewItem item = ((DetailView)View).FindItem("Description");   ((PropertyEditor)item).ReadValue();”  这段代码吗?

 

Add a Simple Action (eXpress 求助)Add a Simple Action (eXpress 求助)Code
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->private void ShowNotesAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e) {
   DemoTask task 
= (DemoTask)View.CurrentObject;
   ObjectSpace.SetModified(task);
   
foreach(Note note in e.PopupWindow.View.SelectedObjects) {
      
if(!string.IsNullOrEmpty(task.Description)) {
         task.Description 
+= Environment.NewLine;
      }
      task.Description 
+= note.Text;
   }
   DetailViewItem item 
= ((DetailView)View).FindItem("Description");
   ((PropertyEditor)item).ReadValue();
   
//Save changes to the database if the current Detail View is displayed in the View mode
   if(View is DetailView && ((DetailView)View).ViewEditMode == ViewEditMode.View) {
      View.ObjectSpace.CommitChanges();
   }
}

 

Add a Simple Action (eXpress 求助)

 Add a Simple Action (eXpress 求助)

相关文章:

  • 2021-08-03
  • 2021-06-14
  • 2021-11-03
  • 2021-12-12
  • 2021-11-16
  • 2021-09-19
  • 2021-08-17
  • 2022-02-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2021-06-14
  • 2021-06-07
相关资源
相似解决方案