public void DoDeleteAction() { UsersHandler usersHandler = new UsersHandler(); usersHandler.Delete(Convert.ToInt32(txt_id.Text)); MessageCollection.copyFrom(usersHandler.MessageCollection); if (MessageCollection.isErrorOccured) { MessageCollection.PublishLog(); lbl_err.Text = MessageCollection.Messages[MessageCollection.Messages.Count - 1].ErrorMessage; lbl_err.Visible = true; } else { lbl_err.Text = "Record Deleted Successfully"; lbl_err.ForeColor = System.Drawing.Color.Green; } }