public bool UploadAdjustReport(HttpPostedFile postedFile, int RequestID, int AdjustSlip_ID) { byte[] fileContents = new byte[postedFile.ContentLength]; postedFile.InputStream.Read(fileContents, 0, fileContents.Length); string SavedName = RequestID + "_" + postedFile.FileName; if (Common.FtpRepository.UploadFile(fileContents, "/AssetSystem/GageAdjustReport/", SavedName) == true) { GageAdjustReport Report = new GageAdjustReport(); Report.FK_AdjustSlip_ID = AdjustSlip_ID; Report.Date = DateTime.Now; Report.Path = "http://192.168.9.3:8888/AssetSystem/GageAdjustReport/" + SavedName; Report.Add(); } return(true); }