public TokenService(TokenConfiguration tokenConfiguration, SigningConfiguration signingConfiguration) { _tokenConfiguration = tokenConfiguration; _signingConfiguration = signingConfiguration; InitialDate = DateTime.Now; ExpirationDate = InitialDate.AddDays(_tokenConfiguration.DaysTokenExpiration); }
private void UpdateInitialDateData(DateTime initialDate) { // Make a request from [initialDate, InitialDate[: MakeRequest(BasePath, Action, initialDate, InitialDate.AddDays(-1)); // Updating InitialDate: InitialDate = initialDate; }
protected void BtnSearchClick(object sender, EventArgs e) { if (!dtFecha.SelectedDate.HasValue) { return; } InitialDate = SecurityExtensions.ToDataBaseDateTime(dtFecha.SelectedDate.Value); FinalDate = InitialDate.AddDays(1); Empresa = cbEmpresa.Selected; Linea = cbLinea.Selected; Transportista = cbTransportista.Selected; Departamento = cbDepartamento.Selected; CentroDeCosto = cbCentroDeCostos.Selected; SubCentroDeCosto = cbSubCentroDeCostos.Selected; Vehiculos = cbVehiculo.SelectedValues; SearchPositions(); }
/// <summary> /// Searchs for positions. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSearch_Click(object sender, EventArgs e) { Distrito = ddlDistrito.Selected; Location = ddlPlanta.Selected; Mobile = ddlMovil.Selected; InitialDate = dtDesde.SelectedDate.HasValue ? dtDesde.SelectedDate.Value.ToDataBaseDateTime(): DateTime.UtcNow.ToDataBaseDateTime(); FinalDate = dtHasta.SelectedDate.HasValue ? dtHasta.SelectedDate.Value.ToDataBaseDateTime() : InitialDate.AddDays(1); MessageType = ddlTipo.Selected; MessagesIds = lbMessages.SelectedStringValues; SearchPositions(); GetMessages(); }