Compartir a través de


DAVAdapter.Submit Método

Definición

Ejecuta la operación de envío en el adaptador asociado.

public:
 void Submit();
public void Submit ();
abstract member Submit : unit -> unit
Public Sub Submit ()

Ejemplos

En el ejemplo siguiente, el método Submit del DAVAdapterObject objeto se usa para enviar un documento XML a una biblioteca de documentos de Windows SharePoint Server. Este código requiere una Conexión de datos de biblioteca de formularios de SharePoint denominada "Submit" (Enviar).

// Get the first data adapter; a "SharePoint Library" submit adapter
DAVAdapter davAdapter = thisXDocument.DataAdapters["Submit"] as DAVAdapter;
if (davAdapter == null)
{
 thisXDocument.UI.Alert("SharePoint submit list adapter called 'Submit' was not found.");
 return;
}
// Set the file name to be the today's date (as an .xml file)
davAdapter.FileName = DateTime.Today.ToShortDateString() + ".xml";
if (davAdapter.SubmitAllowed)
{
 try
 {
  davAdapter.<span class="label">Submit</span>();
 }
 catch (Exception ex)
 {
  // The save failed
  thisXDocument.UI.Alert("Saving to " + davAdapter.FolderURL + " as " + davAdapter.FileName + " failed." + Environment.NewLine + "Reason: " + ex.Message);
 }
}
else
{
 thisXDocument.UI.Alert("Submit is not allowed on adapter " + davAdapter.Name + ".");
}

Se aplica a