Exemplo n.º 1
0
 //public void UpdateQaqcformForSign(int qaqcformId, string savedUrl, int SPCollectionID, bool isSubmitted)
 //{
 //    (new Element.Reveal.Server.BALC.ProjectWriter()).UpdateQaqcformForSign(qaqcformId, savedUrl, SPCollectionID, isSubmitted);
 //}
 //public void JsonUpdateQaqcformForSign(string qaqcformId, string savedUrl, string SPCollectionID, string isSubmitted)
 //{
 //    (new Element.Reveal.Server.BALC.ProjectWriter()).UpdateQaqcformForSign(Int32.Parse(qaqcformId), savedUrl, Int32.Parse(SPCollectionID), bool.Parse(isSubmitted));
 //}
 //public void UpdateSingleMaterialWithReelNo(int materialId, string newReelNo)
 //{
 //    (new Element.Reveal.Server.BALC.ProjectWriter()).UpdateMaterialWithReelNo(materialId, newReelNo);
 //}
 //public void JsonUpdateSingleMaterialWithReelNo(string materialId, string newReelNo)
 //{
 //    (new Element.Reveal.Server.BALC.ProjectWriter()).UpdateMaterialWithReelNo(Int32.Parse(materialId), newReelNo);
 //}
 //public void UpdateSingleProgressWithCWP(int progressId, int newCwpId)
 //{
 //    (new Element.Reveal.Server.BALC.ProjectWriter()).UpdateProgressWithCWP(progressId, newCwpId);
 //}
 //public void JsonUpdateSingleProgressWithCWP(string progressId, string newCwpId)
 //{
 //    (new Element.Reveal.Server.BALC.ProjectWriter()).UpdateProgressWithCWP(Int32.Parse(progressId), Int32.Parse(newCwpId));
 //}
 //public void UpdateTimesheetToP6(int fiwpId, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).UpdateTimesheetToP6(fiwpId, userName, password);
 //}
 //public void JsonUpdateTimesheetToP6(string fiwpId, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).UpdateTimesheetToP6(Int32.Parse(fiwpId), userName, password);
 //}
 //public void SyncProjectScheduleToP6(int projectscheduleId, int projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncProjectScheduleToP6(projectscheduleId, projectId, Helper.RemoveJsonParameterWrapper(disciplineCode), userName, password);
 //}
 //public void JsonSyncProjectScheduleToP6(string projectscheduleId, string projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncProjectScheduleToP6(Int32.Parse(projectscheduleId), Int32.Parse(projectId), Int32.Parse(disciplineCode), userName, password);
 //}
 //public void SyncFIWPResourceToP6(int fiwpId, int projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncFIWPResourceToP6(fiwpId, projectId, Helper.RemoveJsonParameterWrapper(disciplineCode), userName, password);
 //}
 //public void JsonSyncFIWPResourceToP6(string fiwpId, string projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncFIWPResourceToP6(Int32.Parse(fiwpId), Int32.Parse(projectId), Int32.Parse(disciplineCode), userName, password);
 //}
 //public void SyncScheduleResourceToP6(int fiwpId, int projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncScheduleResourceToP6(fiwpId, projectId, Helper.RemoveJsonParameterWrapper(disciplineCode), userName, password);
 //}
 //public void JsonSyncScheduleResourceToP6(string fiwpId, string projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncScheduleResourceToP6(Int32.Parse(fiwpId), Int32.Parse(projectId), Int32.Parse(disciplineCode), userName, password);
 //}
 //public void SyncScheduleResourceToP6ByProjectSchedule(int projectscheduleId, int projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncScheduleResourceToP6ByProjectSchedule(projectscheduleId, projectId, Helper.RemoveJsonParameterWrapper(disciplineCode), userName, password);
 //}
 //public void JsonSyncScheduleResourceToP6ByProjectSchedule(string projectscheduleId, string projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncScheduleResourceToP6ByProjectSchedule(Int32.Parse(projectscheduleId), Int32.Parse(projectId), Int32.Parse(disciplineCode), userName, password);
 //}
 //public void SyncScheduleFIWPResourceToP6(int fiwpId, int projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncScheduleFIWPResourceToP6(fiwpId, projectId, Helper.RemoveJsonParameterWrapper(disciplineCode), userName, password);
 //}
 //public void JsonSyncScheduleFIWPResourceToP6(string fiwpId, string projectId, string disciplineCode, string userName, string password)
 //{
 //    (new Element.Reveal.Server.BALC.ScheduleWriter()).SyncScheduleFIWPResourceToP6(Int32.Parse(fiwpId), Int32.Parse(projectId), Int32.Parse(disciplineCode), userName, password);
 //}
 ////LibInsul-------------------------------------------------------------
 //public List<LibinsulfactorDTO> SaveLibinsulfactor(List<LibinsulfactorDTO> lib)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveLibinsulfactor(lib);
 //}
 //public List<LibinsulpaintmanhourDTO> SaveLibinsulpaintmanhour(List<LibinsulpaintmanhourDTO> lib)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveLibinsulpaintmanhour(lib);
 //}
 //public List<LibinsulpipefactorDTO> SaveLibinsulpipefactor(List<LibinsulpipefactorDTO> lib)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveLibinsulpipefactor(lib);
 //}
 //public List<LibinsulpipemanhourDTO> SaveLibinsulpipemanhour(List<LibinsulpipemanhourDTO> lib)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveLibinsulpipemanhour(lib);
 //}
 //public int UploadSharePointForSPCollectionID(int projectId, string collection, string docName)
 //{
 //    try
 //    {
 //        return (new Element.Reveal.Server.BALC.ProjectWriter()).UploadSharePointForSPCollectionID(projectId, collection, docName, null, null, null, null, null, Cookies.GetSPCredential());
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 //public int JsonUploadSharePointForSPCollectionID(string projectId, string collection, string docName)
 //{
 //    try
 //    {
 //        return (new Element.Reveal.Server.BALC.ProjectWriter()).UploadSharePointForSPCollectionID(Int32.Parse(projectId), collection, docName, null, null, null, null, null, Cookies.GetSPCredential());
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 ///// <summary>
 ///// 2013-11-25 
 ///// </summary>
 ///// <param name="dbInstance"></param>
 ///// <param name="DrawingData"></param>
 ///// <param name="drwaings"></param>
 ///// <param name="fileNm"></param>
 ///// <param name="siteInstance"></param>
 ///// <param name="webPath"></param>
 ///// <param name="physicalpath"></param>
 ///// <returns></returns>
 //public DrawingDTO SaveMultiDrawingAndUpload(byte[] DrawingData, DrawingDTO drwaings, string fileNm, string siteInstance, string webPath, string physicalpath)
 //{
 //    try
 //    {
 //        return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveMultiDrawingAndUpload(DrawingData, drwaings, siteInstance, webPath, physicalpath, fileNm, Cookies.GetSPCredential());
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 //public List<DrawingDTO> SaveMultiDrawingAndUpload2(List<DrawingDTO> drwaings)
 //{
 //    try
 //    {
 //        return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveMultiDrawingAndUpload2(drwaings, Cookies.GetSPCredential());
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 //public DrawingDTO SaveDrawingAndUpload(DrawingDTO drwaings, string fileNm, string siteInstance, string webPath, string physicalpath)
 //{
 //    try
 //    {
 //        return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveDrawingAndUpload(drwaings, siteInstance, webPath, physicalpath, fileNm, Cookies.GetSPCredential());
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 //public DrawingDTO SaveDrawingAndGenerate(DrawingDTO drwaings, string siteInstance, string webPath)
 //{
 //    try
 //    {
 //        return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveDrawingAndGenerate(drwaings, siteInstance, webPath, Helper.GetImagePhysicalPath());
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 //public void RegenerateCXML(int projectId, string siteInstance, string webPath)
 //{
 //    (new Element.Reveal.Server.BALC.ProjectWriter()).RegenerateCXML(projectId, siteInstance, webPath, Helper.GetImagePhysicalPath());
 //}
 //public string GetImagePhysicalPath()
 //{
 //    try
 //    {
 //        return Helper.GetImagePhysicalPath();
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 //public string GetImageLocationURL()
 //{
 //    try
 //    {
 //        return Helper.GetImageLocationURL();
 //    }
 //    catch (Exception ex)
 //    {
 //        throw ex;
 //    }
 //}
 ///// <summary>
 ///// Delete MTO and Importedfilename objects which object contains the specified ImportedfilenameID to match.
 ///// </summary>
 ///// <param name="dbInstance">The name of the database instance is what you use to refer to a particular connection string for a particular provider via code</param>
 ///// <param name="importedfilenameId">ImportedfilenameID to search for</param>
 ///// <returns></returns>
 ///// <summary>
 ///// Save(contains Update and Delete) Documentmarkup objects.
 ///// </summary>
 ///// <param name="dbInstance">The name of the database instance is what you use to refer to a particular connection string for a particular provider via code</param>
 ///// <param name="documentmarkup">Documentmarkup objects to save</param>
 ///// <returns>DocumentmarkupDTO</returns>
 //public List<DocumentmarkupDTO> SaveDocumentmarkup(List<DocumentmarkupDTO> documentmarkup)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveDocumentmarkup(documentmarkup);
 //}
 ///// <summary>
 ///// Save(contains Update and Delete) Documentmarkup objects.
 ///// </summary>
 ///// <param name="dbInstance">The name of the database instance is what you use to refer to a particular connection string for a particular provider via code</param>
 ///// <param name="documentmarkup">Documentmarkup objects to save</param>
 ///// <returns>DocumentmarkupDTO</returns>
 //public List<DocumentmarkupDTO> JsonSaveDocumentmarkup(List<DocumentmarkupDTO> documentmarkup)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveDocumentmarkup(documentmarkup);
 //}
 ///// <summary>
 ///// Create Documentmarkup object and Make default sharepoint item.
 ///// </summary>
 ///// <param name="dbInstance">The name of the database instance is what you use to refer to a particular connection string for a particular provider via code</param>
 ///// <param name="projectId">ProjectID to search for</param>
 ///// <param name="documentmarkup">Documentmarkup object to save</param>
 ///// <returns>DocumentmarkupDTO</returns>
 //public DocumentmarkupDTO SaveDocumentmarkupWithSharePoint(int projectId, DocumentmarkupDTO documentmarkup)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveDocumentmarkupWithSharePoint(projectId, documentmarkup, Cookies.GetSPCredential());
 //}
 ///// <summary>
 ///// Create Documentmarkup object and Make default sharepoint item.
 ///// </summary>
 ///// <param name="dbInstance">The name of the database instance is what you use to refer to a particular connection string for a particular provider via code</param>
 ///// <param name="projectId">ProjectID to search for</param>
 ///// <param name="documentmarkup">Documentmarkup object to save</param>
 ///// <returns>DocumentmarkupDTO</returns>
 //public DocumentmarkupDTO JsonSaveDocumentmarkupWithSharePoint(string projectId, DocumentmarkupDTO documentmarkup)
 //{
 //    return (new Element.Reveal.Server.BALC.ProjectWriter()).SaveDocumentmarkupWithSharePoint(Int32.Parse(projectId), documentmarkup, Cookies.GetSPCredential());
 //}
 public DocumentmarkupDTO JsonSaveDocumentmarkupWithMarkupImage(DocumentmarkupDTO documentmarkup, UpfileDTOS upFileCollection)
 {
     return (new Element.Sigma.Web.Biz.TrueTask.Viewer()).SaveDocumentmarkupWithMarkupImage(documentmarkup, upFileCollection);
 }
