//UPDATE LANDA MARK DATA private void UpdateLandMark() { try { if (String.IsNullOrWhiteSpace(txtLMType.Text)) { MessageBox.Show("Please enter Land Mark Type!", "Land Mark Type Update", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { objSetting = new SettingClassBLL(); if (objSetting.CheckLandMarkType(txtLMType.Text) == false) { objSetting = new SettingClassBLL() { landMarkType = txtLMType.Text, existLandMarkType = dgvLandMarkType.CurrentRow.Cells[0].Value.ToString() }; objSetting.UpdateLandMarkType(); MessageBox.Show("Land Mark Type update successful!", "Land Mark Type Update", MessageBoxButtons.OK, MessageBoxIcon.Information); LoadLandMarTypekData(); ClearTextBoxces(); } else { MessageBox.Show("Surveyor Type exist!", "Surveyor Type Update", MessageBoxButtons.OK, MessageBoxIcon.Error); ClearTextBoxces(); } } btnLMTypeAdd.Text = "Add"; } catch (Exception ex) { MessageBox.Show(ex.Message, "Division Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }