This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region MyRegion | |
protected void Upload(string strDocNumber) | |
{ | |
string strDocLibraryLink = System.Configuration.ConfigurationManager.AppSettings["SPDocumentLibrary"].ToString(); | |
SPSite tekelecSite = new SPSite(strDocLibraryLink); | |
SPWeb tekelecWeb = tekelecSite.OpenWeb(); tekelecWeb.AllowUnsafeUpdates = true; | |
SPList list = tekelecWeb.Lists["documents"]; | |
foreach (SPListItem item in list.Items) | |
{ | |
if (Convert.ToString(item["Document Number"]).Equals(strDocNumber)) | |
{ | |
//Upload first file if (FileUploadDocument.PostedFile.FileName != "") | |
{ | |
SPFile SPFileName = tekelecWeb.GetFile(list.ToString() + "/" + Convert.ToString(item["Name"])); | |
SPFileName.CheckIn("Comments", | |
SPCheckinType.MajorCheckIn); break; | |
} | |
} | |
} | |
#endregion |