Exemplo n.º 1
0
        private void detailsMode_Click(object sender, EventArgs e)
        {
            var detailsMode = new frmDetMode();

            detailsMode.modifierChamp("m");

            detailsMode.ShowDialog();
        }
Exemplo n.º 2
0
        private void detailsMode_Click(object sender, EventArgs e)
        {
            var detailsMode = new frmDetMode();

            detailsMode.modifierChamp("m");

            detailsMode.ShowDialog();
        }
Exemplo n.º 3
0
        private void ajoutMode_Click(object sender,EventArgs e)
        {
            var detailsMode = new frmDetMode();

            if (dataGridMode.SelectedRows.Count == 0)
                detailsMode.Tag = "0";
            else
                detailsMode.Tag = this.Tag;

            detailsMode.modifierChamp("a");
            detailsMode.ShowDialog();
            if (detailsMode.Tag.ToString() == "0")
                this.Tag = "0";
            else
                this.Tag = detailsMode.Tag;
            update();
        }
Exemplo n.º 4
0
        public void btnCopier_Click(object sender, EventArgs e)
        {
            Mode cop = new Mode();
            frmDetMode frmCop;

            cop.nomMode = txtNom.Text;
            cop.descMode = rtxtDesc.Text;

            frmCop = new frmDetMode(cop);
            frmCop.Tag = "Copie";
            frmCop.remplirChamp();
            frmCop.btnCopier.Enabled = false;
            frmCop.btnSupprimer.Enabled = false;
            frmCop.btnActiverModif.Enabled = false;
            frmCop.ShowDialog();
            if (frmCop.annuler == false)
            {
                this.Close();
            }
            frmCop.Closed += (s, args) => this.Close();
        }
Exemplo n.º 5
0
        private void modifierMode()
        {
            var detailsMode = new frmDetMode();
            Mode modSelectionner = new Mode();
            int index = dataGridMode.SelectedRows[0].Index;

            modSelectionner.idMode = Int32.Parse((string)dataGridMode.Rows[index].Cells[0].Value);
            modSelectionner.nomMode = (string)dataGridMode.Rows[index].Cells[1].Value;
            modSelectionner.descMode = (string)dataGridMode.Rows[index].Cells[2].Value;

            detailsMode.Tag = modSelectionner.nomMode;
            detailsMode.modeSelect = modSelectionner;
            detailsMode.modifierChamp("m");
            detailsMode.ShowDialog();
            if (detailsMode.Tag.ToString() == "0")
                this.Tag = "0";
            else
                this.Tag = detailsMode.Tag;
            update();
        }