• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Searcher.EmployeeSearcher类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NFramework.DBTool.Test.Searcher.EmployeeSearcher的典型用法代码示例。如果您正苦于以下问题:C# EmployeeSearcher类的具体用法?C# EmployeeSearcher怎么用?C# EmployeeSearcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EmployeeSearcher类属于NFramework.DBTool.Test.Searcher命名空间,在下文中一共展示了EmployeeSearcher类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FindList

 /// <summary>
 /// 查找指定条件的员工集合
 /// </summary>
 /// <param name="employeeSearcher">员工查询对象</param>
 /// <returns>返回员工实体对象集合</returns>
 public IList<Employee> FindList(EmployeeSearcher employeeSearcher)
 {
     PageList<Employee> pageList = this.FindList(employeeSearcher, null, null);
     return pageList == null ? null : pageList.RecordList;
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:10,代码来源:EmployeeDal.cs


示例2: FindEmployeeByNotLikeConditionStringTest

 public void FindEmployeeByNotLikeConditionStringTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     // 这句应该写入Dal进行控制,这里用于测试
     empSearcher.Name.ConditionString = "LOWER(" + SQLPlaceholder.ColName + ")";
     empSearcher.Name.NotLike("emp");
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     int allCount = 0;
     Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:10,代码来源:QueryTest.cs


示例3: FindEmployeeBySingleSortTest

 public void FindEmployeeBySingleSortTest()
 {
     EmployeeSearcher employeeSearcher = new EmployeeSearcher();
     employeeSearcher.Rand.SortOrder = SortOrder.Desc;
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(employeeSearcher);
     Assert.IsTrue(employeeList[0].Rand >= employeeList[1].Rand);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:7,代码来源:QueryTest.cs


示例4: FindEmployeeByNotInColumnTest

 public void FindEmployeeByNotInColumnTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     empSearcher.JoinDate.NotIn(new SearchColumn[] { empSearcher.StartWorkDate });
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     bool isSucc = employeeList == null ? false : (employeeList.Count >= 1 ? true : false);
     Assert.AreEqual(true, isSucc);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:8,代码来源:QueryTest.cs


示例5: FindEmployeeByNotInTest

 public void FindEmployeeByNotInTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     empSearcher.EmployeeCode.NotIn(QueryTest.EmployeeCodeList.ToArray());
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     int allCount = 770;
     Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:8,代码来源:QueryTest.cs


示例6: FindEmployeeByMultipleSortStringTest

 public void FindEmployeeByMultipleSortStringTest()
 {
     EmployeeSearcher employeeSearcher = new EmployeeSearcher();
     // 这句应该写入Dal进行控制,这里用于测试
     employeeSearcher.EmployeeCode.SortString = "SUBSTRING(" + SQLPlaceholder.ColName + ", 1, 6)";
     employeeSearcher.EmployeeCode.SortOrder = SortOrder.Desc;
     employeeSearcher.EmployeeCode.SortIndex = 1;
     employeeSearcher.Rand.SortOrder = SortOrder.Desc;
     employeeSearcher.Rand.SortIndex = 2;
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(employeeSearcher);
     Assert.IsTrue(employeeList[0].CompanyId.Equals(employeeList[1].CompanyId));
     Assert.IsTrue(employeeList[0].Rand >= employeeList[1].Rand);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:13,代码来源:QueryTest.cs


示例7: FindEmployeeByNotEqualConditionStringTest

 public void FindEmployeeByNotEqualConditionStringTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     // 这句应该写入Dal进行控制,这里用于测试
     empSearcher.Birthday.ConditionString = "MONTH(" + SQLPlaceholder.ColName + ")";
     empSearcher.Birthday.NotEqual(10);
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     int allCount = 779;
     Assert.AreEqual(allCount, 779);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:10,代码来源:QueryTest.cs


示例8: FindEmployeeByConditionGroupTest2

        public void FindEmployeeByConditionGroupTest2()
        {
            EmployeeSearcher employeeSearcher = new EmployeeSearcher();
            employeeSearcher.CurrCompany = new CompanySearcher();

            Group.And(Group.Or(employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[4]), employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[5]),
                               Group.Or(employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[0]), employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[1])),
                               Group.Or(employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[2]), employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[3]))),
                      Group.Or(employeeSearcher.CurrCompany.CompanyCode.Equal("10201"), employeeSearcher.CurrCompany.CompanyCode.Equal("10301"),
                               Group.Or(employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[6]), employeeSearcher.EmployeeCode.Equal(QueryTest.EmployeeCodeList[7]))));

            IList<Employee> employeeList = OrgHandler.FindEmployeeList(employeeSearcher);
            int allCount = 6;
            Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
        }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:15,代码来源:QueryTest.cs


