Example #1
0
        /// <summary>
        /// constructor for new entry pesage 2
        /// </summary>
        /// <param name="poids_bascule_"></param>
        /// <param name="owner_"></param>
        public EntreeStock(int entry_n, double poids_bascule_)
        {
            InitializeComponent();
            this.Text = "Entrée Stock : Pesage 2";
            operation = 1;
            _p        = PesageHeaderDao.getPesageHeader(entry_n);

            nticket_tb.Text       = _p.n_ticket;
            date_entree_dtp.Value = _p.date_entree;

            camion_cb.Text    = _p.matricule_camion;
            chauffeur_cb.Text = _p.nom_chauffeur;

            poids_recep_tb.Text = _p.poids_reception.ToString();
            //date_sortie_dtp.Value = _p.date_sortie; -->
            pesage1_tb.Text   = _p.pesage_1.ToString();
            pesage2_tb.Text   = poids_bascule_.ToString();
            poids_net_tb.Text = Math.Abs((double.Parse(pesage1_tb.Text) - double.Parse(pesage2_tb.Text))).ToString("0.000");

            // controls status
            nticket_tb.Enabled      = false;
            date_entree_dtp.Enabled = false;
            camion_cb.Enabled       = false;
            chauffeur_cb.Enabled    = false;
            pesage1_tb.Enabled      = false;
        }
Example #2
0
        /// <summary>
        /// constructor for update old entry
        /// </summary>
        /// <param name="poids_bascule_"></param>
        /// <param name="owner_"></param>
        /// <param name="entry_n"></param>
        public EntreeStock(int entry_n)
        {
            InitializeComponent();
            this.Text = "Entrée Stock : Modification Pesage";
            operation = 2;
            _p        = PesageHeaderDao.getPesageHeader(entry_n);

            // P1
            nticket_tb.Text       = _p.n_ticket;
            date_entree_dtp.Value = _p.date_entree;

            camion_cb.Text    = _p.matricule_camion;
            chauffeur_cb.Text = _p.nom_chauffeur;

            pesage1_tb.Text = _p.pesage_1.ToString();

            //P2
            poids_recep_tb.Text   = _p.poids_reception.ToString();
            date_sortie_dtp.Value = _p.date_sortie;
            pesage1_tb.Text       = _p.pesage_1.ToString();
            pesage2_tb.Text       = _p.pesage_2.ToString();
            poids_net_tb.Text     = _p.poids_net.ToString();
        }