Completato form attività e filtri

This commit is contained in:
2025-06-16 11:58:49 +02:00
parent 0032648e76
commit 7ca4de628b
44 changed files with 1241 additions and 924 deletions

View File

@@ -9,25 +9,7 @@ namespace Template.Maui.Core.Services;
public class ManageDataService(LocalDbService localDb, IMapper mapper) : IManageDataService
{
public Task<List<AnagClie>> GetAnagClie(Expression<Func<AnagClie, bool>>? whereCond = null) =>
localDb.Get(whereCond);
public Task<List<JtbComt>> GetJtbComt(Expression<Func<JtbComt, bool>>? whereCond = null) =>
localDb.Get(whereCond);
public Task<List<PtbPros>> GetPtbPros(Expression<Func<PtbPros, bool>>? whereCond = null) =>
localDb.Get(whereCond);
public Task<List<PtbProsRif>> GetPtbProsRif(Expression<Func<PtbProsRif, bool>>? whereCond = null) =>
localDb.Get(whereCond);
public Task<List<StbActivity>> GetStbActivity(Expression<Func<StbActivity, bool>>? whereCond = null) =>
localDb.Get(whereCond);
public Task<List<VtbCliePersRif>> GetVtbCliePersRif(Expression<Func<VtbCliePersRif, bool>>? whereCond = null) =>
localDb.Get(whereCond);
public Task<List<VtbDest>> GetVtbDest(Expression<Func<VtbDest, bool>>? whereCond = null) =>
public Task<List<T>> GetTable<T>(Expression<Func<T, bool>>? whereCond = null) where T : new() =>
localDb.Get(whereCond);
public async Task<List<ActivityDTO>> GetActivity(Expression<Func<StbActivity, bool>>? whereCond = null)
@@ -70,7 +52,8 @@ public class ManageDataService(LocalDbService localDb, IMapper mapper) : IManage
{
string? ragSoc;
if (distinctClient.TryGetValue(activity.CodAnag, out ragSoc) || distinctProspect.TryGetValue(activity.CodAnag, out ragSoc))
if (distinctClient.TryGetValue(activity.CodAnag, out ragSoc) ||
distinctProspect.TryGetValue(activity.CodAnag, out ragSoc))
{
dto.Cliente = ragSoc;
}
@@ -86,6 +69,9 @@ public class ManageDataService(LocalDbService localDb, IMapper mapper) : IManage
return returnDto;
}
public Task InsertOrUpdate<T>(T objectToSave) =>
localDb.InsertOrUpdate<T>([objectToSave]);
public Task ClearDb() =>
localDb.ResetDb();
}