コード例 #1
0
 public TijdBerekenModuleViewModel(UnitOfWork ctx)
     : base(ctx)
 {
     Init();
     CurrentParameters = new Parameters();
     CurrentStrings = new Strings();
     LoadData();
 }
コード例 #2
0
        public ParameterBeheerViewModel(UnitOfWork ctx)
            : base(ctx)
        {
            Header = "Parameterbeheer";
            ParameterData = new Parameters();
            StringsData = new Strings();
            BegroetingPrintData = new BegroetingPrint();

            WinkelData = new WinkelTypeViewModel(Ctx);
            SchoolData = new SchoolTypeViewModel(Ctx);
            BedrijfData = new BedrijfTypeViewModel(Ctx);
            OphalingData = new OphalingBeheerViewModel(Ctx);

            #region Buttons
            SaveParametersCommand = new RelayCommand(
                () => SaveParameters(),
                () => true
            );

            RefreshParametersCommand = new RelayCommand(
                () => LoadParameters(),
                () => true
            );

            SaveStringsCommand = new RelayCommand(
                () => SaveStrings(),
                () => true
            );

            RefreshStringsCommand = new RelayCommand(
                () => LoadStrings(),
                () => true
            );

            SaveBegroetingCommand = new RelayCommand(SaveBegroetingPrint);
            RefreshBegroetingCommand = new RelayCommand(LoadBegroetingPrint);
            BackupDatabaseCommand = new RelayCommand(BackupDatabase);
            RestoreDatabaseCommand = new RelayCommand(RestoreDatabase);
            #endregion
        }
コード例 #3
0
        public override void Cancel()
        {
            //Reset the changes we made
            Ctx.TijdPrestaties.Refresh();
            Ctx.Klanten.Refresh();

            ////Legacy code (before Repository pattern)
            ////Maybe I need it back one day
            //using (var context = new ISIS_DataEntities())
            //{
            //    context.Entry(AddPrestatie).Reload();
            //    context.Entry(SelectedKlant).Reload();
            //}

            CurrentParameters = new Parameters();
            Init();
        }
コード例 #4
0
 public void AddParameters(Parameters p)
 {
     ParameterHemden = Convert.ToDecimal(p.ParameterHemden);
     ParameterLakens1 = Convert.ToDecimal(p.ParameterLakens1);
     ParameterLakens2 = Convert.ToDecimal(p.ParameterLakens2);
     ParameterAndereStrijk = p.ParameterAndereStrijk;
 }