Пример #1
0
        public void ImprimerImage()
        {
            DBAccueil dt = new DBAccueil();
            List <ObjDOCUMENTSCANNE> leDocument = new List <ObjDOCUMENTSCANNE>();
            int nbr = 0;

            while (nbr == 0)
            {
                leDocument = new DBAccueil().Select_DocumentNonMigre();
                foreach (ObjDOCUMENTSCANNE image in leDocument)
                {
                    SqlCommand laCommande = DBBase.InitTransaction(ConnectionString);
                    dt.CreateFiles(image.CONTENU, image.CHEMINCOPY, image.NOMDUFICHIER);
                    image.CONTENU = null;
                    image.ismigre = true;
                    dt.InsertOrUpdateDocumentScane(image, laCommande);
                    laCommande.Transaction.Commit();
                }
                nbr = leDocument.Where(p => p.CONTENU != null).Count();
            }
        }