private void InputMenuItemFinFeltOpen_Click(object sender, RoutedEventArgs e) { LagOppsettViewModel viewModel = new LagOppsettViewModel(new LagOppsettDataService(),new List<Common.DataModel.Lag>(), -1, DateTime.MinValue); OpenWindow(new LagOppsettView(viewModel), "Data input"); }
public void OnWriteInputbutton_OnClickOn(object sender, RoutedEventArgs routedEventArgs) { if (InputRows.Count == 0) { return; } var spec = new LagGeneratorSpec() { antallHold = this.m_antallHold, antallSkiver = this.m_antallSkiver, antallskyttereilaget = this.m_antallskyttereilaget, avbrekk = this.m_GenererAvbrekk, MinutesEachTeam = this.m_minutesEachTeam, StartLagNr = this.m_startLagNr, StartTime = this.m_startTime, OrionHoldId = this.m_orionHoldId }; var list = m_lagGeneratorService.GenererLag(InputRows.ToList(), spec); DateTime start = new DateTime( DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second); if (this.m_startTime.HasValue) { start = this.m_startTime.Value; } LagOppsettViewModel viewmodel = new LagOppsettViewModel( new LagOppsettDataService(),list, m_minutesEachTeam, start); var view = new LagOppsettView(viewmodel); OpenWindow(view, "Data input"); }
public LagOppsettView(LagOppsettViewModel viewModel) { InitializeComponent(); DataContext = viewModel; viewModel.GridManager = dataGrid; }