namespace Yw.CAL.HttpClient
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public class BimfaceFileRelation : BaseCAL_Sorter<AddBimfaceFileRelationInput, UpdateBimfaceFileRelationInput, BimfaceFileRelationDto>, IBimfaceFileRelation
|
{
|
protected override string Prefix
|
{
|
get { return $"{Yw.BLL.Bimface.ConfigHelper.HttpUrl}/Bimface/File/Relation"; }
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<List<BimfaceFileRelationDto>> GetByObjectTypeAndObjectID(string ObjectType, long ObjectID)
|
{
|
var paras = new List<(string Name, object Value)>()
|
{
|
(nameof(ObjectType),ObjectType),
|
(nameof(ObjectID),ObjectID)
|
};
|
return await GetUrl("GetByObjectTypeAndObjectID@V1.0").Get<List<BimfaceFileRelationDto>>(paras);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<long> InsertObject(AddBimfaceFileRelationInput input)
|
{
|
return await GetUrl("InsertObject@V1.0").Post<long>(input);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<long> InsertPage(AddBimfaceFileRelationInput input)
|
{
|
return await GetUrl("InsertPage@V1.0").Post<long>(input);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> UpdateContent(long ID, string Content)
|
{
|
return await GetUrl("UpdateContent@V1.0").Put<bool>(new { ID, Content });
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> UpdatePurpose(long ID, string Purpose)
|
{
|
return await GetUrl("UpdatePurpose@V1.0").Put<bool>(new { ID, Purpose });
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> DeleteExByID(long ID)
|
{
|
var paras = new List<(string Name, object Value)>()
|
{
|
(nameof(ID),ID)
|
};
|
return await GetUrl("DeleteExByID@V1.0").Delete<bool>(paras);
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|