private void CmdAgregar_Click(object sender, EventArgs e)
        {
            FrmEdCafeteria frm = new FrmEdCafeteria();

            frm.LlenarCombox();
            frm.ShowDialog();
        }
示例#2
0
        private void DgvCafeteria_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow row       = DgvCafeteria.SelectedRows[0];
            Cafeteria       cafeteria = new Cafeteria
            {
                ID          = int.Parse(row.Cells[0].Value.ToString()),
                Descripcion = row.Cells[1].Value.ToString(),
                ID_Campus   = int.Parse(row.Cells[2].Value.ToString()),
                Encargado   = int.Parse(row.Cells[4].Value.ToString()),
                Estado      = row.Cells[6].Value.ToString()
            };
            FrmEdCafeteria fed = new FrmEdCafeteria
            {
                cafeteria = cafeteria
            };

            fed.llenarCombox();

            fed.ShowDialog();
        }