Esempio n. 1
0
        private void ModifierItem()
        {
            FORM_Item FI = new FORM_Item();

            FI.VISIBLE   = false;
            FI.CANMODIFY = true;
            FI.Text      = DGV_Liste.SelectedRows[0].Cells[1].Value.ToString();
            FI.IID       = int.Parse(DGV_Liste.SelectedRows[0].Cells[0].Value.ToString());
            FI.NOM       = DGV_Liste.SelectedRows[0].Cells[1].Value.ToString();
            FI.CLASSE    = DGV_Liste.SelectedRows[0].Cells[2].Value.ToString();
            FI.LEVEL     = int.Parse(DGV_Liste.SelectedRows[0].Cells[3].Value.ToString());
            FI.WATK      = int.Parse(DGV_Liste.SelectedRows[0].Cells[4].Value.ToString());
            FI.WDEF      = int.Parse(DGV_Liste.SelectedRows[0].Cells[5].Value.ToString());
            FI.MATK      = int.Parse(DGV_Liste.SelectedRows[0].Cells[6].Value.ToString());
            FI.MDEF      = int.Parse(DGV_Liste.SelectedRows[0].Cells[7].Value.ToString());
            FI.ISACTIVE  = DGV_Liste.SelectedRows[0].Cells[8].Value.ToString();
            FI.PRIX      = int.Parse(DGV_Liste.SelectedRows[0].Cells[9].Value.ToString());

            if (FI.ShowDialog() == DialogResult.OK)
            {
                if (Controle.updateItem(FI.IID, FI.NOM, FI.LEVEL, FI.WATK, FI.WDEF, FI.MATK, FI.MDEF, FI.ISACTIVE, FI.PRIX))
                {
                    Lister_Items();
                }
            }
        }
Esempio n. 2
0
        private void Consulter_Item()
        {
            FORM_Item FI = new FORM_Item();

            FI.Text     = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
            FI.IID      = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[0].Value.ToString());
            FI.NOM      = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
            FI.CLASSE   = DGV_Inventaire.SelectedRows[0].Cells[2].Value.ToString();
            FI.LEVEL    = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[3].Value.ToString());
            FI.WATK     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[4].Value.ToString());
            FI.WDEF     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[5].Value.ToString());
            FI.MATK     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[6].Value.ToString());
            FI.MDEF     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[7].Value.ToString());
            FI.QUANTITE = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[8].Value.ToString());
            FI.ISACTIVE = DGV_Inventaire.SelectedRows[0].Cells[9].Value.ToString();
            FI.PRIX     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[10].Value.ToString());

            if (FI.ShowDialog() == DialogResult.OK)
            {
                if (Controle.updateQuantityItem(JID, FI.IID, FI.QUANTITE))
                {
                    Lister_Items();
                }
            }
        }
Esempio n. 3
0
        private void Ajouter_Item()
        {
            FORM_Item FI = new FORM_Item();

            FI.VISIBLE = false;
            FI.Text    = "Ajout";

            if (FI.ShowDialog() == DialogResult.OK)
            {
                if (Controle.addItem(FI.NOM, FI.CLASSE, FI.LEVEL, FI.WATK, FI.WDEF, FI.MATK, FI.MDEF, FI.ISACTIVE, FI.PRIX))
                {
                    Lister_Items();
                }
            }
        }
Esempio n. 4
0
        private void ConsulterItem()
        {
            FORM_Item FI = new FORM_Item();

            FI.Text     = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
            FI.IID      = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[0].Value.ToString());
            FI.NOM      = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
            FI.CLASSE   = DGV_Inventaire.SelectedRows[0].Cells[2].Value.ToString();
            FI.LEVEL    = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[3].Value.ToString());
            FI.WATK     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[4].Value.ToString());
            FI.WDEF     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[5].Value.ToString());
            FI.MATK     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[6].Value.ToString());
            FI.MDEF     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[7].Value.ToString());
            FI.ISACTIVE = DGV_Inventaire.SelectedRows[0].Cells[8].Value.ToString();
            FI.PRIX     = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[9].Value.ToString());
            FI.VISIBLE  = false;
            FI.ShowDialog();
        }
