private void chkSameAs_CheckedChanged(object sender, System.EventArgs e) { try { if (cboPresentDivision.Value != null) { if (chkSameAs.Checked == true) { if (cboPresentDivision.Value != null) { cboPermanentDivision.Value = cboPresentDivision.Text.Trim().ToString(); } if (cboPresentDistrictZila.Value != null) { cboPermanentDistrictZila.Value = cboPresentDistrictZila.Text.ToString(); } if (cboPresentUpazilaThana.Value != null) { cboPermanentUpazilaThana.Value = cboPresentUpazilaThana.Text.Trim().ToString(); } if (cboPresentUnionWard.Value != null) { cboPermanentUnionWard.Value = cboPresentUnionWard.Text.Trim().ToString(); } if (cboPresentMouzaMohollah.Value != null) { cboPermanentMauzaMoholla.Value = cboPresentMouzaMohollah.Text.Trim().ToString(); } if (cboPresentVillage.Value != null) { cboPermanentVillage.Value = cboPresentVillage.Text.Trim().ToString(); } txtPermanentRoadHouse.Text = txtPresentRoadHouse.Text; } else { cboPermanentDivision.Value = string.Empty; cboPermanentDistrictZila.Value = string.Empty; cboPermanentUpazilaThana.Value = string.Empty; cboPermanentUnionWard.Value = string.Empty; cboPermanentMauzaMoholla.Value = string.Empty; cboPermanentVillage.Value = string.Empty; txtPermanentRoadHouse.Text = string.Empty; cboPermanentDivision.DataSource = null; cboPermanentDistrictZila.DataSource = null; cboPermanentUpazilaThana.DataSource = null; cboPermanentUnionWard.DataSource = null; cboPermanentMauzaMoholla.DataSource = null; cboPermanentVillage.DataSource = null; } } else { objGeneral.MsgBox("Please select GEO Code value.", MessageBoxIcon.Information); } } catch (Exception ex) { objGeneral.MsgBox(ex.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)