protected void Page_Load(object sender, EventArgs e)
    {
        UnitHolderRegistration regObj = new UnitHolderRegistration();

        if (BaseContent.IsSessionExpired())
        {
            Response.Redirect("../Default.aspx");
            return;
        }
        bcContent = (BaseClass)Session["BCContent"];

        userObj.UserID = bcContent.LoginID.ToString();



        if (!IsPostBack)
        {
            fundNameDropDownList.DataSource     = opendMFDAO.dtFundList();
            fundNameDropDownList.DataTextField  = "FUND_NM";
            fundNameDropDownList.DataValueField = "FUND_CD";
            fundNameDropDownList.DataBind();

            refixationDateFromDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            refixationDateFromDropDownList.DataTextField  = "NAME";
            refixationDateFromDropDownList.DataValueField = "ID";
            refixationDateFromDropDownList.SelectedValue  = "0";
            refixationDateFromDropDownList.DataBind();

            refixationDateToDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            refixationDateToDropDownList.DataTextField  = "NAME";
            refixationDateToDropDownList.DataValueField = "ID";
            refixationDateToDropDownList.SelectedValue  = "0";
            refixationDateToDropDownList.DataBind();

            effectiveDateFromDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            effectiveDateFromDropDownList.DataTextField  = "NAME";
            effectiveDateFromDropDownList.DataValueField = "ID";
            effectiveDateFromDropDownList.SelectedValue  = "0";
            effectiveDateFromDropDownList.DataBind();

            effectiveDateToDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            effectiveDateToDropDownList.DataTextField  = "NAME";
            effectiveDateToDropDownList.DataValueField = "ID";
            effectiveDateToDropDownList.SelectedValue  = "0";
            effectiveDateToDropDownList.DataBind();


            DataTable dtFundInfoDetails = reportObj.dtFundInfoDetails("   ");
            DataTable dtPriceDetails    = dtPriceDetails = reportObj.dtPriceDetails(" AND FUND_CD='" + dtFundInfoDetails.Rows[0]["FUND_CD"].ToString().ToUpper() + "'  AND REFIX_DT=(SELECT MAX (REFIX_DT) FROM PRICE_REFIX WHERE FUND_CD='" + dtFundInfoDetails.Rows[0]["FUND_CD"].ToString().ToUpper() + "') ");
            for (int looper = 1; looper < dtFundInfoDetails.Rows.Count; looper++)
            {
                DataTable dtprice = reportObj.dtPriceDetails(" AND FUND_CD='" + dtFundInfoDetails.Rows[looper]["FUND_CD"].ToString().ToUpper() + "'  AND REFIX_DT=(SELECT MAX (REFIX_DT) FROM PRICE_REFIX WHERE FUND_CD='" + dtFundInfoDetails.Rows[looper]["FUND_CD"].ToString().ToUpper() + "') ");
                dtPriceDetails.Merge(dtprice);
            }
            dvGridSurrender.Visible          = true;
            SurrenderListGridView.DataSource = dtPriceDetails;
            SurrenderListGridView.DataBind();
        }
    }