1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using wispro.sp.entity;
- namespace wispro.sp.web.Services
- {
- public class OrganizationService
- {
- private readonly IHttpService _httpClient;
-
- public OrganizationService(IHttpService httpClient)
- {
- _httpClient = httpClient;
-
- }
- public async Task<Department> SaveDept(Department dept)
- {
- var data = await _httpClient.Post<Department>($"Organization/SaveDept",dept);
- return data;
- }
- public async Task<List<Department>> GetDepartments()
- {
- var data = await _httpClient.Get<List<Department>>($"Organization/GetDepartments");
- return data;
- }
- public async Task<bool> DeleteDept(int deptId)
- {
- var ret = await _httpClient.Get<bool>($"Organization/DeleteDept?Id={deptId}");
- return ret;
-
- }
- }
- }
|