Example #1
0
        private void edit_b_Click(object sender, EventArgs e)
        {
            int entry_n, typ_op;

            try
            {
                entry_n = int.Parse(Camion_Trans_DGV.CurrentRow.Cells["Entry N°"].Value.ToString());
                typ_op  = int.Parse(Camion_Trans_DGV.CurrentRow.Cells["Type Opération"].Value.ToString());
                switch (typ_op)
                {
                case 1:
                    EntreeStock form_s = new EntreeStock(entry_n);
                    form_s.ShowDialog();
                    getPesageTransList();
                    break;

                case 2:
                    SortieStock form_e = new SortieStock(entry_n);
                    form_e.ShowDialog();
                    getPesageTransList();
                    break;

                default:
                    break;
                }
            }
            catch
            {
            }
        }
Example #2
0
        private void pesage_2()
        {
            int    operation = 0, index = 0;
            double poids   = 0;
            int    entry_n = 0;

            try
            {
                operation = int.Parse(Camion_Trans_DGV.CurrentRow.Cells[0].Value.ToString());
                entry_n   = int.Parse(Camion_Trans_DGV.CurrentRow.Cells["Entry N°"].Value.ToString());
                index     = AfficheurBascule_lab.Text.IndexOf("kg");
                poids     = double.Parse(AfficheurBascule_lab.Text.Substring(0, index));
            }
            catch {}

            switch (operation)
            {
            case 1:
                EntreeStock form_1 = new EntreeStock(entry_n, poids);
                form_1.ShowDialog();
                getPesageTransList();
                break;

            case 2:
                SortieStock form_2 = new SortieStock(entry_n, poids);
                form_2.ShowDialog();
                getPesageTransList();
                break;

            default:
                break;
            }
        }
Example #3
0
        private void editer_but_Click(object sender, EventArgs e)
        {
            int    entry_n;
            string operation;

            try
            {
                operation = STOCK_DGV.CurrentRow.Cells["Type Operation"].Value.ToString();
                entry_n   = int.Parse(STOCK_DGV.CurrentRow.Cells["Header Entry N°"].Value.ToString());
            }
            catch { return; }

            switch (operation)
            {
            case "Entrée Stock":
                EntreeStock form_1 = new EntreeStock(entry_n);
                form_1.ShowDialog();
                getPesageList();
                break;

            case "Sortie Stock":
                SortieStock form_2 = new SortieStock(entry_n);
                form_2.ShowDialog();
                getPesageList();
                break;

            default:
                break;
            }
        }
Example #4
0
        private void pesage_1_Entre_handler(object sender, EventArgs e)
        {
            double poids = 0;

            try
            {
                int index = AfficheurBascule_lab.Text.IndexOf("kg");
                poids = double.Parse(AfficheurBascule_lab.Text.Substring(0, index));
            }
            catch {}

            EntreeStock form_ = new EntreeStock(poids);

            form_.ShowDialog();
            this.getPesageTransList();
        }