Ejemplo n.º 1
0
        public static void FillReportFacture(string Ref)
        {
            CurrentLigneFactures = new DalFacture().GetLigneFacturesByFacture(Ref);
            string Date    = CurrentLigneFactures.Rows[0][5].ToString();
            string Montant = CurrentLigneFactures.Rows[0][3].ToString();

            CurrentLigneFactures = MiseEnforme.AdaptDataTableLigneFacture(CurrentLigneFactures);
            System.Diagnostics.Process.Start(ExportDataTableToPdf(CurrentLigneFactures, Ref, Date, Montant));
        }
Ejemplo n.º 2
0
        private void TxtSearch_TextChanged(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(TxtSearch.Text.Trim()))
            {
                FillDtgListeLigneFactures(Fac.RefProp);
            }
            else
            {
                List <LigneFacture> Listefacture = new List <LigneFacture>();
                Listefacture = MyFactureDal.GetLigneFacturesList(Fac.RefProp);

                var query = from o in Listefacture
                            where o.RefProp.Contains(TxtSearch.Text) || o.PrixUProp >= float.Parse(TxtSearch.Text) ||
                            o.QuantProp >= Int32.Parse(TxtSearch.Text)
                            select o;
                DtgListeLigneFacture.DataSource = MiseEnforme.AdaptDataTableLigneFacture(query.ToList());
            }
        }
Ejemplo n.º 3
0
        public void FillDtgListeLigneFactures(string RefFacture)
        {
            CurrentDataTableLigneFactures = new DalFacture().GetLigneFacturesByFacture(RefFacture);

            CurrentDataTableLigneFactures = MiseEnforme.AdaptDataTableLigneFacture(CurrentDataTableLigneFactures);
            if (CurrentDataTableLigneFactures.Rows.Count == 0)
            {
                Btn_Modifier.Enabled    = false;
                Btn_Enregistrer.Enabled = false;
                Btn_SupprimerLF.Enabled = false;
            }
            else
            {
                Btn_Modifier.Enabled    = true;
                Btn_Enregistrer.Enabled = true;
                Btn_SupprimerLF.Enabled = true;
            }
            DtgListeLigneFacture.DataSource = CurrentDataTableLigneFactures;
        }