Exemple #1
0
        private SelectedAddressRecordInfo GetSelectedAddressRecordID(GridView gvHOAddress)
        {
            SelectedAddressRecordInfo objSelectedAddressRecordInfo = new SelectedAddressRecordInfo();

            for (int i = 0; i < gvHOAddress.Rows.Count; i++)
            {
                RadioButton rbAddressRecord = (RadioButton)gvHOAddress.Rows[i].Cells[0].FindControl("rdBtnSelectAddress");
                if (rbAddressRecord != null)
                {
                    if (rbAddressRecord.Checked)
                    {
                        HiddenField hf = (HiddenField)gvHOAddress.Rows[i].Cells[0].FindControl("HiddenHomeOwnershipID");
                        // Label lblHomeOwnershipID = (Label)gvHOAddress.Rows[i].Cells[1].FindControl("lblHomeOwnershipID");

                        if (hf != null)
                        {
                            objSelectedAddressRecordInfo.HomeOwnershipID = DataUtils.GetInt(hf.Value);
                            //objSelectedAddressRecordInfo.Building = DataUtils.GetInt(lblHomeOwnershipID.Text);
                        }
                        break;
                    }
                }
            }
            return(objSelectedAddressRecordInfo);
        }
Exemple #2
0
        protected void rdBtnSelectAddress_CheckedChanged(object sender, EventArgs e)
        {
            SelectedAddressRecordInfo objSelectedAddressRecordInfo = GetSelectedAddressRecordID(gvHOAddress);

            hfHomeOwnershipID.Value    = objSelectedAddressRecordInfo.HomeOwnershipID.ToString();
            dvNewHomeOwnerInfo.Visible = true;
            BindHomeOwnersGrid();

            cbAddOwner.Checked = false;
        }