示例#1
0
        /// <summary>
        /// 查询记录
        /// </summary>
        private void BtnSearch_Click(object sender)
        {
            ObservableCollection <Department> source = new DepartmentBIZ().SelectAll();
            var pagedSource = new QueryableCollectionView(source);

            View.DGSelect.ItemsSource   = pagedSource;
            View.searchDataPager.Source = pagedSource;
            View.DGSelect.SelectedItems.Remove(View.DGSelect.SelectedItem);//取消首行选中
        }
示例#2
0
        /// <summary>
        /// 岗位
        /// </summary>
        private void LoadcmbJob()
        {
            var collection = new DepartmentBIZ().Select(" and IsJob = 1");

            if (collection.Count > 0)
            {
                View.cmbJob.ItemsSource       = collection;
                View.cmbJob.DisplayMemberPath = "Name"; //DisplayMemberPath显示项
                View.cmbJob.SelectedValuePath = "Code"; //SelectedValuePath绑值项
                //view.cmbType.SelectedItem = view.cmbType.Items[0];
            }
            else
            {
                UIHelper.ShowMessageBox("数据获取错误!", false);
            }
        }
示例#3
0
 /// <summary>
 /// 加载部门联动岗位
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbDepartment_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (cmbDepartment.SelectedValue != null)
     {
         var collection = new DepartmentBIZ().Select(" and UplevelCode = " + cmbDepartment.SelectedValue);
         if (collection.Count > 0)
         {
             cmbJob.ItemsSource       = collection;
             cmbJob.DisplayMemberPath = "Name"; //DisplayMemberPath显示项
             cmbJob.SelectedValuePath = "Code"; //SelectedValuePath绑值项
             //view.cmbType.SelectedItem = view.cmbType.Items[0];
         }
         else
         {
             UIHelper.ShowMessageBox("数据获取错误!", false);
         }
     }
 }