Ejemplo n.º 1
0
        private Client AssemblerClient(CVSection clientSection, Employeur emp)
        {
            Client        client  = new Client();
            List <Mandat> mandats = new List <Mandat>();

            XmlDocParagraph emplDesc = (XmlDocParagraph)clientSection.Nodes.DefaultIfEmpty(null).FirstOrDefault(x => x is XmlDocParagraph);

            ClientGraphRepository clientGraphRepository = new ClientGraphRepository();

            if (emplDesc != null)
            {
                string[] info = emplDesc.GetLinesWithTab();
                client.Nom = string.Join(" ", info);
                client     = clientGraphRepository.CreateIfNotExists(new Dictionary <string, object> {
                    { "Nom", client.Nom }
                });
            }

            mandats.AddRange(AssemblerMandats(clientSection));
            mandats.ForEach(x =>
            {
                x.Projet.Client           = client;
                x.Projet.SocieteDeConseil = emp;
            });

            conseiller.Mandats.AddRange(mandats);

            return(client);
        }
Ejemplo n.º 2
0
 public CVMandatController()
 {
     utilisateurGraphRepository   = new UtilisateurGraphRepository();
     editionObjectGraphRepository = new EditionObjectGraphRepository();
     mandatGraphRepository        = new MandatGraphRepository();
     projetGraphRepository        = new ProjetGraphRepository();
     clientGraphRepository        = new ClientGraphRepository();
     employeurGraphRepository     = new EmployeurGraphRepository();
     technologieGraphRepository   = new TechnologieGraphRepository();
     fonctionGraphRepository      = new FonctionGraphRepository();
     tacheGraphRepository         = new TacheGraphRepository();
     conseillerGraphRepository    = new ConseillerGraphRepository();
 }