DAVAdapterObject 接口

代表将表单信息提交给 Microsoft Windows SharePoint Services 服务器或其他支持 DAV 连接的服务器的连接。

命名空间:  Microsoft.Office.Interop.InfoPath.SemiTrust
程序集:  Microsoft.Office.Interop.InfoPath.SemiTrust(位于 Microsoft.Office.Interop.InfoPath.SemiTrust.dll 中)

语法

声明
<GuidAttribute("096cd5d6-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface DAVAdapterObject _
    Inherits DAVAdapter
用法
Dim instance As DAVAdapterObject
[GuidAttribute("096cd5d6-0786-11d1-95fa-0080c78ee3bb")]
public interface DAVAdapterObject : DAVAdapter

备注

此类型是用于 Coclass(托管代码需要此 Coclass 来实现 COM 互操作性)的包装。使用此类型来访问由此 Coclass 实现的 COM 接口。有关 COM 接口的信息(包括指向其成员说明的链接),请参阅DAVAdapter.

使用 DataAdaptersCollectionItem 属性返回 DAVAdapter 对象。

示例

在以下示例中,如果目标可达到,则在 OnSubmitRequest 事件中调用 DAVAdapterObject 对象的 Submit 方法,否则将显示一个消息框:

[InfoPathEventHandler(EventType=InfoPathEventType.OnSubmitRequest)]
public void OnSubmitRequest(DocReturnEvent e)
{
 DAVAdapterObject davAdapterObj = thisXDocument.DataAdapters[0] as DAVAdapterObject;
 bool reachable = thisApplication.IsDestinationReachable("https://localhost/application");
 if (reachable)
 {
  if (davAdapterObj == null)
  {
   thisXDocument.UI.Alert("First DataAdapter does not exist or is not a DAVAdapterObject.");
   return;
  }
  davAdapterObj.Submit();
  e.ReturnStatus = true;
 }
 else
 {
  thisXDocument.UI.Alert(davAdapterObj.FolderURL + " is not reachable.");
  e.ReturnStatus = false;
 }
}

另请参阅

引用

DAVAdapterObject 成员

Microsoft.Office.Interop.InfoPath.SemiTrust 命名空间