//UPDATE SURVEYOR DATA private void SurveyorDataUpadate() { try { if (//CHECK TEXBOXES NOT NULL OR EMPTY String.IsNullOrWhiteSpace(txtEmpRegNo.Text) || String.IsNullOrWhiteSpace(txtName.Text) || String.IsNullOrWhiteSpace(cbxSurveyorType.Text) || String.IsNullOrWhiteSpace(txtMobile.Text) || String.IsNullOrWhiteSpace(txtEmail.Text) ) { MessageBox.Show("You must be filling all field!.", "Surveyor Registration", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { objClassBLL = new SurveyorClassBLL() { date = DateTime.Today, emp_reg_no = txtEmpRegNo.Text, initail_name = txtName.Text, surveyor_type = cbxSurveyorType.Text.ToString(), mobile = txtMobile.Text, email = txtEmail.Text, division = _division, username = _username }; //UPDATE USER DATA objClassBLL.UpdateSurveyor(); MessageBox.Show("Surveyor Update successfully!", "Surveyor Update", MessageBoxButtons.OK, MessageBoxIcon.Information); //CLEAR ALL TEXBOX AND COMBOBOX ClearTextBoxces(); //LOAD USER DATA LoadDataDgv(); //SET TO BUTTON TEXT Add btnAdd.Text = "Add"; txtEmpRegNo.Enabled = true; } } catch (Exception ex) { MessageBox.Show(ex.Message, "SURVEYOR ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } }