Exemple #1
0
        private void btnEncaisser_Click(object sender, EventArgs e)
        {
            //Ouvre la page "Rendu" en lui donnant les paramètres néscessaires afin d'afficher les coupures et la somme à rendre
            int[] Coupure = { Convert.ToInt32(num1000.Value), Convert.ToInt32(num200.Value), Convert.ToInt32(num100.Value), Convert.ToInt32(num50.Value), Convert.ToInt32(num20.Value), Convert.ToInt32(num10.Value), Convert.ToInt32(num5.Value), Convert.ToInt32(num2.Value), Convert.ToInt32(num1.Value), Convert.ToInt32(num05.Value), Convert.ToInt32(num02.Value), Convert.ToInt32(num01.Value), Convert.ToInt32(num005.Value) };

            Rendu = new Rendu(Caisse.Encaissement(Total, Coupure, ArgentDonne), Reste * -1, Vente, this);
            Rendu.ShowDialog();
        }
Exemple #2
0
 /// <summary>
 /// Constructeur de la form
 /// </summary>
 /// <param name="C">Classe caisse</param>
 public Vente(Caisse C)
 {
     InitializeComponent();
     Caisse = C;
     //"Grisage" des boutons que l'utilisateur est censé ne pas pouvoir utiliser pour l'instant
     btnAjouterPrix.Enabled   = false;
     btnSupprimerPrix.Enabled = false;
     btnPaiement.Enabled      = false;
 }
Exemple #3
0
        /// <summary>
        /// Constructreur de la classe Encaissement
        /// </summary>
        /// <param name="TotalAPayer">Prix total à payer</param>
        /// <param name="C">classe "Caisse"</param>
        /// <param name="V">classe "Vente"</param>
        public Encaissement(decimal TotalAPayer, Caisse C, Vente V)
        {
            InitializeComponent();
            Total         = TotalAPayer;
            tbxTotal.Text = Convert.ToString(Total) + " Fr";

            Caisse = C;
            Vente  = V;
        }
Exemple #4
0
        /// <summary>
        /// Constructeur de la form FondDeCaisse
        /// </summary>
        /// <param name="C">Classe "Caisse"</param>
        public FondDeCaisse(Caisse C)
        {
            this.Caisse = C;

            InitializeComponent();
            int[] FR = C.returnNumberOfMoney();
            //Initialisation des label afin d'afficher le nombre de billet de chaque
            this.lbl1000.Text = "x " + Convert.ToString(FR[0]);
            this.lbl200.Text  = "x " + Convert.ToString(FR[1]);
            this.lbl100.Text  = "x " + Convert.ToString(FR[2]);
            this.lbl50.Text   = "x " + Convert.ToString(FR[3]);
            this.lbl20.Text   = "x " + Convert.ToString(FR[4]);
            this.lbl10.Text   = "x " + Convert.ToString(FR[5]);
            this.lbl5.Text    = "x " + Convert.ToString(FR[6]);
            this.lbl2.Text    = "x " + Convert.ToString(FR[7]);
            this.lbl1.Text    = "x " + Convert.ToString(FR[8]);
            this.lbl05.Text   = "x " + Convert.ToString(FR[9]);
            this.lbl02.Text   = "x " + Convert.ToString(FR[10]);
            this.lbl01.Text   = "x " + Convert.ToString(FR[11]);
            this.lbl005.Text  = "x " + Convert.ToString(FR[12]);
            lblTotal.Text     = "Fond de caisse : CHF " + Convert.ToString(C.CalculTotal());
        }
Exemple #5
0
 /// <summary>
 /// Constructeur de la form "inclusionFondDeCaisse"
 /// </summary>
 /// <param name="C">model "Caisse"</param>
 public inclusionFondCaisse(Caisse C)
 {
     InitializeComponent();
     this.Caisse = C;
 }
Exemple #6
0
 public Form1()
 {
     InitializeComponent();
     //Création de la caisse
     Caisse = new Caisse();
 }