コード例 #1
0
        //Ajouter Type de Cuisine
        private void buttonAddType_Click(object sender, EventArgs e)
        {
            FormTypeCuisine f = new FormTypeCuisine();

            f.ShowDialog();
            PopulateGrids();
        }
コード例 #2
0
        //Modifier Type de Cuisine
        private void buttonModType_Click(object sender, EventArgs e)
        {
            int         id          = (int)dataGridViewTypesCuisine.SelectedRows[0].Cells[0].Value;
            TypeCuisine typeCuisine = TypeCuisineManager.GetAll().Find(x => x.id == id);

            if (id > 0)
            {
                FormTypeCuisine f = new FormTypeCuisine(typeCuisine);
                f.ShowDialog();
                PopulateGrids();
            }
        }