private void mtReturneaza_Click(object sender, EventArgs e) { Cititor c = adminCititori.GetCititorByIndex(Convert.ToInt32(metroGridCititori.CurrentRow.Cells[0].Value)); if (c.NrCarti == 0) { MessageBox.Show("Cititorul nu are cărți împrumutate!"); } else { FormaReturnare frm = new FormaReturnare(Convert.ToInt32(metroGridCititori.CurrentRow.Cells[0].Value)); frm.ShowDialog(); } }
private void mtReturneaza_Click(object sender, EventArgs e) { Cititor c = adminCititori.GetCititorByIndex(Int32.Parse(lblID.Text)); if (c.NrCarti == 0) { MessageBox.Show("Cititorul nu are cărți împrumutate!"); } else { FormaReturnare frm = new FormaReturnare(Int32.Parse(lblID.Text)); frm.ShowDialog(); } }