31 lines
838 B
C#
31 lines
838 B
C#
using Microsoft.AspNetCore.Components;
|
|
using MudBlazor;
|
|
using ReportingServices.Blazor.Services;
|
|
|
|
namespace ReportingServices.Blazor.Components;
|
|
|
|
public partial class DatePickerModal
|
|
{
|
|
DateTime? StartDate { get; set; } = DateTime.Now.Date;
|
|
DateTime? EndDate { get; set; } = DateTime.Now.Date;
|
|
|
|
[Inject]
|
|
public AppData? ApplicationState { get; set; }
|
|
|
|
[Inject]
|
|
public NavigationManager? NavigationManager { get; set; }
|
|
|
|
[CascadingParameter] MudDialogInstance? MudDialog { get; set; }
|
|
|
|
void Submit()
|
|
{
|
|
ApplicationState!.StartDate = (DateTime)StartDate!;
|
|
ApplicationState.EndDate = (DateTime)EndDate!;
|
|
|
|
MudDialog!.Close(DialogResult.Ok(true));
|
|
|
|
NavigationManager!.NavigateTo("/PlanningReports/WeeklyPartChangesReport");
|
|
}
|
|
void Cancel() => MudDialog!.Cancel();
|
|
}
|