示例9: FindEmployeeBySQLNotInTest

 public void FindEmployeeBySQLNotInTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     // SQL应该写入Dal进行控制,这里用于测试
     StringBuilder subQuery = new StringBuilder();
     subQuery.Append("SELECT ");
     subQuery.Append("  DSub.DepartmentId ");
     subQuery.Append("FROM ");
     subQuery.Append("  Department DSub ");
     subQuery.Append("WHERE ");
     subQuery.Append("  DSub.CurrCompany.CompanyCode = '10401' ");
     empSearcher.CurrDepartment = new DepartmentSearcher();
     empSearcher.CurrDepartment.DepartmentId.SQLNotIn(subQuery.ToString());
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     int allCount = 624;
     Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:17,代码来源:QueryTest.cs


示例10: FindSingle

 /// <summary>
 /// 查找指定ID的员工
 /// </summary>
 /// <param name="employeeId">员工ID</param>
 /// <param name="tran">中间事务对象</param>
 /// <returns>返回员工实体对象</returns>
 public Employee FindSingle(string employeeId, ICTransaction tran)
 {
     EmployeeSearcher employeeSearcher = new EmployeeSearcher();
     employeeSearcher.EmployeeId.Equal(employeeId);
     IList<Employee> employeeList = this.FindList(employeeSearcher);
     return (employeeList == null || employeeList.Count == 0) ? null : employeeList[0];
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:13,代码来源:EmployeeDal.cs


示例11: FindEmployeeBySQLNotInConditionStringTest

 public void FindEmployeeBySQLNotInConditionStringTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     // SQL应该写入Dal进行控制,这里用于测试
     StringBuilder subQuery = new StringBuilder();
     subQuery.Append("SELECT ");
     subQuery.Append("  DSub.DepartmentId ");
     subQuery.Append("FROM ");
     subQuery.Append("  Department DSub ");
     subQuery.Append("LEFT JOIN ");
     subQuery.Append("  Company CSub ON(CSub.CompanyId=DSub.CompanyId) ");
     subQuery.Append("WHERE ");
     subQuery.Append("  CSub.CompanyCode = '10401' ");
     empSearcher.CurrDepartment = new DepartmentSearcher();
     empSearcher.CurrDepartment.DepartmentId.ConditionString = "LOWER(" + SQLPlaceholder.ColName + ")";
     empSearcher.CurrDepartment.DepartmentId.SQLNotIn(subQuery.ToString());
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     int allCount = 624;
     Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:20,代码来源:QueryTest.cs


示例12: FindEmployeeByLessThanTest

 public void FindEmployeeByLessThanTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     empSearcher.Rand.LessThan(15);
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     int allCount = 750;
     Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:8,代码来源:QueryTest.cs


示例13: FindEmployeeForPagerTest

 public void FindEmployeeForPagerTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     empSearcher.CurrPosition = new PositionSearcher();
     empSearcher.CurrPosition.PositionCode.Equal("3102010003");
     Pager pager = new Pager();
     pager.CurrentPage = 2;
     pager.PageSize = 15;
     PageList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher, pager);
     int pageCount = 15;
     int allCount = 30;
     Assert.AreEqual(pageCount, employeeList.RecordList.Count);
     Assert.AreEqual(allCount, employeeList.TotalCount);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:14,代码来源:QueryTest.cs


示例14: FindEmployeeByLikeTest

        public void FindEmployeeByLikeTest()
        {
            EmployeeSearcher empSearcher = new EmployeeSearcher();
            empSearcher.Name.Like("Emp");
            IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
            int allCount = 780;
            Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);

            empSearcher = new EmployeeSearcher();
            empSearcher.EmployeeCode.Like("510201");
            employeeList = OrgHandler.FindEmployeeList(empSearcher);
            allCount = 156;
            Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
        }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:14,代码来源:QueryTest.cs


