public void BindCrewHistoryGrid()
    {
        DateTime dtFrom = DateTime.Parse("1900/01/01");
        DateTime dtTo   = DateTime.Parse("2900/01/01");


        if (txtSearchJoinFromDate.Text != "")
        {
            dtFrom = UDFLib.ConvertToDate(Convert.ToString(txtSearchJoinFromDate.Text), UDFLib.GetDateFormat());
        }

        if (txtSearchJoinToDate.Text != "")
        {
            dtTo = UDFLib.ConvertToDate(Convert.ToString(txtSearchJoinToDate.Text), UDFLib.GetDateFormat());
        }

        int PAGE_SIZE  = ucCustomPager_CrewList.PageSize;
        int PAGE_INDEX = ucCustomPager_CrewList.CurrentPageIndex;

        int PAGE_SIZE1  = ucCustomPager1.PageSize;
        int PAGE_INDEX1 = ucCustomPager1.CurrentPageIndex;

        int SelectRecordCount  = ucCustomPager_CrewList.isCountRecord;
        int SelectRecordCount1 = ucCustomPager1.isCountRecord;

        DataSet ds = BLL_Crew_CrewList.Get_Crewlist_History(Convert.ToInt32(DDLVessel.SelectedValue), UDFLib.ConvertToInteger(ddlCountry.SelectedValue.ToString()), UDFLib.ConvertToInteger(ddlRank.SelectedValue.ToString()),
                                                            dtFrom, dtTo, PAGE_SIZE, PAGE_INDEX, PAGE_SIZE1, PAGE_INDEX1, ref SelectRecordCount, ref SelectRecordCount1);

        gvCrwHistroy.DataSource = ds.Tables[0];
        gvCrwHistroy.DataBind();

        if (ucCustomPager_CrewList.isCountRecord == 1)
        {
            ucCustomPager_CrewList.CountTotalRec = SelectRecordCount.ToString();
            ucCustomPager_CrewList.BuildPager();
        }


        if (ucCustomPager1.isCountRecord == 1)
        {
            ucCustomPager1.CountTotalRec = SelectRecordCount.ToString();
            ucCustomPager1.BuildPager();
        }

        ds.Relations.Add(new DataRelation("NestedCat", ds.Tables[1].Columns["rank_category"], ds.Tables[2].Columns["rank_category"]));
        ds.Tables[2].TableName = "Members";

        rpt1.DataSource = ds.Tables[1];
        rpt1.DataBind();

        if (ucCustomPager_CrewList.isCountRecord == 1)
        {
            ucCustomPager_CrewList.CountTotalRec = SelectRecordCount.ToString();
            ucCustomPager_CrewList.BuildPager();
        }

        if (ucCustomPager1.isCountRecord == 1)
        {
            ucCustomPager1.CountTotalRec = SelectRecordCount1.ToString();
            ucCustomPager1.BuildPager();
        }
    }