void Search()
        {
            CreateWaitDialog("正在查询....", "请稍等");

            string group             = cb薪资组.EditValue as string;
            List <EmployeeInfo> list = new List <EmployeeInfo>();
            List <EmployeeInfo> employeeInfoSearch = EmployeeInfo.Search(searchKey.Text.Trim(), chk仅显示在职员工.Checked);

            if (string.IsNullOrEmpty(group) == false)
            {
                employeeInfoSearch = employeeInfoSearch.FindAll(a => a.薪资组 == group || a.个月薪资组 == group);
            }
            foreach (EmployeeInfo emp in employeeInfoSearch)
            {
                if (AccessController.CheckPayGroup(emp.薪资组) || AccessController.CheckPayGroup(emp.个月薪资组))
                {
                    list.Add(emp);
                }
            }
            list = list.OrderBy(a => a.员工序号).ToList();
            gridControl1.DataSource = list;
            gridView1.ExpandAllGroups();

            CloseWaitDialog();
        }
Beispiel #2
0
        void LoadData()
        {
            list.Clear();

            List <EmployeeInfo> employeeInfoSearch = EmployeeInfo.Search(null);

            foreach (EmployeeInfo emp in employeeInfoSearch)
            {
                if (AccessController.CheckPayGroup(emp.薪资组))
                {
                    list.Add(new EmployeePayData(emp, DateTime.Today, true));
                }
            }
            list = list.OrderBy(a => a.员工序号).ToList();
        }