Esempio n. 1
0
        void getValueButton_Click(object sender, EventArgs e)
        {
            var makeId = int.Parse(makeDropDown.SelectedValue);
            var year = int.Parse(yearDropDown.SelectedValue);
            var conditionId = int.Parse(conditionDropDown.SelectedValue);

            var args = new CarValueArgs
            {
                MakeId = int.Parse(makeDropDown.SelectedValue),
                Year = int.Parse(yearDropDown.SelectedValue),
                ConditionId = int.Parse(conditionDropDown.SelectedValue)
            };

            var carValueService = new CarValueService();
            //var carValue = carValueService.GetValue(makeId, conditionId, year);
            var carValue = carValueService.GetValue(args);
            valueLiteral.Text = carValue.ToString("c");
        }
Esempio n. 2
0
        void getValueButton_Click(object sender, EventArgs e)
        {
            var makeId      = int.Parse(makeDropDown.SelectedValue);
            var year        = int.Parse(yearDropDown.SelectedValue);
            var conditionId = int.Parse(conditionDropDown.SelectedValue);

            var args = new CarValueArgs
            {
                MakeId      = int.Parse(makeDropDown.SelectedValue),
                Year        = int.Parse(yearDropDown.SelectedValue),
                ConditionId = int.Parse(conditionDropDown.SelectedValue)
            };

            var carValueService = new CarValueService();
            //var carValue = carValueService.GetValue(makeId, conditionId, year);
            var carValue = carValueService.GetValue(args);

            valueLiteral.Text = carValue.ToString("c");
        }
Esempio n. 3
0
 public decimal GetValue(CarValueArgs args)
 {
     Thread.Sleep(5000);
     return(_rand.Next(10000, 20000));
 }
Esempio n. 4
0
 public decimal GetValue(CarValueArgs args)
 {
     Thread.Sleep(5000);
     return _rand.Next(10000, 20000);
 }