GEREKLİ KUTUPHANELER
----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using Bimser.CSP.FormControls.Events;
using Bimser.CSP.Runtime.Common.Extensions;
using Bimser.Synergy.ServiceAPI.Models.Authentication;
using Bimser.Synergy.ServiceAPI;
using Newtonsoft.Json;
using Bimser.Synergy.Entities.Shared.Business.Objects;
using Bimser.Synergy.ServiceAPI.Models.Form;
using Bimser.Synergy.ServiceAPI.Models.Workflow;
using System.Threading.Tasks;
using Bimser.Synergy.Entities.DocumentManagement.Business.DTOs.Responses;
using Bimser.Framework.Web.Models;
using Bimser.Synergy.Entities.DocumentManagement.Business.DTOs.Requests;
using System.Linq;
using Bimser.Synergy.Entities.DocumentManagement.Business.Objects;
----------------------------------------------------------------------
DOKUMAN YONETIMINDAKI BIR NESNENIN BILGILERINI ALMAK ICIN GEREKLI METHOD
----------------------------------------------------------------------
public GetDMObjectResponse GetDMObjectInfo(string path)
{
WrapResponse<GetDMObjectsResponse> dmObject = ServiceApi.DocumentManagement.GetDMObjectsFromPath(
new GetDMObjectsFromPathRequest(path)).Result;
GetDMObjectResponse dMObjectResponse = dmObject.Result.Items.First();
return dMObjectResponse;
}
----------------------------------------------------------------------
SILME ISLEMI
----------------------------------------------------------------------
//ACIKLAMA: silinmek istenen dosyanin pathi verilerek secretkey alinir.
string fileSecretKey = GetDMObjectInfo("repo/klasor1/Test1.txt").SecretKey;
//alinan secretkey, serviceapi tarafinda isi yapacak methoda verilir.
ServiceApi.DocumentManagement.DeleteFile(new DeleteFileRequest(fileSecretKey, "reason"));