protected void ApprovePTO(object sender, EventArgs e) { int id = Int32.Parse(((sender as LinkButton).CommandArgument).ToString()); connString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; data = new DBAccess(connString); data.ApprovePTORequest(id); if (!data.error) { LoadNewPTORequests(); } else { lblErrorMessage.Text = data.errorMessage; } }