private void CloseTill() { frmLogout frmLogout = new frmLogout(usersService.Find(Convert.ToInt32(lblUserId.Text))); frmLogout.frmMain = this; frmLogout.ShowDialog(); if (frmLogout.DialogResult == DialogResult.OK) { btnOpenTill.Enabled = true; lblNombreUsuario.Text = "-"; lblUserId.Text = "-"; workshisftService.CloseLastWorkshift(); btnCloseTill.Enabled = false; } else if (frmLogout.DialogResult == DialogResult.No) { btnOpenTill.Enabled = false; btnCloseTill.Enabled = true; } }