private void dgvSalesProcessesPublic_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 5) { string token = Session.Token; var purchaseRequest = dgvSalesProcessesPublic.CurrentRow.DataBoundItem; AdminApi adminApi = (AdminApi)purchaseRequest; dynamic objectUpdate = new System.Dynamic.ExpandoObject(); objectUpdate.id = adminApi.id; objectUpdate.isPublic = 1; //PARA QUE PASE A SER PUBLICO - 0 ES PARA QUE NO QUEDE PUBLICO var updateIsPublic = VirtualFairIntegration.AdminUpdateIsPublicById(token, objectUpdate); if (updateIsPublic.statusCode == 200) { string text = updateIsPublic.message; string title = "Información"; MessageBox.Show(text, title, MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } } }