Example #1
0
        private void onShowButtonClick(object sender, RoutedEventArgs e)
        {
            ShowPersonList showPersonList = new ShowPersonList();

            showPersonList.Show();
            Close();
        }
Example #2
0
        public void onShowAllButtonClick(object sender, RoutedEventArgs e)
        {
            var person = new PersonEntity
            {
                FirstName = FirstName.Text,
                LastName  = LastName.Text
            };

            double salary = 500;

            try
            {
                salary = double.Parse(Salary.Text);
            }
            catch (FormatException exep)
            {
                Console.WriteLine(exep.Message);
            }
            person.Salary = salary;

            int workExperience = 0;

            try
            {
                workExperience = Int32.Parse(WorkExperience.Text);
            }
            catch (FormatException exep)
            {
                Console.WriteLine(exep.Message);
            }
            person.WorkExperience = workExperience;

            App.ListPerson.Add(person);

            ShowPersonList showWindow = new ShowPersonList();

            showWindow.Show();
            Close();
        }
Example #3
0
        private void onSaveButtonClick(object sender, RoutedEventArgs e)
        {
            _person.LastName  = LastName.Text;
            _person.FirstName = FirstName.Text;


            double salary = 500;

            try
            {
                salary = double.Parse(Salary.Text);
            }
            catch (FormatException exception)
            {
                Console.WriteLine(exception.Message);
            }

            _person.Salary = salary;

            var workExperience = 0;

            try
            {
                workExperience = int.Parse(WorkExperience.Text);
            }
            catch (FormatException exception)
            {
                Console.WriteLine(exception.Message);
            }

            _person.WorkExperience = workExperience;

            var showWindow = new ShowPersonList();

            showWindow.Show();
            Close();
        }