コード例 #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
ファイル: CarValue.aspx.cs プロジェクト: luochangli/AOPinNET
        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");
        }
コード例 #3
0
 public decimal GetValue(CarValueArgs args)
 {
     Thread.Sleep(5000);
     return(_rand.Next(10000, 20000));
 }
コード例 #4
0
 public decimal GetValue(CarValueArgs args)
 {
     Thread.Sleep(5000);
     return _rand.Next(10000, 20000);
 }