diff --git a/salesbook.Maui/Core/Services/ManageDataService.cs b/salesbook.Maui/Core/Services/ManageDataService.cs index 75e325d..103bbb2 100644 --- a/salesbook.Maui/Core/Services/ManageDataService.cs +++ b/salesbook.Maui/Core/Services/ManageDataService.cs @@ -179,9 +179,9 @@ public class ManageDataService( activities = await localDb.Get(x => (whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) || - (whereCond.Start != null && whereCond.End != null && x.EffectiveDate == null && - x.EstimatedDate >= whereCond.Start && x.EstimatedDate <= whereCond.End) || - (x.EffectiveDate >= whereCond.Start && x.EffectiveDate <= whereCond.End) || + (whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null && + x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) || + (x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) || (whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null)) ); @@ -223,9 +223,9 @@ public class ManageDataService( { activities = await localDb.Get(x => (whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) || - (whereCond.Start != null && whereCond.End != null && x.EffectiveDate == null && - x.EstimatedDate >= whereCond.Start && x.EstimatedDate <= whereCond.End) || - (x.EffectiveDate >= whereCond.Start && x.EffectiveDate <= whereCond.End) || + (whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null && + x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) || + (x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) || (whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null)) ); } @@ -309,19 +309,28 @@ public class ManageDataService( { return Task.Run(async () => { - if (response.AnagClie != null) + try { - await localDb.InsertOrUpdate(response.AnagClie); + if (response.AnagClie != null) + { + await localDb.InsertOrUpdate(response.AnagClie); - if (response.VtbDest != null) await localDb.InsertOrUpdate(response.VtbDest); - if (response.VtbCliePersRif != null) await localDb.InsertOrUpdate(response.VtbCliePersRif); + if (response.VtbDest != null) await localDb.InsertOrUpdate(response.VtbDest); + if (response.VtbCliePersRif != null) await localDb.InsertOrUpdate(response.VtbCliePersRif); + } + + if (response.PtbPros != null) + { + await localDb.InsertOrUpdate(response.PtbPros); + + if (response.PtbProsRif != null) await localDb.InsertOrUpdate(response.PtbProsRif); + } } - - if (response.PtbPros != null) + catch (Exception e) { - await localDb.InsertOrUpdate(response.PtbPros); - - if (response.PtbProsRif != null) await localDb.InsertOrUpdate(response.PtbProsRif); + Console.WriteLine(e.Message); + SentrySdk.CaptureException(e); + throw; } }); } diff --git a/salesbook.Maui/salesbook.Maui.csproj b/salesbook.Maui/salesbook.Maui.csproj index 40a8691..4b8df4f 100644 --- a/salesbook.Maui/salesbook.Maui.csproj +++ b/salesbook.Maui/salesbook.Maui.csproj @@ -29,8 +29,8 @@ it.integry.salesbook - 2.0.2 - 9 + 2.0.3 + 10 14.2