Beispiel #1
0
        private void InsertCheque(AvoirForm f)
        {
            try
            {
                var cheque = new CHEQUE
                {
                    numCheque   = textBoxRef.Text,
                    description = textBoxDesc.Text,
                    codeBank    = (int)comboBoxBank.SelectedValue,
                    date        = dateTimePicker.Value.Date,
                    nom         = textBoxNom.Text,
                    montant     = decimal.Parse(textBoxMontant.Text)
                };
                f.ChequesBuffer = cheque;
            }

            catch (Exception ex)
            {
                Messages.Error(ex.Message);
            }
        }
Beispiel #2
0
        private void buttonGenerAvoir_Click(object sender, EventArgs e)
        {
            if (gridView.FocusedValue == null)
            {
                return;
            }
            if (gridView.GetSelectedRows().Count() == 0)
            {
                return;
            }
            var rows   = gridView.GetSelectedRows();
            var detail = new DetailsDossier();

            if (rows.Count() > 1)
            {
                var client = TableGetClientName(rows[0]);
                if (rows.Any(r => TableGetClientName(r) != client))
                {
                    Alert("Veuillez sélectionner les dossier d'un seul client !!");
                    return;
                }
            }
            else
            {
                //if it is validated
            }


            if (rows.Any(r => detail.GetState(TableGetID_GF(r)) != 2))
            {
                Alert("Seul les dossiers reçus peuvent être traité !!");
                return;
            }

            var avrf = new AvoirForm(GetSelectedGroups(rows).ToList(), TableGetTotal(rows));

            avrf.Closed += AvrfOnClosed;
            avrf.ShowDialog();
        }
Beispiel #3
0
 public NewchequeForm(AvoirForm av, decimal montant)
 {
     InitializeComponent();
     _montant = montant;
     _af      = av;
 }