Example #1
0
        private async Task SaveDipInput()
        {
            var dipInputs = new List <DipInput>(
                (from d in DipInputList
                 select new DipInput
            {
                DipValue = d.DipValue,
                Grade = d.Grade,
                GradeId = d.GradeId,
                TankId = d.TankId
            }).ToList());

            var response = await _dipInputBusinessLogic.SaveDipInput(dipInputs);

            DipInputTimer.Interval = new TimeSpan(0, 0, (int)(CacheBusinessLogic
                                                              .DipInputTime.AddDays(1) - DateTime.Now).TotalSeconds);
            DipInputTimer.Start();
        }
Example #2
0
        private void InitializeCommands()
        {
            GetDipInputCommand   = new RelayCommand(() => PerformAction(GetDipInput));
            SaveDipInputCommand  = new RelayCommand(() => PerformAction(SaveDipInput));
            PrintDipInputCommand = new RelayCommand(() => PerformAction(PrintDipInput));
            BackDipInputCommand  = new RelayCommand(() =>
            {
                NavigateService.Instance.NavigateToHome();
                DipInputTimer.Start();
                MessengerInstance.Send <EnableFuelOptionButtonMessage>(new EnableFuelOptionButtonMessage
                {
                    EnableFuelOptionButton = true
                });
            });

            EnterPressedOnValueCommand = new RelayCommand(() =>
            {
                SelectedDipModel = null;
            });
        }