private void BindData()
    {
        pager.PageSize = PagingSize;

        DepartmentDal departmentDal = new DepartmentDal();
        string        filter        = null;

        if (ViewState["Filter"] != null)
        {
            filter = ViewState["Filter"].ToString();
        }
        pager.RecordCount = departmentDal.GetCount(filter);
        DataTable table = departmentDal.GetAll(pageIndex, PagingSize, filter);

        BindTable2GridView(gvMain, table);
    }