using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SWS.CAD.Models;
using SWS.CAD.Models.NoEntity;
using SWS.Commons;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web;
using System.Windows.Forms;
namespace SWS.CAD.Services
{
public class TemplateFileService : HttpService
{
public TemplateFileService() : base()
{
}
///
/// 查询模板文件目录树
///
///
public async Task> GetTemplateCatalogue()
{
var res = await this.GetAsync>($"TemplateFileApi/GetTemplateCatalogue?projectId={GlobalObject.curProject.ProjectId}");
//OnRefresh();
if (res.code == 200)
{
return res.data;
}
else
{
return null;//ERROR INFO
}
}
///
/// 查询模板文件实体
///
///
public async Task GetTemplateFile(string templateFileID)
{
var res = await this.GetAsync($"TemplateFileApi/GetEntity?projectId={GlobalObject.curProject.ProjectId}&templateFileID={templateFileID}");
if (res.code == 200)
{
return res.data;
}
else
{
return null;//ERROR INFO
}
}
}
}