private void PerformSave( ) { if (ValidateFields()) { if (cVm.SaveData(ReadFields()) > 0) { BTNAdd.Text = "Add"; MessageBox.Show("Your Record got saved!", "Cusotmer Save"); if (IsDailog) { CustomerMobileNo = txtMobileNo.Text; CustomerFirstName = txtFirstName.Text; CustomerLastName = txtLastname.Text; this.Close(); DialogResult = DialogResult.OK; } } } }