protected void GridViewLoanDetailrecord_Sorting(object sender, GridViewSortEventArgs e)
    {
        HdfSortDetail.Value = HdfSortDetail.Value == "ASC" ? "DESC" : "ASC";
        DataTable dt = new DataTable();

        dt = (DataTable)Session["dtLoanDetail"];
        DataView dv    = new DataView(dt);
        string   Query = "" + e.SortExpression + " " + HDFSort.Value + "";

        dv.Sort = Query;
        dt      = dv.ToTable();
        Session["dtLoanDetail"] = dt;

        GridViewLoanDetailrecord.DataSource = dt;
        GridViewLoanDetailrecord.DataBind();
    }
    void Gridbind_LoanDetail(string LoanId)
    {
        DataTable dt = new DataTable();

        dt = ObjLoan.GetRecord_From_PayEmployeeLoanDetail(LoanId);
        if (dt.Rows.Count > 0)
        {
            GridViewLoanDetailrecord.DataSource = dt;
            GridViewLoanDetailrecord.DataBind();
            Session["dtLoanDetail"] = dt;
        }
        else
        {
            DataTable Dtclear = new DataTable();
            GridViewLoanDetailrecord.DataSource = Dtclear;
            GridViewLoanDetailrecord.DataBind();
        }
    }