Example #1
0
    private void GetResumeList()
    {
        decimal JobTypeId       = ReDecimal("JobTypeId", 0);
        decimal WorkYearId      = ReDecimal("WorkYearId", 0);
        decimal JobPayId        = ReDecimal("JobPayId", 0);
        decimal TownId          = ReDecimal("TownId", 0);
        decimal SchoolExpId     = ReDecimal("SchoolExpId", 0);
        decimal ParentJobTypeId = ReDecimal("ParentJobTypeId", 0);

        string inputStr = ReStr("inputStr", "");

        int  PageInt = ReInt("PageInt", 40);
        bool Invalid = ReBool("Invalid", false);

        int           currentPage = ReInt("currentPage");
        StringBuilder s           = new StringBuilder();

        s.Append(" 1=1 ");


        if (ParentJobTypeId == 0)
        {
        }
        else
        {
            //选择了一级类别
            if (JobTypeId != 0)
            {    //选择了二级类别
                s.Append(" and  ResumeId IN (SELECT ResumeId FROM dbo.ResumeVsJobType WHERE JobTypeId='" + JobTypeId + "'  )  ");
            }
            else
            {
                //选择了一级类别没有选择二级类别

                s.Append(@"and ResumeId in (SELECT   ResumeId
FROM    dbo.ResumeVsJobType rvjt
        LEFT JOIN dbo.JobType jt ON rvjt.JobTypeId = jt.JobTypeId
        LEFT JOIN dbo.JobType pjt ON jt.ParentJobTypeId = pjt.JobTypeId
        WHERE pjt.JobTypeId='" + ParentJobTypeId + "')");
            }
        }



        if (WorkYearId != 0)
        {
            s.Append(" and WorkYearId='" + WorkYearId + "' ");
        }
        if (JobPayId != 0)
        {
            //选择的子类别

            s.Append(" and JobPayId='" + JobPayId + "' ");
        }
        if (SchoolExpId != 0)
        {
            s.Append(" and SchoolExpId ='" + SchoolExpId + "' ");
        }

        if (TownId != 0)
        {
            s.Append(" and TownId='" + TownId + "' ");
        }


        s.Append(" order by CreateTime desc ");
        BLL.JobBLL bll = new BLL.JobBLL();

        DataSet ds = bll.GetResumePageList(s.ToString(), currentPage);

        RePage(ds);
    }