예제 #1
0
        /// <summary>
        /// Eduardo Colon
        /// Created: 2019/01/27
        ///
        /// method to open the create employee roles.
        /// </summary>
        private void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            var detailForm = new CreateEmployeeRole();

            var result = detailForm.ShowDialog();// need to be added



            if (result == true)
            {
                MessageBox.Show(result.ToString());
            }
            refreshRoles();
        }
예제 #2
0
        /// <summary>
        /// Eduardo Colon
        /// Created: 2019/01/27
        ///
        /// //method to update an employee role
        /// </summary>
        private void BtnUpdate_Click(object sender, RoutedEventArgs e)
        {
            if (dgRole.SelectedItem != null)
            {
                _selectedRole = (Role)dgRole.SelectedItem;


                var assign = new CreateEmployeeRole(_selectedRole);
                assign.ShowDialog();
            }
            else
            {
                MessageBox.Show("You must select an item first");
            }
            refreshRoles();
        }