Пример #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");
        }
Пример #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");
        }