Exemplo n.º 1
0
        private void OtvorRecepturu()
        {
            int    idj   = (int)dgvJedla.SelectedRows[0].Cells["IdJ"].Value;
            string nazov = (string)dgvJedla.SelectedRows[0].Cells["Jedlo"].Value;

            frmReceptura frmRep = new frmReceptura(idj, nazov);

            frmRep.StartPosition = FormStartPosition.CenterScreen;
            frmRep.ShowDialog();
            frmRep.Dispose();
        }
Exemplo n.º 2
0
        private void DgvJedla_DoubleClick(object sender, EventArgs e)
        {
            if (dgvJedla.CurrentRow == null)
            {
                return;
            }

            int    id1   = (int)dgvJedla.CurrentRow.Cells["IdJ"].Value;
            string nazov = (string)dgvJedla.CurrentRow.Cells["Jedlo"].Value;

            frmReceptura frm = new frmReceptura(id1, nazov, false);

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.ShowDialog();
            frm.Dispose();
        }