Exemplo n.º 1
0
        private void detailTheme_Click(object sender, EventArgs e)
        {
            var frmDetails = new frmDetTheme();

            frmDetails.modifierChamp("m");

            frmDetails.Show();
        }
Exemplo n.º 2
0
        private void detailTheme_Click(object sender, EventArgs e)
        {
            var frmDetails = new frmDetTheme();

            frmDetails.modifierChamp("m");

            frmDetails.Show();
        }
Exemplo n.º 3
0
        private void ajoutTheme_Click(object sender, EventArgs e)
        {
            var frmDetails = new frmDetTheme();

            frmDetails.modifierChamp("a");

            frmDetails.ShowDialog();
        }
Exemplo n.º 4
0
 private void ajoutTheme_Click(object sender, EventArgs e)
 {
     var frmDetails = new frmDetTheme(lvlAcces);
     frmDetails.modifierChamp("a");
     frmDetails.ShowDialog();
     update();
     frmDetails.Closed += (s, args) => this.Close();
     if (frmDetails.themeSelect != null)
     {
         int R = gestionTheme.RowsByID(frmDetails.themeSelect.idTheme, GridTheme);
         GridTheme.Rows[R].Cells[1].Selected = true;
         GridTheme.Rows[R].Selected = true;
     }
 }
Exemplo n.º 5
0
        private void modifierTheme()
        {
            var frmDetails = new frmDetTheme(lvlAcces);
            Theme themeSelect = new Theme();
            int index = GridTheme.SelectedRows[0].Index;

            themeSelect.idTheme = Convert.ToInt32(GridTheme.Rows[index].Cells[0].Value);
            themeSelect.nomTheme = (string)GridTheme.Rows[index].Cells[1].Value;
            themeSelect.comTheme = (string)GridTheme.Rows[index].Cells[2].Value;

            frmDetails.themeSelect = themeSelect;
            frmDetails.modifierChamp("m");

            frmDetails.ShowDialog();
            frmDetails.Closed += (s, args) => this.Close();
            update();
            if (frmDetails.themeSelect.idTheme != themeSelect.idTheme && frmDetails.themeSelect.idTheme != 0)
            {
                int R = gestionTheme.RowsByID(frmDetails.themeSelect.idTheme, GridTheme);
                GridTheme.Rows[R].Cells[1].Selected = true;
                GridTheme.Rows[R].Selected = true;
            }
            else if (frmDetails.themeSelect.idTheme != 0)
            {
                if (GridTheme.RowCount > ligneSelect)
                {
                    GridTheme.Rows[ligneSelect].Cells[1].Selected = true;
                    GridTheme.Rows[ligneSelect].Selected = true;
                }
                else
                {
                    GridTheme.Rows[ligneSelect - 1].Cells[1].Selected = true;
                    GridTheme.Rows[ligneSelect - 1].Selected = true;
                }
            }
        }
Exemplo n.º 6
0
        private void btnCopier_Click(object sender, EventArgs e)
        {
            Theme info = new Theme();
            frmDetTheme formOuvert;

            info.idTheme = CompterNb();
            info.comTheme = txtCommentaire.Text;
            info.nomTheme = txtNom.Text;

            formOuvert = new frmDetTheme(info);
            formOuvert.Tag = "Copie";
            formOuvert.remplirChamp();
            formOuvert.btnCopier.Enabled = false;
            formOuvert.btnSupprimer.Enabled = false;
            formOuvert.btnActiverModif.Enabled = false;
            formOuvert.txtId.Text = "";
            formOuvert.ShowDialog();
            if (formOuvert.exit == false)
                this.Close();
            formOuvert.Closed += (s, args) => this.Close();
        }
Exemplo n.º 7
0
        private void modifierTheme()
        {
            var frmDetails = new frmDetTheme();
            Theme themeSelect = new Theme();
            int index = GridTheme.SelectedRows[0].Index;

            themeSelect.idTheme = Convert.ToInt32(GridTheme.Rows[index].Cells[0].Value);
            themeSelect.nomTheme = (string)GridTheme.Rows[index].Cells[1].Value;
            themeSelect.comTheme = (string)GridTheme.Rows[index].Cells[2].Value;

            frmDetails.themeSelect = themeSelect;
            frmDetails.modifierChamp("m");

            frmDetails.ShowDialog();
            frmDetails.Closed += (s, args) => this.Close();
            update();
        }