Gestito aggiornamento elenco contatti in caso di aggiunta o modifica del prospect / cliente
This commit is contained in:
@@ -28,6 +28,22 @@ public class ManageDataService(LocalDbService localDb, IMapper mapper) : IManage
|
||||
return contactMapper;
|
||||
}
|
||||
|
||||
public async Task<ContactDTO?> GetSpecificContact(string codAnag, bool isContact)
|
||||
{
|
||||
if (isContact)
|
||||
{
|
||||
var contact = (await localDb.Get<AnagClie>(x => x.CodAnag != null && x.CodAnag.Equals(codAnag))).LastOrDefault();
|
||||
|
||||
return contact == null ? null : mapper.Map<ContactDTO>(contact);
|
||||
}
|
||||
else
|
||||
{
|
||||
var contact = (await localDb.Get<PtbPros>(x => x.CodPpro != null && x.CodPpro.Equals(codAnag))).LastOrDefault();
|
||||
|
||||
return contact == null ? null : mapper.Map<ContactDTO>(contact);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<ActivityDTO>> GetActivity(Expression<Func<StbActivity, bool>>? whereCond = null)
|
||||
{
|
||||
var activities = await localDb.Get(whereCond);
|
||||
|
||||
Reference in New Issue
Block a user