public async Task StartNewDayAsync() { try { var meta = await AppUsers.GetCurrentAsync().ConfigureAwait(true); EodProcessing.SuggestDateReload(this.Tenant, meta.OfficeId); } catch (Exception ex) { Log.Warning("Could not start a new day. {Exception}", ex); throw; } }
public async Task <ActionResult> InitializeAsync() { var meta = await AppUsers.GetCurrentAsync().ConfigureAwait(true); try { await EodProcessing.InitializeAsync(this.Tenant, meta).ConfigureAwait(true); return(this.Ok()); } catch (Exception ex) { return(this.Failed(ex.Message, HttpStatusCode.InternalServerError)); } }
public async Task <ActionResult> InitializeAsync() { var meta = await AppUsers.GetCurrentAsync().ConfigureAwait(true); string tenant = this.Tenant; try { await DayEnd.InitializeAsync(tenant, meta.UserId, meta.OfficeId).ConfigureAwait(true); EodProcessing.RevokeLogins(tenant, meta.UserId); return(this.Ok()); } catch (Exception ex) { return(this.Failed(ex.Message, HttpStatusCode.InternalServerError)); } }