Exemplo n.º 2
0
        public DocumentmarkupDTO SaveDocumentmarkupWithMarkupImage(DocumentmarkupDTO documentmarkup, UpfileDTOS upFileCollection)
        {
            //TransactionScope scope = null;
            //byte[] bytes = null;
            string fileType = Element.Reveal.DataLibrary.Utilities.FileType.DRAWING_MARKUP;
            string fileName = documentmarkup.PersonnelID + "_" + documentmarkup.DrawingID + "_" + fileType;

            //using (scope = new TransactionScope(TransactionScopeOption.RequiresNew))
            //{

            #region Upload Report File & Save File Info

            upFileCollection.fileStoreDTOList[0].FileTitle = fileName;
            upFileCollection.fileStoreDTOList[0].FileDescription = DateTime.Now.ToString();
            upFileCollection.fileStoreDTOList[0].FileCategory = Element.Reveal.DataLibrary.Utilities.FileCategory.REPORT;
            upFileCollection.fileStoreDTOList[0].FileTypeCode = fileType;

            upFileCollection.uploadedFileDTOList[0].Name = fileName;
            upFileCollection.uploadedFileDTOList[0].UploadedBy = documentmarkup.UpdatedBy;
            upFileCollection.uploadedFileDTOList[0].UploadedDate = DateTime.Now;
            upFileCollection.uploadedFileDTOList[0].CreatedBy = documentmarkup.UpdatedBy;
            upFileCollection.uploadedFileDTOList[0].UpdatedBy = documentmarkup.UpdatedBy;

            upFileCollection = (new TrueTask.Common()).SaveSingleUploadFile(upFileCollection, documentmarkup.PersonnelID);

            #endregion

            #region Save Report Document Info

            List<DocumentmarkupDTO> documentmarkups = new List<DocumentmarkupDTO>();

            //documentmarkup.SPCollectionID = upFileCollection.uploadedFileDTOList[0].UploadedFileInfoId;
            documentmarkup.FileStoreId = upFileCollection.uploadedFileDTOList[0].FileStoreId;
            documentmarkups.Add(documentmarkup);

            documentmarkups = SaveDrawingMarkup(documentmarkups);

            if (documentmarkups != null && documentmarkups.Count > 0)
                documentmarkup = documentmarkups[0];

            #endregion

            //    scope.Complete();
            //}

            return documentmarkup;
        }