示例15: AddDataTest

        public void AddDataTest()
        {
            #region Clear All Data

            OrgHandler.DeleteEmployee(new EmployeeSearcher());
            OrgHandler.DeletePosition(new PositionSearcher());
            OrgHandler.DeleteDepartment(new DepartmentSearcher());
            OrgHandler.DeleteCompany(new CompanySearcher());

            #endregion

            string companyName = " Com. Ltd.";
            Company company = null;
            Department department = null;
            Position position = null;
            Employee employee = null;
            int depCode = 1;
            int posCode = 1;
            int empCode = 1;
            int empCount = 30;
            Random rand = new Random(DateTime.Now.Hour);

            string[][] companyNamePool = new string[][] {
                new string[]{"ABC","10201"},
                new string[]{"DEF","10301"},
                new string[]{"GHI","10202"},
                new string[]{"JKL","10203"},
                new string[]{"MNO","10401"}
            };

            string[] departmentNamePool = new string[]{
                "GM",
                "Finance",
                "HR",
                "Sales",
                "Marketing",
                "Executive"
            };

            string[] positionNamePool = new string[] {
                "GM",
                "Specialist"
            };

            long allEmpCount = 780;

            foreach (string[] cName in companyNamePool)
            {
                company = new Company();
                company.Name = cName[0] + companyName;
                company.CompanyCode = cName[1];
                company.CreaterId = "00000000000";
                company.UpdatorId = "00000000000";
                company.RVersion = 1;
                company.Status = 1;
                OrgHandler.AddCompany(company);
                depCode = 1;
                empCode = 1;
                posCode = 1;

                foreach (string dName in departmentNamePool)
                {
                    department = new Department();
                    department.CurrCompany = company;
                    department.Name = dName;
                    department.DepartmentCode = "2" + company.CompanyCode + string.Format("{0:0000}", depCode);
                    department.CreaterId = "00000000000";
                    department.UpdatorId = "00000000000";
                    department.RVersion = 1;
                    department.Status = 1;
                    OrgHandler.AddDepartment(department);

                    foreach (string pName in positionNamePool)
                    {
                        position = new Position();
                        position.CurrCompany = company;
                        position.CurrDepartment = department;
                        position.PositionCode = "3" + company.CompanyCode + string.Format("{0:0000}", posCode);
                        position.CreaterId = "00000000000";
                        position.UpdatorId = "00000000000";
                        position.RVersion = 1;
                        position.Status = 1;

                        if (pName.Equals("GM"))
                        {
                            if (dName.Equals("GM"))
                            {
                                position.Name = pName;
                            }
                            else
                            {
                                position.Name = dName + " " + pName;
                            }

                            empCount = 1;
                        }
                        else
                        {
                            position.Name = dName + " " + pName;

//.........这里部分代码省略.........
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:101,代码来源:QueryTest.cs


示例16: FindEmployeeByMultipleSortTest

 public void FindEmployeeByMultipleSortTest()
 {
     EmployeeSearcher employeeSearcher = new EmployeeSearcher();
     employeeSearcher.CurrCompany = new CompanySearcher();
     employeeSearcher.CurrCompany.CompanyCode.SortOrder = SortOrder.Desc;
     employeeSearcher.CurrCompany.CompanyCode.SortIndex = 1;
     employeeSearcher.Rand.SortOrder = SortOrder.Desc;
     employeeSearcher.Rand.SortIndex = 2;
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(employeeSearcher);
     Assert.IsTrue(employeeList[0].CurrCompany.CompanyCode.Equals(employeeList[1].CurrCompany.CompanyCode));
     Assert.IsTrue(employeeList[0].Rand >= employeeList[1].Rand);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:12,代码来源:QueryTest.cs


示例17: DeleteDataByConditionTest

        public void DeleteDataByConditionTest()
        {
            EmployeeSearcher employeeSearcher = new EmployeeSearcher();
            employeeSearcher.CurrCompany = new CompanySearcher();
            employeeSearcher.CurrCompany.CompanyCode.Equal("10401");
            OrgHandler.DeleteEmployee(employeeSearcher);

            long count = OrgHandler.CountEmployee(employeeSearcher);
            Assert.AreEqual(0, count);
        }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:10,代码来源:QueryTest.cs


示例18: FindEmployeeByNotEqualTest

 public void FindEmployeeByNotEqualTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     empSearcher.CurrPosition = new PositionSearcher();
     empSearcher.CurrPosition.PositionCode.NotEqual("3102010003");
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     int allCount = 750;
     Assert.AreEqual(allCount, employeeList == null ? 0 : employeeList.Count);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:9,代码来源:QueryTest.cs


示例19: FindEmployeeByBetweenColumnTest

 public void FindEmployeeByBetweenColumnTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     empSearcher.JoinDate.Between(empSearcher.StartWorkDate, empSearcher.CreateTime);
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     bool isSucc = employeeList == null ? false : (employeeList.Count >= 1 && employeeList.Count <= 780 ? true : false);
     Assert.AreEqual(true, isSucc);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:8,代码来源:QueryTest.cs


示例20: FindEmployeeByNotInConditionStringTest

 public void FindEmployeeByNotInConditionStringTest()
 {
     EmployeeSearcher empSearcher = new EmployeeSearcher();
     // 这句应该写入Dal进行控制,这里用于测试
     empSearcher.EmployeeCode.ConditionString = "LOWER(" + SQLPlaceholder.ColName + ")";
     empSearcher.EmployeeCode.NotIn(QueryTest.EmployeeCodeList.ToArray());
     IList<Employee> employeeList = OrgHandler.FindEmployeeList(empSearcher);
     Assert.AreEqual(770, employeeList == null ? 0 : employeeList.Count);
 }
开发者ID:pmsun-bruce,项目名称:DBTool,代码行数:9,代码来源:QueryTest.cs



注:本文中的NFramework.DBTool.Test.Searcher.EmployeeSearcher类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Mathematical.Vector2D类代码示例发布时间:2022-05-26
下一篇:
C# NFrame.NFGUID类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap