private void dgCards_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { Buffer.State = "view"; Buffer.MFCardsBuffer = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString()); FPersCards frmCards = new FPersCards(); frmCards.ShowDialog(); Reload(); }
private void AddCard() { Buffer.State = "add"; Buffer.MFPersonBuffer = Convert.ToInt32(dgPerson[0, dgPerson.CurrentRow.Index].Value.ToString()); FPersCards frmPersCardsAdd = new FPersCards(); frmPersCardsAdd.ShowDialog(); Reload(); }
private void btCardEdit_Click(object sender, EventArgs e) { try { Buffer.State = "edit"; Buffer.MFCardsBuffer = Convert.ToInt32(dgCards[0, dgCards.CurrentRow.Index].Value.ToString()); FPersCards frmCards = new FPersCards(); frmCards.ShowDialog(); Reload(); } catch { MessageBox.Show("Выберите Личную карточку", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }