示例#1
0
        public frmLoad(HugoLand.Controller.MondeController mondeControll, HugoLand.Model.HugoWorldEntities context)
        {
            InitializeComponent();
            _context = context;
            _mondeController = mondeControll;

            List<Monde> lstmondes = _mondeController.GetListMonde();
            dataGridView1.DataSource = lstmondes;
        }
示例#2
0
        public frmLoad(HugoLand.Controller.MondeController mondeControll, HugoLand.Model.HugoWorldEntities context)
        {
            InitializeComponent();
            _context         = context;
            _mondeController = mondeControll;

            List <Monde> lstmondes = _mondeController.GetListMonde();

            dataGridView1.DataSource = lstmondes;
        }
示例#3
0
        /// <summary>
        /// Supprime le monde selectionné
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 1)
            {
                _mondeController.DeleteMonde((int)dataGridView1.SelectedRows[0].Cells[0].Value);


                List <Monde> lstmondes = _mondeController.GetListMonde();
                dataGridView1.DataSource = lstmondes;
            }
        }