44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json.Linq;
|
|
using SWS.Commons;
|
|
using SWS.Model;
|
|
|
|
namespace SWS.Service
|
|
{
|
|
public class ProjectSettingsService : HttpService
|
|
{
|
|
public ProjectSettingsService() : base()
|
|
{
|
|
|
|
}
|
|
|
|
public async Task<List<ec_projectSettings>> GetList()
|
|
{
|
|
|
|
var res = await this.GetAsync<List<ec_projectSettings>>($"SettingsApi/GetList?projId={GlobalObject.curProject.ProjectId}");
|
|
if (res.code == 200)
|
|
{
|
|
return res.data;
|
|
}
|
|
else
|
|
{
|
|
}
|
|
return null;
|
|
}
|
|
public async Task<ec_projectSettings> GetEntity(string settingName)
|
|
{
|
|
|
|
var res = await this.GetAsync<ec_projectSettings>($"SettingsApi/GetEntity?settingName={settingName}&projId={GlobalObject.curProject.ProjectId}");
|
|
if (res.code == 200)
|
|
{
|
|
return res.data;
|
|
}
|
|
else
|
|
{
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|