private void PayButtonCard_Click(object sender, EventArgs e) { object obj = ((MenuItem)sender).Tag; if (obj is POSCard) { Pay((POSCard)obj); } }