Home
english
Home
.NET Server
Java Server
.NET Client
AJAX Client
AJAX Browser
Map Drive
Pricing
Contacts
info@ithit.com

IHierarchyItem.UpdateProperties Implementation Example

public virtual WebDAVResponse UpdateProperties(Property[] setProps, Property[] delProps)

{ 

       MultipropResponse resp = new MultipropResponse();

 

       SqlConnection conn = new SqlConnection(connStr);

       SqlTransaction trans = null;

       try

       {

             conn.Open();

             trans = conn.BeginTransaction();

 

             if(setProps != null)

                    foreach(Property p in setProps)

                    {

                           SetProperty(p, trans); // create or update property

                           resp.AddResponses(new PropResponse(p, new OkResponse()));

                    }

       

             if(delProps != null)

                    foreach(Property p in delProps)

                    {

                           RemoveProperty(p.Name, p.Namespace, trans);

                           resp.AddResponses(new PropResponse(p, new OkResponse()));

                    }

       

             UpdateModified(trans);

       

             trans.Commit();

       }

       catch

       {

             if(trans != null) trans.Rollback();

             return new ServerErrorResponse();

       }

       finally

       {

             conn.Close();

       }

   

       return resp;

}

 

WebDAV PROPPATCH 

comments powered by Disqus

Selected Customers:
USA
Symantec
Country: Sweden
Toyota
Country: USA
Microsoft
Country: Ukraine
Raiffeisen Bank
Country: USA
Siemens
Country: USA
Lockheed Martin
Country: USA
Intel Corporation
Country: Germany
SAP AG
Country: Israel
Autodesk, Inc.
Country: USA
U.S. Customs and Border Protection Agency
Have a question
about API?
Ask on StackOverflow


Found a bug or have a confidential question?
Write to info@ithit.com
Home .NET Server Java Server .NET Client AJAX Client AJAX Browser Map Drive Pricing Contacts

Updated: Tuesday, December 05, 2006