Esempio n. 5
0
        private void Consulter_Item()
        {
            FORM_Item FI = new FORM_Item();
            FI.Text = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
            FI.IID = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[0].Value.ToString());
            FI.NOM = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
            FI.CLASSE = DGV_Inventaire.SelectedRows[0].Cells[2].Value.ToString();
            FI.LEVEL = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[3].Value.ToString());
            FI.WATK = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[4].Value.ToString());
            FI.WDEF = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[5].Value.ToString());
            FI.MATK = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[6].Value.ToString());
            FI.MDEF = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[7].Value.ToString());
            FI.QUANTITE = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[8].Value.ToString());
            FI.ISACTIVE = DGV_Inventaire.SelectedRows[0].Cells[9].Value.ToString();
            FI.PRIX = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[10].Value.ToString());

            if (FI.ShowDialog() == DialogResult.OK)
            {
                if (Controle.updateQuantityItem(JID, FI.IID, FI.QUANTITE))
                    Lister_Items();
            }
        }
Esempio n. 6
0
 private void ConsulterItem()
 {
     FORM_Item FI = new FORM_Item();
     FI.Text = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
     FI.IID = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[0].Value.ToString());
     FI.NOM = DGV_Inventaire.SelectedRows[0].Cells[1].Value.ToString();
     FI.CLASSE = DGV_Inventaire.SelectedRows[0].Cells[2].Value.ToString();
     FI.LEVEL = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[3].Value.ToString());
     FI.WATK = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[4].Value.ToString());
     FI.WDEF = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[5].Value.ToString());
     FI.MATK = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[6].Value.ToString());
     FI.MDEF = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[7].Value.ToString());
     FI.ISACTIVE = DGV_Inventaire.SelectedRows[0].Cells[8].Value.ToString();
     FI.PRIX = int.Parse(DGV_Inventaire.SelectedRows[0].Cells[9].Value.ToString());
     FI.VISIBLE = false;
     FI.ShowDialog();
 }
Esempio n. 7
0
        private void Ajouter_Item()
        {
            FORM_Item FI = new FORM_Item();
            FI.VISIBLE = false;
            FI.Text = "Ajout";

            if (FI.ShowDialog() == DialogResult.OK)
            {
                if (Controle.addItem(FI.NOM, FI.CLASSE, FI.LEVEL, FI.WATK, FI.WDEF, FI.MATK, FI.MDEF, FI.ISACTIVE, FI.PRIX))
                    Lister_Items();
            }
        }
Esempio n. 8
0
        private void ModifierItem()
        {
            FORM_Item FI = new FORM_Item();
            FI.VISIBLE = false;
            FI.CANMODIFY = true;
            FI.Text = DGV_Liste.SelectedRows[0].Cells[1].Value.ToString();
            FI.IID = int.Parse(DGV_Liste.SelectedRows[0].Cells[0].Value.ToString());
            FI.NOM = DGV_Liste.SelectedRows[0].Cells[1].Value.ToString();
            FI.CLASSE = DGV_Liste.SelectedRows[0].Cells[2].Value.ToString();
            FI.LEVEL = int.Parse(DGV_Liste.SelectedRows[0].Cells[3].Value.ToString());
            FI.WATK = int.Parse(DGV_Liste.SelectedRows[0].Cells[4].Value.ToString());
            FI.WDEF = int.Parse(DGV_Liste.SelectedRows[0].Cells[5].Value.ToString());
            FI.MATK = int.Parse(DGV_Liste.SelectedRows[0].Cells[6].Value.ToString());
            FI.MDEF = int.Parse(DGV_Liste.SelectedRows[0].Cells[7].Value.ToString());
            FI.ISACTIVE = DGV_Liste.SelectedRows[0].Cells[8].Value.ToString();
            FI.PRIX = int.Parse(DGV_Liste.SelectedRows[0].Cells[9].Value.ToString());

            if (FI.ShowDialog() == DialogResult.OK)
            {
                if (Controle.updateItem(FI.IID, FI.NOM, FI.LEVEL, FI.WATK, FI.WDEF, FI.MATK, FI.MDEF, FI.ISACTIVE, FI.PRIX))
                    Lister_Items();
            }
        }