Code Snippet to remove duplicate workflow associations from a content type

1: using (SPSite site = new SPSite("http://ms9:105")) 2: { 3: using (SPWeb web = site.OpenWeb()) 4: { 5: SPList list = web.Lists["Shared Documents"]; 6: 7: foreach(SPContentType con in list.ContentTypes) 8: { 9: if (con.Name == "Document") 10: { 11: SPWorkflowAssociationCollection assocCol = con.WorkflowAssociations; 12: bool App = false; 13: bool Feed = false; 14: bool…

0

Code snippet to download the files along with versions from SPS 2003 document library.

1: private void Download() 2: { 3: string siteUrl = txtSite.Text.ToString(); 4: string source = txtDocLib.Text.ToString(); 5: string downloadPath= txtDownload.Text.ToString(); 6: byte[] vContent = null; 7: int count = 1; 8:   9: using (SPSite site = new SPSite(siteUrl)) 10: { 11: using (SPWeb web = site.OpenWeb()) 12: { 13: SPFolder sourceFolder = web.GetFolder(source); 14:…

0