コード例 #1
0
        private async Task <IActionResult> Document(KeyDocSansType keyDocSansType, TypeCLF type)
        {
            if (keyDocSansType is null)
            {
                throw new System.ArgumentNullException(nameof(keyDocSansType));
            }

            vérificateur.Initialise(keyDocSansType);
            try
            {
                await ClientDeLAction();
                await UtilisateurEstClientPasFerméOuFournisseur();
            }
            catch (VérificationException)
            {
                return(vérificateur.Erreur);
            }

            CLFDocs document = await _service.Document(vérificateur.Site, keyDocSansType, type);

            if (document == null)
            {
                return(NotFound());
            }

            return(Ok(document));
        }
コード例 #2
0
        // utile

        public static TypeCLF TypeBon(TypeCLF typeSynthèse)
        {
            return(typeSynthèse switch
            {
                TypeCLF.Livraison => TypeCLF.Commande,
                TypeCLF.Facture => TypeCLF.Livraison,
                _ => throw new ArgumentOutOfRangeException(nameof(typeSynthèse)),
            });