This commit is contained in:
mmrbnjd
2024-06-16 16:15:56 +03:30
parent 376da0e7d0
commit 28424214ed
6 changed files with 56 additions and 11 deletions

View File

@@ -12,6 +12,7 @@ namespace Front
private List<CODIdName<int>>? Cods = null;
private CompanyDTO? InfoCompany = null;
public InvoiceDTO? invoice { get; set; }=null;
private DashBoardDTO? dashBoard { get; set; } = null;
public Fixedvalues(HttpClientController hc)
{
_hc = hc;
@@ -73,5 +74,20 @@ namespace Front
return InfoCompany;
}
public async Task<DashBoardDTO?> GetDashBoard()
{
if (dashBoard == null)
{
var rsp = await _hc.Get("User/GetDashBoard");
if (rsp.IsSuccessStatusCode)
{
dashBoard = await rsp.Content.ReadFromJsonAsync<DashBoardDTO>();
}
}
return dashBoard;
}
}
}