}//Populate the list of Service objects private void btnEdit_Click(object sender, EventArgs e) { //Here we call from the Service logic if (txtDescription.Text.Equals("")) { MessageBox.Show("Please enter updated service description details", "EMPTY FIELDS!!", MessageBoxButtons.OK, MessageBoxIcon.Error); }//Data validation if (txtDuration.Text.Equals(""))//Data Validation { MessageBox.Show("Please enter updated service duration details", "EMPTY FIELDS!!", MessageBoxButtons.OK, MessageBoxIcon.Error); }//Data Validation else { this.service.Description = txtDescription.Text; this.service.ExpectedDuration = int.Parse(txtDuration.Text); Sl.UpdateService(this.service); MessageBox.Show("Service successfully Updated", " Edit", MessageBoxButtons.OK, MessageBoxIcon.Information); Hide(); frmServiceContract form = new frmServiceContract(); form.ShowDialog(); } //End of Else } //Update service