private bool IsValidate() { if (Progress.Text.Trim() == string.Empty) { MessageBox.Show("Progress is Required.", "error", MessageBoxButtons.OK, MessageBoxIcon.Error); Progress.Focus(); return(false); } if (Conduct.Text.Trim() == string.Empty) { MessageBox.Show("Conduct is Required.", "error", MessageBoxButtons.OK, MessageBoxIcon.Error); Conduct.Focus(); return(false); } if (ReasonForLeaving.Text.Trim() == string.Empty) { MessageBox.Show("Reason for Leave is Required.", "error", MessageBoxButtons.OK, MessageBoxIcon.Error); ReasonForLeaving.Focus(); return(false); } if (Remark.Text.Trim() == string.Empty) { MessageBox.Show("Remark is Required.", "error", MessageBoxButtons.OK, MessageBoxIcon.Error); Remark.Focus(); return(false); } return(true); }