コード例 #1
0
        private void btcreerfacture_Click(object sender, EventArgs e)
        {
            object ob;

            ob = Program.tabvet.Compute("Sum(Total)", "MleClient='" + txtmle.Text + "'");
            Program.montant = Convert.ToDouble(ob);

            Infofacture formfacture = new Infofacture();

            formfacture.Show();
            this.Close();
        }
コード例 #2
0
        private void btmodifierclient_Click(object sender, EventArgs e)
        {
            switch (btmodifierclientele.Text)
            {
            case "Modifier":
                switch (Program.menu)
                {
                case "client":
                    gpmodifierclient.Enabled   = true;
                    btmodifierclientele.Text   = "Confirmer";
                    btsupprimerclientele.Text  = "Annuller";
                    btajouterclientele.Enabled = false;
                    break;

                case "facture":
                    Program.code_f = txtidvet.Text;
                    Infofacture modfacture = new Infofacture();
                    modfacture.Show();
                    break;
                }


                break;

            case "Confirmer":
                string mle  = txtmle.Text;
                string nm   = txtnom.Text;
                string prnm = txtprenom.Text;
                int    tel  = Int32.Parse(txttel.Text);
                string qutr = txtquartier.Text;

                Clients.Modifierclient(mle, nm, prnm, tel, qutr);
                btmodifierclientele.Text  = "Modifier";
                btsupprimerclientele.Text = "Supprimer";
                MessageBox.Show("Modification effectuée");
                gpmodifierclient.Enabled   = false;
                btajouterclientele.Enabled = true;
                gpmodifierclient.Enabled   = false;
                formulaireclientele_Load(null, null);
                break;
            }

            /*
             * if (Program.menu == "vetement")
             * {
             *  Program.btmodifier = "modifiervetement";
             *  formulairevetement formvet = new formulairevetement();
             *  formvet.Show();
             * }*/
        }