public static PieceJointe MonterPieceJointe( string titre, string document = null, string attestation = null, string professionnel = null) { var pieceJointe = new PieceJointe { Titre = titre }; if (document is not null) { pieceJointe.Document = new Document { NomFichier = document } } ; if (attestation is not null) { pieceJointe.Attestation = new Attestation { Nom = attestation } } ; if (professionnel is not null) { pieceJointe.Attestation.Professionnel = new Professionnel { Nom = professionnel } } ; return(pieceJointe); } } }
public PieceJointeLivretVM(String pstrLivret) : base() { if (pstrLivret == "L1") { ThePiecejointe = new PieceJointeL1(); } else { ThePiecejointe = new PieceJointeL2(); } strLivret = pstrLivret; }
public PieceJointeLivretVM(PieceJointe pPieceJointe, String pLivret) : base(pPieceJointe) { ThePiecejointe = pPieceJointe; strLivret = pLivret; }