public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,IsActive")] HeadHunter headHunter)
        {
            if (id != headHunter.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(headHunter);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!HeadHunterExists(headHunter.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(headHunter));
        }
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,IsActive")] HeadHunter headHunter)
        {
            if (ModelState.IsValid)
            {
                _context.Add(headHunter);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(headHunter));
        }
//[ValidateAntiForgeryToken]
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,IsActive")] HeadHunter headHunter)
        {
            if (ModelState.IsValid)
            {
                _context.Add(headHunter);
                await _context.SaveChangesAsync();

                return(Ok());
            }
            return(new JsonResult(headHunter));
        }
Beispiel #4
0
        public IEnumerable <Speciality> GetSpecialityByHeadhunterJob(HeadHunter h)
        {
            IEnumerable <Job> lj = uof.GetRepository <Job>().GetMany(p => p.Headhunter == h);
            List <Speciality> ls = new List <Speciality>();

            foreach (var item in lj)
            {
                ls.AddRange(item.Specialities);
            }

            return(ls.Distinct());
        }
        static void Main(string[] args)
        {
            var jobSeeker  = new JobSeeker("Martin");
            var jobSeekers = new List <IObserver>
            {
                new JobSeeker("Tim"),
                new JobSeeker("Angela"),
                new JobSeeker("Jeff"),
            };

            var headHunter = new HeadHunter();

            headHunter.RegisterObserver(jobSeeker);
            headHunter.RegisterObservers(jobSeekers);

            headHunter.AddJob("Google job");
            headHunter.RemoveObserver(jobSeeker);
            headHunter.AddJob("Microsoft job");
        }
Beispiel #6
0
        public Form1()
        {
            InitializeComponent();
            hh       = new HeadHunter();
            path     = Path.GetTempPath();
            fullPath = path + fileName;
            m_menu   = new ContextMenu();
            m_menu.MenuItems.Add(new MenuItem("Exit", new System.EventHandler(Exit_Click)));
            notifyIcon1.ContextMenu = m_menu;
            timer1.Interval         = (int)new TimeSpan(0, 1, 0).TotalMilliseconds;
            SetAutorunValue(true);
            notifyIcon1.Icon    = Properties.Resources.hh;
            notifyIcon1.Visible = true;

            if (File.Exists(fullPath))
            {
                string file     = File.ReadAllText(fullPath);
                string login    = file.Split(' ')[0];
                string password = file.Split(' ')[1];
                hh.Authentication(login, password);
            }
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            //Simulation de la création de deux users, Jobseeker and HeadHunter

            //Jobseeker
            //Un Jobseeker posséde des certifs, des formations et des skills et quelques notifications et aucun posts


            //tes
            Formation formation = new Formation()
            {
                dateStart = new DateTime(2010, 1, 31),
                dateEnd   = new DateTime(2016, 2, 22),
                ecole     = "ESPRIT",
            };

            Certification certification = new Certification()
            {
                dateStart = new DateTime(2010, 1, 31),
                dateEnd   = new DateTime(2011, 2, 22),
                centre    = "LPI MAGHREB",
                title     = "LPIC 1",
            };

            Notification notification = new Notification()
            {
                date        = DateTime.Now,
                seen        = false,
                type        = TypeNotification.User,
                description = "Bienvenu parmis nous !",
            };

            Skill skill = new Skill()
            {
                name     = "C++",
                category = Category.Desktop,
            };

            List <Formation> listFormation = new List <Formation>();

            listFormation.Add(formation);

            List <Certification> listCertification = new List <Certification>();

            listCertification.Add(certification);

            List <Notification> listNotification = new List <Notification>();

            listNotification.Add(notification);

            List <Skill> listSkill = new List <Skill>();

            listSkill.Add(skill);



            JobSeeker firstJobSeeker = new JobSeeker()
            {
                fullName = new FullName()
                {
                    firstName  = "Ahmed",
                    secondName = "Marzouki"
                },
                birthDate = new DateTime(1993, 1, 22),
                email     = "*****@*****.**",
                address   = new Address()
                {
                    city       = "Hamem lenf",
                    country    = "Ben Arrous",
                    postalCode = 2500,
                    state      = "Tunisie",
                    street     = "Informatique"
                },
                password        = "******",
                confirmPassword = "******",
                login           = "******",
                image           = "/images/ahmed_marzouki",
                experience      = new Experience()
                {
                    years = 5
                },
                dateCreationAccount = DateTime.Now,
                formations          = listFormation,
                certifications      = listCertification,
                notifications       = listNotification,
                skills       = listSkill,
                offers       = null,
                posts        = null,
                reclamations = null,
                stateAccount = 0
            };

            EBuyService eBuyService = new EBuyService();



            //HeadHunter
            //Un headHunter posséde des notification et des offres

            Evaluation evaluation = new Evaluation()
            {
                date = DateTime.Now,
                mark = 5,
            };

            List <Evaluation> listEvaluation = new List <Evaluation>();

            listEvaluation.Add(evaluation);



            Offer offer = new Offer()
            {
                dateStart   = new DateTime(2017, 2, 21),
                dateEnd     = new DateTime(2019, 2, 21),
                description = "Premier Offer posté",
                evaluations = listEvaluation,
                posts       = null,
                salary      = 5000,
                seen        = 0,
                state       = 0,
                typeOffer   = TypeOffer.CDI
            };

            List <Offer> listOffer = new List <Offer>();

            listOffer.Add(offer);


            HeadHunter firstHeadHunter = new HeadHunter()
            {
                fullName = new FullName()
                {
                    firstName  = "Safwene",
                    secondName = "Ben Aich"
                },
                birthDate = new DateTime(1995, 1, 31),
                email     = "*****@*****.**",
                address   = new Address()
                {
                    city       = "Bizerte Ville",
                    country    = "Bizerte",
                    postalCode = 7000,
                    state      = "Bizerte",
                    street     = "Informatique"
                },
                password        = "******",
                confirmPassword = "******",
                login           = "******",
                image           = "/images/safwene_benaich",
                entreprise      = new Entreprise()
                {
                    domain = "Informatique",
                    name   = "GOOGLE"
                },

                dateCreationAccount = DateTime.Now,
                formations          = null,
                certifications      = null,
                notifications       = null,
                skills       = null,
                offers       = listOffer,
                posts        = null,
                reclamations = null,
                stateAccount = 0
            };

            eBuyService.CreateUser(firstJobSeeker);
            System.Console.WriteLine(firstJobSeeker.email);
            eBuyService.CreateUser(firstHeadHunter);
            System.Console.WriteLine(firstHeadHunter.email);
            System.Console.ReadKey();
        }
Beispiel #8
0
 void Start()
 {
     body = manager.GetComponent <HeadHunter>();
 }
Beispiel #9
0
        private void bunifuImageButton11_Click(object sender, EventArgs e)
        {
            HeadHunter popup = new HeadHunter();

            popup.Show();
        }