private void BindList(HR_STAFF condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        {
            condObj.af_PageBy(HR_STAFF.Attribute.STAFF_ID, Order.Desc);
        }

        if (deptid != "")
        {
            condObj.DEPT_ID = deptid;
            //Response.Write(deptid);
        }
        //condObj.PID = decimal.Parse(pid);

        valObj.LoadAllAttributes(false);
        showTableColumnList.Add(HR_STAFF.Attribute.PATH);
        showTableColumnList.Add(HR_STAFF.Attribute.PNAME);
        showTableColumnList.Add(HR_STAFF.Attribute.GENDER);
        valObj.Add(showTableColumnList.ToArray());

        listObj = BLLTable <HR_STAFF> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);

        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;

        //部门领导
        HR_DEPT_MANAGER valObj2  = new HR_DEPT_MANAGER();
        HR_DEPT_MANAGER condObj2 = new HR_DEPT_MANAGER();

        condObj2.DEPT_ID = deptid;
        List <HR_DEPT_MANAGER> listObj2 = BLLTable <HR_DEPT_MANAGER> .Factory(conn).Select(valObj2, condObj2);

        repList_DEPT_MANAGER.DataSource = listObj2;
        repList_DEPT_MANAGER.DataBind();

        //岗位信息
        HR_STATION valObj3  = new HR_STATION();
        HR_STATION condObj3 = new HR_STATION();

        condObj3.DEPT_ID = deptid;
        List <HR_STATION> listObj3 = BLLTable <HR_STATION> .Factory(conn).Select(valObj3, condObj3);

        repList_HR_STATION.DataSource = listObj3;
        repList_HR_STATION.DataBind();
    }
    private void BindList(HR_STAFF condObj, int curPage)
    {
        if (valObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        {
            valObj.af_PageBy(HR_STAFF.Attribute.STAFF_ID, Order.Desc);
        }

        if (deptid != "")
        {
            condDep.DEPT_ID = deptid;
            //Response.Write(deptid);
        }
        else
        {
            condDep.Where("HR_DEPT_STAFF.DEPT_ID = '' or HR_DEPT_STAFF.DEPT_ID is null");
        }
        //condObj.PID = decimal.Parse(pid);

        valObj.LoadAllAttributes(false);
        showTableColumnList.Add(HR_STAFF.Attribute.PATH);
        showTableColumnList.Add(HR_STAFF.Attribute.PNAME);
        showTableColumnList.Add(HR_STAFF.Attribute.GENDER);
        valObj.Add(showTableColumnList.ToArray());

        Relation rel = new Relation(HR_STAFF.Attribute.STAFF_ID, HR_DEPT_STAFF.Attribute.STAFF_ID);
        List <ITableImplement> lst = new List <ITableImplement>();

        lst.Add(condDep);
        lst.Add(condObj);

        listObj = BLLTable <HR_STAFF> .Factory(conn).SelectByPage(valObj, rel, new HR_DEPT_STAFF(), lst, aspPager.PageSize, curPage, ref recount);

        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;

        //部门领导
        HR_DEPT_MANAGER valObj2  = new HR_DEPT_MANAGER();
        HR_DEPT_MANAGER condObj2 = new HR_DEPT_MANAGER();

        valObj2.Top(1);
        condObj2.DEPT_ID = deptid;
        List <HR_DEPT_MANAGER> listObj2 = BLLTable <HR_DEPT_MANAGER> .Factory(conn).Select(valObj2, condObj2);

        repList_DEPT_MANAGER.DataSource = listObj2;
        repList_DEPT_MANAGER.DataBind();

        //岗位信息
        HR_STATION valObj3  = new HR_STATION();
        HR_STATION condObj3 = new HR_STATION();
        Relation   r1       = new Relation(HR_STATION.Attribute.LEVEL_ID, HR_STATION_LEVEL.Attribute.LEVEL_ID);
        Relation   r2       = new Relation(HR_STATION.Attribute.TYPE_ID, HR_STATION_TYPE.Attribute.TYPE_ID);

        List <Relation> lstRelatio = new List <Relation>();

        lstRelatio.Add(r1);
        lstRelatio.Add(r2);

        HR_STATION_TYPE valType = new HR_STATION_TYPE();

        valType.TYPE_NAME = "";
        HR_STATION_LEVEL valLevel = new HR_STATION_LEVEL();

        valLevel.LEVEL_NAME = "";
        List <ITableImplement> lstTable = new List <ITableImplement>();

        lstTable.Add(valType);
        lstTable.Add(valLevel);

        condObj3.DEPT_ID = deptid;

        List <ITableImplement> lstCond = new List <ITableImplement>();

        lstCond.Add(condObj3);

        List <HR_STATION> listObj3 = BLLTable <HR_STATION> .Factory(conn).Select(valObj3, lstRelatio, lstTable, lstCond);

        repList_HR_STATION.DataSource = listObj3;
        repList_HR_STATION.DataBind();
    }