You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.8 KiB
59 lines
1.8 KiB
using BBWY.Client.Models.APIModel.Request;
|
|
using BBWY.Client.Models.APIModel.Response.PackTask;
|
|
using BBWY.Client.Models.PackTask;
|
|
using BBWY.Client.Views.PackTask;
|
|
using BBWY.Common.Http;
|
|
using BBWY.Common.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
using System.Text;
|
|
|
|
namespace BBWY.Client.APIServices
|
|
{
|
|
public class ConsumableService : BaseApiService, IDenpendency
|
|
{
|
|
public ConsumableService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
|
|
{
|
|
}
|
|
|
|
public ApiResponse<ConsuableRequest[]> SearchAll()
|
|
{
|
|
return SendRequest<ConsuableRequest[]>(globalContext.QKApiHost, "api/Consumable/SearchAll",
|
|
null
|
|
, null, HttpMethod.Get);
|
|
}
|
|
|
|
public ApiResponse<object> Add(ConsuableRequest consumable)
|
|
{
|
|
return SendRequest<object>(globalContext.QKApiHost, "api/Consumable/Add",
|
|
consumable
|
|
, null, HttpMethod.Post);
|
|
}
|
|
public ApiResponse<object> Edit(ConsuableRequest consumable)
|
|
{
|
|
return SendRequest<object>(globalContext.QKApiHost, "api/Consumable/Edit",
|
|
consumable
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<object> Deleted(long id)
|
|
{
|
|
return SendRequest<object>(globalContext.QKApiHost, "api/Consumable/Deleted",
|
|
new
|
|
{
|
|
id = id
|
|
}
|
|
, null, HttpMethod.Get);
|
|
}
|
|
|
|
public ApiResponse<ConsumableResponse> Search(ConsumableSearchRequest consumable)
|
|
{
|
|
return SendRequest<ConsumableResponse>(globalContext.QKApiHost, "api/Consumable/Search",
|
|
consumable
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
}
|
|
}
|
|
|