Ejemplo n.º 1
0
        /// <summary>
        /// 学员管理里面的提交查询按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSelectBySIN_Click(object sender, RoutedEventArgs e)
        {
            //btnSelectBySIN某个单个id或姓式查询的button名字
            smclassCmb.SelectedIndex = -1;
            string             str     = mstxtIdorName.Text.Trim();
            List <StudentsExt> liststu = sm.GetStudentsIdorName(str);

            if (liststu.Count <= 0)
            {
                MessageBox.Show("根据条件没查询到", "提示!");
                return;
            }
            students = liststu;
            //点击先清空路径里面的内容
            smDgStudentLsit.ItemsSource = null;
            //在从新查找
            smDgStudentLsit.ItemsSource = students;
        }