예제 #1
0
        private void tsmAddFoodToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FoodInfoForm frm = new FoodInfoForm();

            frm.FormClosed += Frm_FormClosed;
            frm.Show(this);
        }
예제 #2
0
        private void tsmUpdateFoodToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dgvFoodList.SelectedRows.Count > 0)
            {
                DataGridViewRow selectrow = dgvFoodList.SelectedRows[0];
                DataRowView     rowview   = selectrow.DataBoundItem as DataRowView;

                FoodInfoForm frm = new FoodInfoForm();
                frm.FormClosed += new FormClosedEventHandler(Frm_FormClosed);
                frm.Show(this);

                frm.DisplayFoodInfo(rowview);
            }
        }