using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace HRApplication
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //TODO: 1.声明变量
            decimal salary, actualSalary;
            string name;
            DateTime hireDate;
            decimal taxRate = 0.1M;

            //TODO: 2.指定变量值
            salary = decimal.Parse(txtBaseSalary.Text);
            name = txtName.Text;
            hireDate = DateTime.Parse(txtHireDate.Text);


            //TODO: 3.使用变量
            //实际领取薪资 = 月薪 - 稅額 (月薪 * 稅率)
            actualSalary = salary - (salary * taxRate);
            txtResult.Text = name + "於" + hireDate +
                    "入职, 本月实际领取薪资为" + actualSalary;

        }


    }
}
