protected void IDbankNameDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     IDbranchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(IDbankNameDropDownList.SelectedValue.ToString()));
     IDbranchNameDropDownList.DataTextField  = "BRANCH_NAME";
     IDbranchNameDropDownList.DataValueField = "BRANCH_CODE";
     IDbranchNameDropDownList.DataBind();
 }
    private void FindRegInfo()
    {
        UnitHolderRegistration regObj = new UnitHolderRegistration();

        regObj.FundCode   = fundCodeTextBox.Text;
        regObj.BranchCode = branchCodeTextBox.Text;
        regObj.RegNumber  = regNoTextBox.Text;
        if (opendMFDAO.IsValidRegistration(regObj))
        {
            DataTable dtHolderRegInfo  = opendMFDAO.HolderRegInfo(regObj);
            DataTable dtNomineeRegInfo = opendMFDAO.dtNomineeRegInfo(regObj);
            if (dtHolderRegInfo.Rows.Count > 0)
            {
                regDateTextBox.Text = dtHolderRegInfo.Rows[0]["REG_DT"].Equals(DBNull.Value) ? "" : Convert.ToDateTime(dtHolderRegInfo.Rows[0]["REG_DT"].ToString()).ToString("dd-MMM-yyyy");
                regTypeDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["REG_TYPE"].ToString();
                isCIPDropDownList.SelectedValue   = dtHolderRegInfo.Rows[0]["CIP"].ToString();
                isIDDropDownList.SelectedValue    = dtHolderRegInfo.Rows[0]["ID_FLAG"].ToString();
                if (dtHolderRegInfo.Rows[0]["ID_FLAG"].ToString() == "Y")
                {
                    IDAccNoTextBox.Text = dtHolderRegInfo.Rows[0]["ID_AC"].ToString();
                    if (!dtHolderRegInfo.Rows[0]["ID_BK_NM_CD"].Equals(DBNull.Value) && !dtHolderRegInfo.Rows[0]["ID_BK_BR_NM_CD"].Equals(DBNull.Value))
                    {
                        IDbankNameDropDownList.Enabled          = true;
                        IDbranchNameDropDownList.Enabled        = true;
                        IDbankNameDropDownList.SelectedValue    = dtHolderRegInfo.Rows[0]["ID_BK_NM_CD"].ToString();
                        IDbranchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(dtHolderRegInfo.Rows[0]["ID_BK_NM_CD"].ToString()));
                        IDbranchNameDropDownList.DataTextField  = "BRANCH_NAME";
                        IDbranchNameDropDownList.DataValueField = "BRANCH_CODE";
                        IDbranchNameDropDownList.DataBind();
                        IDbranchNameDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["ID_BK_BR_NM_CD"].ToString();
                    }
                    else
                    {
                        IDbankNameDropDownList.SelectedValue   = "0";
                        IDbranchNameDropDownList.SelectedValue = "0";
                        IDbankNameDropDownList.Enabled         = false;
                        IDbranchNameDropDownList.Enabled       = false;
                    }
                }
                else
                {
                    IDAccNoTextBox.Text = "";
                    IDbankNameDropDownList.SelectedValue   = "0";
                    IDbranchNameDropDownList.SelectedValue = "0";
                    IDbankNameDropDownList.Enabled         = false;
                    IDbranchNameDropDownList.Enabled       = false;
                }

                holderNameTextBox.Text     = dtHolderRegInfo.Rows[0]["HNAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["HNAME"].ToString();
                holderFMTextBox.Text       = dtHolderRegInfo.Rows[0]["FMH_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["FMH_NAME"].ToString();
                holderMotherTextBox.Text   = dtHolderRegInfo.Rows[0]["MO_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["MO_NAME"].ToString();
                holderAddress1TextBox.Text = dtHolderRegInfo.Rows[0]["ADDRS1"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["ADDRS1"].ToString();
                holderAddress2TextBox.Text = dtHolderRegInfo.Rows[0]["ADDRS2"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["ADDRS2"].ToString();
                holderOccupationDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["OCC_CODE"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["OCC_CODE"].ToString();
                holderNationalityTextBox.Text = dtHolderRegInfo.Rows[0]["NATIONALITY"].Equals(DBNull.Value) ? "BANGLADESHI" : dtHolderRegInfo.Rows[0]["NATIONALITY"].ToString();
                holderTelphoneTextBox.Text    = dtHolderRegInfo.Rows[0]["TEL_NO"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["TEL_NO"].ToString();

                holderTINTextBox.Text = dtHolderRegInfo.Rows[0]["TIN"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["TIN"].ToString();

                holderEmailTextBox.Text = dtHolderRegInfo.Rows[0]["EMAIL"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["EMAIL"].ToString();
                holderMaritialStatusDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["MAR_STAT"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["MAR_STAT"].ToString();
                holderEducationDropDownList.SelectedValue      = dtHolderRegInfo.Rows[0]["EDU_QUA"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["EDU_QUA"].ToString();
                holderDateofBirthTextBox.Text            = dtHolderRegInfo.Rows[0]["B_DATE"].Equals(DBNull.Value) ? "" : Convert.ToDateTime(dtHolderRegInfo.Rows[0]["B_DATE"].ToString()).ToString("dd-MMM-yyyy");
                holderCityTextBox.Text                   = dtHolderRegInfo.Rows[0]["CITY"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["CITY"].ToString();
                holderSexDropDownList.SelectedValue      = dtHolderRegInfo.Rows[0]["SEX"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["SEX"].ToString();
                holderReligionDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["RELIGION"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["RELIGION"].ToString();
                holderRemarksTextBox.Text                = dtHolderRegInfo.Rows[0]["REMARKS"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["REMARKS"].ToString();

                if (dtHolderRegInfo.Rows[0]["IS_BEFTN"].Equals(DBNull.Value))
                {
                    bftnNoRadioButton.Checked  = true;
                    bftnYesRadioButton.Checked = false;
                }
                else if (dtHolderRegInfo.Rows[0]["IS_BEFTN"].ToString().ToUpper() == "N")
                {
                    bftnNoRadioButton.Checked  = true;
                    bftnYesRadioButton.Checked = false;
                }
                else if (dtHolderRegInfo.Rows[0]["IS_BEFTN"].ToString().ToUpper() == "Y")
                {
                    bftnNoRadioButton.Checked  = false;
                    bftnYesRadioButton.Checked = true;
                }


                jHolderNameTextBox.Text                     = dtHolderRegInfo.Rows[0]["JNT_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["JNT_NAME"].ToString();
                jHolderFMTextBox.Text                       = dtHolderRegInfo.Rows[0]["JNT_FMH_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["JNT_FMH_NAME"].ToString();
                jHolderMotherTextBox.Text                   = dtHolderRegInfo.Rows[0]["JNT_MO_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["JNT_MO_NAME"].ToString();
                jHolderAddress1TextBox.Text                 = dtHolderRegInfo.Rows[0]["JNT_ADDRS1"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["JNT_ADDRS1"].ToString();
                jHolderAddress2TextBox.Text                 = dtHolderRegInfo.Rows[0]["JNT_ADDRS2"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["JNT_ADDRS2"].ToString();
                jHolderNantionalityTextBox.Text             = dtHolderRegInfo.Rows[0]["JNT_NATIONALITY"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["JNT_NATIONALITY"].ToString();
                jHolderOccupationDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["JNT_OCC_CODE"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["JNT_OCC_CODE"].ToString();



                if (dtHolderRegInfo.Rows[0]["BK_FLAG"].ToString() == "Y")
                {
                    isBankDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["BK_FLAG"].ToString();
                    //string BankAccInfo = dtHolderRegInfo.Rows[0]["SPEC_IN1"].ToString() + dtHolderRegInfo.Rows[0]["SPEC_IN2"].ToString();
                    //string[] BankAccountInfo = BankAccInfo.Split(',');
                    //if (BankAccountInfo.Length > 0)
                    //{
                    //    bankAccTextBox.Text = BankAccountInfo[0].ToString();
                    //    if (BankAccountInfo.Length > 1)
                    //    {
                    //        bankNameTextBox.Text = BankAccountInfo[1].ToString();
                    //    }
                    //    if (BankAccountInfo.Length > 2)
                    //    {
                    //        branchNameTextBox.Text = BankAccountInfo[2].ToString();
                    //    }
                    //    if (BankAccountInfo.Length > 3)
                    //    {
                    //        for (int loop = 3; loop < BankAccountInfo.Length; loop++)
                    //        {
                    //            branchAddress = branchAddress + BankAccountInfo[loop].ToString();
                    //        }
                    //        bankAddressTextBox.Text = branchAddress;
                    //    }


                    //    bankAccTextBox.Enabled = true;
                    //    bankNameTextBox.Enabled = false;
                    //    branchNameTextBox.Enabled = false;
                    //    bankAddressTextBox.Enabled = true;
                    //    bankNameDropDownList.Enabled = true;
                    //    branchNameDropDownList.Enabled = true;
                    //    bankNameDropDownList.SelectedValue = "0";
                    //    branchNameDropDownList.SelectedValue = "0";
                    //}
                    //else
                    //{
                    //    bankAccTextBox.Enabled = true;
                    //    bankNameTextBox.Enabled = false;
                    //    branchNameTextBox.Enabled = false;
                    //    bankAddressTextBox.Enabled = true;
                    //}

                    if (!dtHolderRegInfo.Rows[0]["BK_NM_CD"].Equals(DBNull.Value) && !dtHolderRegInfo.Rows[0]["BK_BR_NM_CD"].Equals(DBNull.Value) && !dtHolderRegInfo.Rows[0]["BK_AC_NO"].Equals(DBNull.Value))
                    {
                        bankAccTextBox.Enabled                = true;
                        bankNameDropDownList.Enabled          = true;
                        branchNameDropDownList.Enabled        = true;
                        bankAddressTextBox.Enabled            = true;
                        bankNameDropDownList.SelectedValue    = dtHolderRegInfo.Rows[0]["BK_NM_CD"].ToString();
                        branchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(dtHolderRegInfo.Rows[0]["BK_NM_CD"].ToString()));
                        branchNameDropDownList.DataTextField  = "BRANCH_NAME";
                        branchNameDropDownList.DataValueField = "BRANCH_CODE";
                        branchNameDropDownList.DataBind();
                        branchNameDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["BK_BR_NM_CD"].ToString();
                        bankAccTextBox.Text = dtHolderRegInfo.Rows[0]["BK_AC_NO"].ToString();
                        DataTable dtBankBracnhInfo = unitHolderRegBLObj.dtGetBankBracnhInfo(Convert.ToInt32(dtHolderRegInfo.Rows[0]["BK_NM_CD"].ToString()), Convert.ToInt32(dtHolderRegInfo.Rows[0]["BK_BR_NM_CD"].ToString()));
                        if (dtBankBracnhInfo.Rows.Count > 0)
                        {
                            bankAddressTextBox.Text = "Routing No=[" + dtBankBracnhInfo.Rows[0]["ROUTING_NO"].ToString() + "] " + dtBankBracnhInfo.Rows[0]["ADDRESS"].ToString() + " ";
                        }
                    }
                }
                else
                {
                    isBankDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["BK_FLAG"].ToString();
                    bankAccTextBox.Text                  = "";
                    bankAddressTextBox.Text              = "";
                    bankNameDropDownList.SelectedValue   = "0";
                    branchNameDropDownList.SelectedValue = "0";
                    bankAccTextBox.Enabled               = false;
                    bankAddressTextBox.Enabled           = false;
                    bankNameDropDownList.Enabled         = false;
                    branchNameDropDownList.Enabled       = false;
                }

                if (dtNomineeRegInfo.Rows.Count > 0)
                {
                    NomiControlNoTextBox.Text   = dtNomineeRegInfo.Rows[0]["NOMI_CTL_NO"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[0]["NOMI_CTL_NO"].ToString();
                    nomi1NameTextBox.Text       = dtNomineeRegInfo.Rows[0]["NOMI_NAME"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[0]["NOMI_NAME"].ToString();
                    nomi1FMTextBox.Text         = dtNomineeRegInfo.Rows[0]["NOMI_FMH_NAME"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[0]["NOMI_FMH_NAME"].ToString();
                    nomi1MotherNameTextBox.Text = dtNomineeRegInfo.Rows[0]["NOMI_MO_NAME"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[0]["NOMI_MO_NAME"].ToString();
                    nomi1Address1TextBox.Text   = dtNomineeRegInfo.Rows[0]["NOMI_ADDRS1"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[0]["NOMI_ADDRS1"].ToString();
                    nomi1Address2TextBox.Text   = dtNomineeRegInfo.Rows[0]["NOMI_ADDRS2"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[0]["NOMI_ADDRS2"].ToString();
                    nomi1OccupationDropDownList.SelectedValue = dtNomineeRegInfo.Rows[0]["NOMI_OCC_CODE"].Equals(DBNull.Value) ? "0" : dtNomineeRegInfo.Rows[0]["NOMI_OCC_CODE"].ToString();
                    nomi1NationalityTextBox.Text            = dtNomineeRegInfo.Rows[0]["NOMI_NATIONALITY"].Equals(DBNull.Value) ? "BANGLADESHI" : dtNomineeRegInfo.Rows[0]["NOMI_NATIONALITY"].ToString();
                    nomi1RelationDropDownList.SelectedValue = dtNomineeRegInfo.Rows[0]["NOMI_REL"].Equals(DBNull.Value) ? "0" : dtNomineeRegInfo.Rows[0]["NOMI_REL"].ToString();
                    nomi1PtcTextBox.Text = dtNomineeRegInfo.Rows[0]["PERCENTAGE"].Equals(DBNull.Value) ? "0" : dtNomineeRegInfo.Rows[0]["PERCENTAGE"].ToString();
                }
                if (dtNomineeRegInfo.Rows.Count > 1)
                {
                    nomi2NameTextBox.Text       = dtNomineeRegInfo.Rows[1]["NOMI_NAME"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[1]["NOMI_NAME"].ToString();
                    nomi2FMTextBox.Text         = dtNomineeRegInfo.Rows[1]["NOMI_FMH_NAME"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[1]["NOMI_FMH_NAME"].ToString();
                    nomi2MotherNameTextBox.Text = dtNomineeRegInfo.Rows[0]["NOMI_MO_NAME"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[0]["NOMI_MO_NAME"].ToString();
                    nomi2Address1TextBox.Text   = dtNomineeRegInfo.Rows[1]["NOMI_ADDRS1"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[1]["NOMI_ADDRS1"].ToString();
                    nomi2Address2TextBox.Text   = dtNomineeRegInfo.Rows[1]["NOMI_ADDRS2"].Equals(DBNull.Value) ? "" : dtNomineeRegInfo.Rows[1]["NOMI_ADDRS2"].ToString();
                    nomi2OccupationDropDownList.SelectedValue = dtNomineeRegInfo.Rows[1]["NOMI_OCC_CODE"].Equals(DBNull.Value) ? "0" : dtNomineeRegInfo.Rows[1]["NOMI_OCC_CODE"].ToString();
                    nomi2NationalityTextBox.Text            = dtNomineeRegInfo.Rows[1]["NOMI_NATIONALITY"].Equals(DBNull.Value) ? "BANGLADESHI" : dtNomineeRegInfo.Rows[1]["NOMI_NATIONALITY"].ToString();
                    nomi2RelationDropDownList.SelectedValue = dtNomineeRegInfo.Rows[1]["NOMI_REL"].Equals(DBNull.Value) ? "0" : dtNomineeRegInfo.Rows[1]["NOMI_REL"].ToString();
                    nomi2PtcTextBox.Text = dtNomineeRegInfo.Rows[1]["PERCENTAGE"].Equals(DBNull.Value) ? "0" : dtNomineeRegInfo.Rows[1]["PERCENTAGE"].ToString();
                }
                if (dtNomineeRegInfo.Rows.Count <= 0)
                {
                    NomiControlNoTextBox.Text = "";
                    nomi1NameTextBox.Text     = "";
                    nomi1FMTextBox.Text       = "";
                    nomi1Address1TextBox.Text = "";
                    nomi1Address2TextBox.Text = "";
                    nomi1OccupationDropDownList.SelectedValue = "0";
                    nomi1NationalityTextBox.Text            = "";
                    nomi1RelationDropDownList.SelectedValue = "0";
                    nomi1PtcTextBox.Text = "";

                    nomi2NameTextBox.Text     = "";
                    nomi2FMTextBox.Text       = "";
                    nomi2Address1TextBox.Text = "";
                    nomi2Address2TextBox.Text = "";
                    nomi2OccupationDropDownList.SelectedValue = "0";
                    nomi2NationalityTextBox.Text            = "";
                    nomi2RelationDropDownList.SelectedValue = "0";
                    nomi2PtcTextBox.Text = "";
                }
                if (dtNomineeRegInfo.Rows.Count == 1)
                {
                    nomi2NameTextBox.Text     = "";
                    nomi2FMTextBox.Text       = "";
                    nomi2Address1TextBox.Text = "";
                    nomi2Address2TextBox.Text = "";
                    nomi2OccupationDropDownList.SelectedValue = "0";
                    nomi2NationalityTextBox.Text            = "";
                    nomi2RelationDropDownList.SelectedValue = "0";
                    nomi2PtcTextBox.Text = "";
                }
            }
            else
            {
                regNoTextBox.Focus();
                ClearText();
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert('No Data Found');", true);
            }
        }
        else
        {
            regNoTextBox.Focus();
            ClearText();
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert('Invalid Registration Number!! Please Enter Valid Registration Number');", true);
        }
    }
Exemple #3
0
    private void FindRegInfo()
    {
        UnitHolderRegistration regObj = new UnitHolderRegistration();

        regObj.FundCode   = fundCodeTextBox.Text;
        regObj.BranchCode = branchCodeTextBox.Text;
        regObj.RegNumber  = regNoTextBox.Text;
        if (opendMFDAO.IsValidRegistration(regObj))
        {
            DataTable dtHolderRegInfo = opendMFDAO.HolderRegInfo(regObj);
            // DataTable dtNomineeRegInfo = opendMFDAO.dtNomineeRegInfo(regObj);
            if (dtHolderRegInfo.Rows.Count > 0)
            {
                regDateTextBox.Text = dtHolderRegInfo.Rows[0]["REG_DT"].Equals(DBNull.Value) ? "" : Convert.ToDateTime(dtHolderRegInfo.Rows[0]["REG_DT"].ToString()).ToString("dd-MMM-yyyy");
                if (dtHolderRegInfo.Rows[0]["REG_TYPE"].ToString().ToUpper() == "I")
                {
                    IndividualButton.Checked          = false;
                    CompRadioButton.Checked           = true;
                    regTypeDropDownList.SelectedValue = "I";
                }
                else if (dtHolderRegInfo.Rows[0]["REG_TYPE"].ToString().ToUpper() == "N")
                {
                    IndividualButton.Checked          = true;
                    CompRadioButton.Checked           = false;
                    regTypeDropDownList.SelectedValue = "N";
                }
                else if (dtHolderRegInfo.Rows[0]["REG_TYPE"].ToString().ToUpper() == "C")
                {
                    IndividualButton.Checked          = false;
                    CompRadioButton.Checked           = true;
                    regTypeDropDownList.SelectedValue = "C";
                }
                else if (dtHolderRegInfo.Rows[0]["REG_TYPE"].ToString().ToUpper() == "F")
                {
                    IndividualButton.Checked          = true;
                    CompRadioButton.Checked           = false;
                    regTypeDropDownList.SelectedValue = "F";
                }

                if (dtHolderRegInfo.Rows[0]["CIP"].Equals(DBNull.Value))
                {
                    isCIPDropDownList.SelectedValue = "0";
                }
                else
                {
                    isCIPDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["CIP"].ToString();
                }

                IDAccNoTextBox.Enabled           = true;
                IDbankNameDropDownList.Enabled   = true;
                IDbranchNameDropDownList.Enabled = true;

                if (dtHolderRegInfo.Rows[0]["ID_FLAG"].ToString() == "Y")
                {
                    IDAccNoTextBox.Text      = dtHolderRegInfo.Rows[0]["ID_AC"].ToString();
                    IDNoRadioButton.Checked  = false;
                    IDYesRadioButton.Checked = true;
                    if (!dtHolderRegInfo.Rows[0]["ID_BK_NM_CD"].Equals(DBNull.Value) && !dtHolderRegInfo.Rows[0]["ID_BK_BR_NM_CD"].Equals(DBNull.Value))
                    {
                        dvIDInof.Attributes.Add("style", "visibility:visible");
                        IDAccNoTextBox.Enabled                  = true;
                        IDbankNameDropDownList.Enabled          = true;
                        IDbranchNameDropDownList.Enabled        = true;
                        IDbankNameDropDownList.SelectedValue    = dtHolderRegInfo.Rows[0]["ID_BK_NM_CD"].ToString();
                        IDbranchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(dtHolderRegInfo.Rows[0]["ID_BK_NM_CD"].ToString()));
                        IDbranchNameDropDownList.DataTextField  = "BRANCH_NAME";
                        IDbranchNameDropDownList.DataValueField = "BRANCH_CODE";
                        IDbranchNameDropDownList.DataBind();
                        IDbranchNameDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["ID_BK_BR_NM_CD"].ToString();
                    }
                    else
                    {
                        dvIDInof.Attributes.Add("style", "visibility:hidden");
                        IDbankNameDropDownList.SelectedValue   = "0";
                        IDbranchNameDropDownList.SelectedValue = "0";
                        IDAccNoTextBox.Text = "";
                    }
                }
                else
                {
                    IDYesRadioButton.Checked = false;
                    IDNoRadioButton.Checked  = true;

                    dvIDInof.Attributes.Add("style", "visibility:hidden");
                    IDAccNoTextBox.Text = "";
                    IDbankNameDropDownList.SelectedValue   = "0";
                    IDbranchNameDropDownList.SelectedValue = "0";
                }

                NameTextBox.Text           = dtHolderRegInfo.Rows[0]["HNAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["HNAME"].ToString();
                FMTextBox.Text             = dtHolderRegInfo.Rows[0]["FMH_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["FMH_NAME"].ToString();
                MotherTextBox.Text         = dtHolderRegInfo.Rows[0]["MO_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["MO_NAME"].ToString();
                spouceTextBox.Text         = dtHolderRegInfo.Rows[0]["SP_NAME"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["SP_NAME"].ToString();
                holderBONumberTextBox.Text = dtHolderRegInfo.Rows[0]["BO"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["BO"].ToString();

                NIDTextBox.Text         = dtHolderRegInfo.Rows[0]["NID"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["NID"].ToString();;
                passportTextBox.Text    = dtHolderRegInfo.Rows[0]["PASS_NO"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["PASS_NO"].ToString();;
                TINTextBox.Text         = dtHolderRegInfo.Rows[0]["TIN"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["TIN"].ToString();;
                birthCertNoTextBox.Text = dtHolderRegInfo.Rows[0]["BIRTH_CERT_NO"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["BIRTH_CERT_NO"].ToString();;



                OccupationDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["OCC_CODE"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["OCC_CODE"].ToString();
                NationalityTextBox.Text = dtHolderRegInfo.Rows[0]["NATIONALITY"].Equals(DBNull.Value) ? "BANGLADESHI" : dtHolderRegInfo.Rows[0]["NATIONALITY"].ToString();
                // DateofBirthTextBox.Text = dtHolderRegInfo.Rows[0]["B_DATE"].Equals(DBNull.Value) ? " " : dtHolderRegInfo.Rows[0]["B_DATE"].ToString();
                DateofBirthTextBox.Text = dtHolderRegInfo.Rows[0]["B_DATE"].Equals(DBNull.Value) ? "" : Convert.ToDateTime(dtHolderRegInfo.Rows[0]["B_DATE"].ToString()).ToString("dd-MMM-yyyy");

                TelphoneTextBox.Text = dtHolderRegInfo.Rows[0]["TEL_NO"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["TEL_NO"].ToString();
                MobileTextBox.Text   = dtHolderRegInfo.Rows[0]["MOBILE1"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["MOBILE1"].ToString();

                presentAddress1TextBox.Text = dtHolderRegInfo.Rows[0]["ADDRS1"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["ADDRS1"].ToString();
                presentAddress2TextBox.Text = dtHolderRegInfo.Rows[0]["ADDRS2"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["ADDRS2"].ToString();
                presentCityTextBox.Text     = dtHolderRegInfo.Rows[0]["CITY"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["CITY"].ToString();

                parmanAddress1TextBox.Text = dtHolderRegInfo.Rows[0]["PADDRESS1"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["PADDRESS1"].ToString();
                parmanAddress2TextBox.Text = dtHolderRegInfo.Rows[0]["PADDRESS2"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["PADDRESS2"].ToString();
                parmentCityTextBox.Text    = dtHolderRegInfo.Rows[0]["PCITY"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["PCITY"].ToString();

                SourceFundTextBox.Text = dtHolderRegInfo.Rows[0]["SOURCE_FUND"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["SOURCE_FUND"].ToString();

                EmailTextBox.Text = dtHolderRegInfo.Rows[0]["EMAIL"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["EMAIL"].ToString();
                MaritialStatusDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["MAR_STAT"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["MAR_STAT"].ToString();
                EducationDropDownList.SelectedValue      = dtHolderRegInfo.Rows[0]["EDU_QUA"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["EDU_QUA"].ToString();


                SexDropDownList.SelectedValue      = dtHolderRegInfo.Rows[0]["SEX"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["SEX"].ToString();
                ReligionDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["RELIGION"].Equals(DBNull.Value) ? "0" : dtHolderRegInfo.Rows[0]["RELIGION"].ToString();
                RemarksTextBox.Text = dtHolderRegInfo.Rows[0]["REMARKS"].Equals(DBNull.Value) ? "" : dtHolderRegInfo.Rows[0]["REMARKS"].ToString();

                if (dtHolderRegInfo.Rows[0]["IS_BEFTN"].Equals(DBNull.Value))
                {
                    bftnNoRadioButton.Checked  = true;
                    bftnYesRadioButton.Checked = false;
                    divBEFTN.Attributes.Add("style", "visibility:visible");
                }
                else if (dtHolderRegInfo.Rows[0]["IS_BEFTN"].ToString().ToUpper() == "N")
                {
                    bftnNoRadioButton.Checked  = true;
                    bftnYesRadioButton.Checked = false;
                    divBEFTN.Attributes.Add("style", "visibility:visible");
                }
                else if (dtHolderRegInfo.Rows[0]["IS_BEFTN"].ToString().ToUpper() == "Y")
                {
                    bftnNoRadioButton.Checked  = false;
                    bftnYesRadioButton.Checked = true;
                    divBEFTN.Attributes.Add("style", "visibility:visible");
                }


                if (dtHolderRegInfo.Rows[0]["BK_FLAG"].ToString() == "Y")
                {
                    BankNORadioButton.Checked  = false;
                    BankYesRadioButton.Checked = true;
                    DivBank.Attributes.Add("style", "visibility:visible");

                    if (!dtHolderRegInfo.Rows[0]["BK_NM_CD"].Equals(DBNull.Value) && !dtHolderRegInfo.Rows[0]["BK_BR_NM_CD"].Equals(DBNull.Value) && !dtHolderRegInfo.Rows[0]["BK_AC_NO"].Equals(DBNull.Value))
                    {
                        DivBank.Attributes.Add("style", "visibility:visible");
                        bankAccTextBox.Enabled                = true;
                        bankNameDropDownList.Enabled          = true;
                        branchNameDropDownList.Enabled        = true;
                        bankAddressTextBox.Enabled            = true;
                        bankNameDropDownList.SelectedValue    = dtHolderRegInfo.Rows[0]["BK_NM_CD"].ToString();
                        branchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(dtHolderRegInfo.Rows[0]["BK_NM_CD"].ToString()));
                        branchNameDropDownList.DataTextField  = "BRANCH_NAME";
                        branchNameDropDownList.DataValueField = "BRANCH_CODE";
                        branchNameDropDownList.DataBind();
                        branchNameDropDownList.SelectedValue = dtHolderRegInfo.Rows[0]["BK_BR_NM_CD"].ToString();
                        bankAccTextBox.Text = dtHolderRegInfo.Rows[0]["BK_AC_NO"].ToString();

                        DataTable dtBankBracnhInfo = unitHolderRegBLObj.dtGetBankBracnhInfo(Convert.ToInt32(dtHolderRegInfo.Rows[0]["BK_NM_CD"].ToString()), Convert.ToInt32(dtHolderRegInfo.Rows[0]["BK_BR_NM_CD"].ToString()));
                        if (dtBankBracnhInfo.Rows.Count > 0)
                        {
                            bankAddressTextBox.Text = dtBankBracnhInfo.Rows[0]["ADDRESS"].ToString();
                            routingNoTextBox.Text   = dtBankBracnhInfo.Rows[0]["ROUTING_NO"].ToString();
                        }
                    }
                }
                else
                {
                    DivBank.Attributes.Add("style", "visibility:hidden");

                    BankNORadioButton.Checked            = true;
                    BankYesRadioButton.Checked           = false;
                    bankAccTextBox.Text                  = "";
                    bankAddressTextBox.Text              = "";
                    bankNameDropDownList.SelectedValue   = "0";
                    branchNameDropDownList.SelectedValue = "0";
                }
            }
            else
            {
                regNoTextBox.Focus();
                ClearText();
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert('No Data Found');", true);
            }
        }
        else
        {
            regNoTextBox.Focus();
            ClearText();
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert('Invalid Registration Number!! Please Enter Valid Registration Number');", true);
        }
    }