Exemple #1
0
        public void CopyValuesToFuelRefilling(FuelRefilling fuelRefilling)
        {
            fuelRefilling.OperatorName = operatorTextBox.Text;
            DateTimeOffset timeOffet = new DateTimeOffset(datePicker.SelectedDate ?? DateTime.Now);

            fuelRefilling.Date         = timeOffet.ToUnixTimeSeconds();
            fuelRefilling.Fuel_type_id = (int)fuelComboBox.SelectedValue;
            fuelRefilling.Volume       = (double)volumeSpinBox.Value;
            fuelRefilling.Price        = GetPrice();
        }
Exemple #2
0
        public void CopyValuesFromFuelRefilling(FuelRefilling fuelRefilling)
        {
            operatorTextBox.Text = fuelRefilling.OperatorName;
            DateTimeOffset timeOffet = DateTimeOffset.FromUnixTimeSeconds(fuelRefilling.Date);

            datePicker.SelectedDate    = timeOffet.UtcDateTime;
            fuelComboBox.SelectedValue = fuelRefilling.Fuel_type_id;
            volumeSpinBox.Value        = (decimal)fuelRefilling.Volume;
            priceSpinBox.Value         = (decimal)fuelRefilling.Price;
        }