Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSearch_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DataTable dtMembers;
                if (cboMemberLevelSearch.Text == "Admin")
                {
                    dtMembers = dbi.AdminFindMembers(-1);
                }
                else
                {
                    dtMembers = dbi.AdminFindMembers(cboMemberLevelSearch.SelectedIndex + 1);
                }


                dgMembers.ItemsSource = dtMembers.DefaultView;
            }
            catch (Exception ex)
            {
                //System.Diagnostics.EventLog.WriteEntry can cause errors if the event type is not there, TODO: find new way to log errors
            }
        }