Exemple #1
0
        public async Task <IActionResult> Create(CompanyDetails companyDetails)
        {
            if (ModelState.IsValid)
            {
                var config = new MapperConfiguration(cfg => { cfg.CreateMap <CompanyProfile, CompanyProfilePoco>();
                                                              cfg.CreateMap <CompanyDescriptionModel, CompanyDescriptionPoco>(); });
                var mapper = config.CreateMapper();
                CompanyProfilePoco companyProfilePoco = mapper.Map <CompanyProfilePoco>(companyDetails.companyProfile);
                companyProfilePoco.Id = Guid.NewGuid();

                CompanyDescriptionPoco companyDescriptionPoco =
                    mapper.Map <CompanyDescriptionPoco>(companyDetails.companyDescription);

                companyDescriptionPoco.Id      = Guid.NewGuid();
                companyDescriptionPoco.Company = companyProfilePoco.Id;
                var lang = _context.SystemLanguageCodes.Where(l => l.Name == companyDetails.companyDescription.LanguageId).FirstOrDefault();
                companyDescriptionPoco.LanguageId = lang.LanguageID;
                _context.Add(companyProfilePoco);
                _context.Add(companyDescriptionPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Details), new { id = companyProfilePoco.Id }));
            }
            return(View(companyDetails));
        }
        public async Task <IActionResult> Create([Bind("Code,Name")] SystemCountryCodePoco systemCountryCodePoco)
        {
            if (ModelState.IsValid)
            {
                _context.Add(systemCountryCodePoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(systemCountryCodePoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Role,IsInactive")] SecurityRolePoco securityRolePoco)
        {
            if (ModelState.IsValid)
            {
                securityRolePoco.Id = Guid.NewGuid();
                _context.Add(securityRolePoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(securityRolePoco));
        }
        public async Task <IActionResult> Create([Bind("Id,RegistrationDate,CompanyWebsite,ContactPhone,ContactName,CompanyLogo")] CompanyProfilePoco companyProfilePoco)
        {
            if (ModelState.IsValid)
            {
                companyProfilePoco.Id = Guid.NewGuid();
                _context.Add(companyProfilePoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(companyProfilePoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Login,Password,Created,PasswordUpdate,AgreementAccepted,IsLocked,IsInactive,EmailAddress,PhoneNumber,FullName,ForceChangePassword,PrefferredLanguage,TimeStamp")] SecurityLoginPoco securityLoginPoco)
        {
            if (ModelState.IsValid)
            {
                securityLoginPoco.Id = Guid.NewGuid();
                _context.Add(securityLoginPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(securityLoginPoco));
        }
Exemple #6
0
        public async Task <IActionResult> Create([Bind("Id,Applicant,Resume,LastUpdated")] ApplicantResumePoco applicantResumePoco)
        {
            if (ModelState.IsValid)
            {
                applicantResumePoco.Id = Guid.NewGuid();
                _context.Add(applicantResumePoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Applicant"] = new SelectList(_context.ApplicantProfiles, "Id", "City", applicantResumePoco.Applicant);
            return(View(applicantResumePoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Company,CountryCode,Province,Street,City,PostalCode")] CompanyLocationPoco companyLocationPoco)
        {
            if (ModelState.IsValid)
            {
                companyLocationPoco.Id = Guid.NewGuid();
                _context.Add(companyLocationPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Company"] = new SelectList(_context.CompanyProfiles, "Id", "Id", companyLocationPoco.Company);
            return(View(companyLocationPoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Job,JobName,JobDescriptions")] CompanyJobDescriptionPoco companyJobDescriptionPoco)
        {
            if (ModelState.IsValid)
            {
                companyJobDescriptionPoco.Id = Guid.NewGuid();
                _context.Add(companyJobDescriptionPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Job"] = new SelectList(_context.CompanyJobs, "Id", "Id", companyJobDescriptionPoco.Job);
            return(View(companyJobDescriptionPoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Company,ProfileCreated,IsInactive,IsCompanyHidden")] CompanyJobPoco companyJobPoco)
        {
            if (ModelState.IsValid)
            {
                companyJobPoco.Id = Guid.NewGuid();
                _context.Add(companyJobPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Company"] = new SelectList(_context.CompanyProfiles, "Id", "Id", companyJobPoco.Company);
            return(View(companyJobPoco));
        }
Exemple #10
0
        public async Task <IActionResult> Create([Bind("Id,Applicant,Skill,SkillLevel,StartMonth,StartYear,EndMonth,EndYear")] ApplicantSkillPoco applicantSkillPoco)
        {
            if (ModelState.IsValid)
            {
                applicantSkillPoco.Id = Guid.NewGuid();
                _context.Add(applicantSkillPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Applicant"] = new SelectList(_context.ApplicantProfiles, "Id", "Id", applicantSkillPoco.Applicant);
            return(View(applicantSkillPoco));
        }
Exemple #11
0
        public async Task <IActionResult> JobSave(Guid id)
        {
            var applicantJobPoco = new ApplicantJobApplicationPoco();

            applicantJobPoco.Id              = Guid.NewGuid();
            applicantJobPoco.Job             = id;
            applicantJobPoco.Applicant       = Guid.Parse(TempData["Applicant"].ToString());
            applicantJobPoco.ApplicationDate = DateTime.Today;
            _context.Add(applicantJobPoco);
            await _context.SaveChangesAsync();

            return(RedirectToAction("Details", new { id = applicantJobPoco.Applicant }));
        }
        public async Task <IActionResult> Create([Bind("Id,Login,SourceIP,LogonDate,IsSuccesful")] SecurityLoginsLogPoco securityLoginsLogPoco)
        {
            if (ModelState.IsValid)
            {
                securityLoginsLogPoco.Id = Guid.NewGuid();
                _context.Add(securityLoginsLogPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Login"] = new SelectList(_context.SecurityLogins, "Id", "Id", securityLoginsLogPoco.Login);
            return(View(securityLoginsLogPoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent,TimeStamp")] ApplicantEducationPoco applicantEducationPoco)
        {
            if (ModelState.IsValid)
            {
                applicantEducationPoco.Id = Guid.NewGuid();
                _context.Add(applicantEducationPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Applicant"] = new SelectList(_context.ApplicantProfiles, "Id", "Id", applicantEducationPoco.Applicant);
            return(View(applicantEducationPoco));
        }
Exemple #14
0
        public async Task <IActionResult> Create([Bind("Id,Login,CurrentSalary,CurrentRate,Currency,Country,Province,Street,City,PostalCode")] ApplicantProfilePoco applicantProfilePoco)
        {
            if (ModelState.IsValid)
            {
                applicantProfilePoco.Id = Guid.NewGuid();
                _context.Add(applicantProfilePoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Login"]   = new SelectList(_context.SecurityLogins, "Id", "Id", applicantProfilePoco.Login);
            ViewData["Country"] = new SelectList(_context.SystemCountryCodes, "Code", "Code", applicantProfilePoco.Country);
            return(View(applicantProfilePoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Applicant,CompanyName,CountryCode,Location,JobTitle,JobDescription,StartMonth,StartYear,EndMonth,EndYear,TimeStamp")] ApplicantWorkHistoryPoco applicantWorkHistoryPoco)
        {
            if (ModelState.IsValid)
            {
                applicantWorkHistoryPoco.Id = Guid.NewGuid();
                _context.Add(applicantWorkHistoryPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Applicant"]   = new SelectList(_context.ApplicantProfiles, "Id", "Id", applicantWorkHistoryPoco.Applicant);
            ViewData["CountryCode"] = new SelectList(_context.SystemCountryCodes, "Code", "Code", applicantWorkHistoryPoco.CountryCode);
            return(View(applicantWorkHistoryPoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Company,LanguageId,CompanyName,CompanyDescription")] CompanyDescriptionPoco companyDescriptionPoco)
        {
            if (ModelState.IsValid)
            {
                companyDescriptionPoco.Id = Guid.NewGuid();
                _context.Add(companyDescriptionPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Company"]    = new SelectList(_context.CompanyProfiles, "Id", "Id", companyDescriptionPoco.Company);
            ViewData["LanguageId"] = new SelectList(_context.SystemLanguageCodes, "LanguageID", "LanguageID", companyDescriptionPoco.LanguageId);
            return(View(companyDescriptionPoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Applicant,Job,ApplicationDate")] ApplicantJobApplicationPoco applicantJobApplicationPoco)
        {
            if (ModelState.IsValid)
            {
                applicantJobApplicationPoco.Id = Guid.NewGuid();
                _context.Add(applicantJobApplicationPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Applicant"] = new SelectList(_context.ApplicantProfiles, "Id", "Id", applicantJobApplicationPoco.Applicant);
            ViewData["Job"]       = new SelectList(_context.CompanyJobs, "Id", "Id", applicantJobApplicationPoco.Job);
            return(View(applicantJobApplicationPoco));
        }
Exemple #18
0
        public async Task <IActionResult> Create([Bind("Id,Login,Role")] SecurityLoginsRolePoco securityLoginsRolePoco)
        {
            if (ModelState.IsValid)
            {
                securityLoginsRolePoco.Id = Guid.NewGuid();
                _context.Add(securityLoginsRolePoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["Login"] = new SelectList(_context.SecurityLogins, "Id", "EmailAddress", securityLoginsRolePoco.Login);
            ViewData["Role"]  = new SelectList(_context.SecurityRoles, "Id", "Role", securityLoginsRolePoco.Role);
            return(View(securityLoginsRolePoco));
        }
Exemple #19
0
        public async Task <IActionResult> Create(SecurityLogin securityLogin)
        {
            if (ModelState.IsValid)
            {
                var config             = new MapperConfiguration(cfg => cfg.CreateMap <SecurityLogin, SecurityLoginPoco>());
                var mapper             = config.CreateMapper();
                SecurityLoginPoco poco = mapper.Map <SecurityLoginPoco>(securityLogin);
                poco.Id = Guid.NewGuid();
                _context.Add(poco);
                await _context.SaveChangesAsync();

                TempData["Login"] = poco.Id;
                return(RedirectToAction("CreateProfile", "ApplicantProfile", new { id = poco.Id }));
            }
            return(View(securityLogin));
        }
        public async Task <IActionResult> CreateJobEducationCompleteJobCreation([Bind("Id,Job,Major,Importance,TimeStamp")] CompanyJobEducationPoco companyJobEducationPoco)
        {
            // Guid cid = companyJobEducationPoco.CompanyJob.Company;
            Guid jid = companyJobEducationPoco.Job;

            if (ModelState.IsValid)
            {
                companyJobEducationPoco.Id = Guid.NewGuid();
                _context.Add(companyJobEducationPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
                //return RedirectToAction("DisplayJobsForGivenCompany", "CompanyJob", new { CompanyId = cid });
            }
            return(RedirectToAction("ContinueUpdateJobEducation", "CompanyJobEducation", new { JobId = jid }));
        }
Exemple #21
0
        public async Task <IActionResult> Create(CompanyJobEducation companyJobEducation)
        {
            if (ModelState.IsValid)
            {
                var config = new MapperConfiguration(cfg => cfg.CreateMap <CompanyJobEducation, CompanyJobEducationPoco>());
                var mapper = config.CreateMapper();
                CompanyJobEducationPoco companyJobEducationPoco = mapper.Map <CompanyJobEducationPoco>(companyJobEducation);
                companyJobEducationPoco.Id  = Guid.NewGuid();
                companyJobEducationPoco.Job = Guid.Parse(TempData["JobId"].ToString());
                _context.Add(companyJobEducationPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Create", "CompanyJobSkill", new { id = companyJobEducationPoco.Job }));
            }
            //ViewData["Job"] = new SelectList(_context.CompanyJobs, "Id", "Id", companyJobEducationPoco.Job);
            return(View(companyJobEducation));
        }
Exemple #22
0
        public async Task <IActionResult> ApplyForSelectedJob(Guid ApplicantId, Guid JobId)
        {
            ViewData["Applicant"] = ApplicantId;
            ViewData["Job"]       = JobId;
            ApplicantJobApplicationPoco jobapplication = new ApplicantJobApplicationPoco();

            jobapplication.Job             = JobId;
            jobapplication.ApplicationDate = DateTime.Now;
            jobapplication.Applicant       = ApplicantId;
            if (ModelState.IsValid)
            {
                jobapplication.Id = Guid.NewGuid();
                _context.Add(jobapplication);
                await _context.SaveChangesAsync();
            }
            return(RedirectToAction("Details", "ApplicantProfile", new { id = ApplicantId }));
        }
        public async Task <IActionResult> CreateJobDescriptionContinueToJobSkill([Bind("Id,Job,JobName,JobDescriptions,TimeStamp")] CompanyJobDescriptionPoco companyJobDescriptionPoco)
        {
            //Guid cid = companyJobDescriptionPoco.CompanyJob.Company;
            Guid jid = companyJobDescriptionPoco.Job;

            if (ModelState.IsValid)
            {
                companyJobDescriptionPoco.Id = Guid.NewGuid();

                _context.Add(companyJobDescriptionPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(RedirectToAction("ContinueUpdateJobSkill", "CompanyJobSkill", new { JobId = jid }));
            //return RedirectToAction("ContinueUpdateJobDescription", "CompanyJobDescription", new { CompanyId = cid, JobId=jid });
        }
Exemple #24
0
        public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            var companyDescriptionPoco = await _context.CompanyDescriptions.FindAsync(id);

            _context.CompanyDescriptions.Remove(companyDescriptionPoco);
            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }
Exemple #25
0
        public async Task <IActionResult> ContinueCreatingProfile([Bind("Id,Login,Password,IsLocked,IsInactive,EmailAddress,PhoneNumber,FullName,ForceChangePassword,PrefferredLanguage")] SecurityLoginPoco securityLoginPoco)
        {
            securityLoginPoco.PasswordUpdate    = DateTime.Now;
            securityLoginPoco.AgreementAccepted = DateTime.Now;
            securityLoginPoco.Created           = DateTime.Now;
            securityLoginPoco.ApplicantProfile  = null;
            securityLoginPoco.SecurityLoginsLog = null;

            if (ModelState.IsValid)
            {
                securityLoginPoco.Id = Guid.NewGuid();
                _context.Add(securityLoginPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction("ContinueCreatingProfile", "ApplicantProfile", new { loginId = securityLoginPoco.Id }));
            }
            return(RedirectToAction("CreateNewprofileLogin", "SecurityLoginPocoes"));
        }
        public async Task <IActionResult> Create([Bind("Id,Job,JobName,JobDescriptions")] CompanyJobDescriptionPoco companyJobDescriptionPoco)
        {
            if (ModelState.IsValid)
            {
                if (TempData.ContainsKey("Id"))
                {
                    Guid id = (Guid)TempData["Id"];
                    TempData.Keep();
                    companyJobDescriptionPoco.Job = id;
                }
                companyJobDescriptionPoco.Id = Guid.NewGuid();
                _context.Add(companyJobDescriptionPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new { id = companyJobDescriptionPoco.Job }));
            }
            ViewData["Job"] = new SelectList(_context.CompanyJob, "Id", "Id", companyJobDescriptionPoco.Job);
            return(View(companyJobDescriptionPoco));
        }
Exemple #27
0
        public async Task <IActionResult> Create([Bind("Id,Company,CountryCode,Province,Street,City,PostalCode")] CompanyLocationPoco companyLocationPoco)
        {
            if (ModelState.IsValid)
            {
                if (TempData.ContainsKey("Id"))
                {
                    Guid id = (Guid)TempData["Id"];
                    TempData.Keep();
                    companyLocationPoco.Company = id;
                }
                companyLocationPoco.Id = Guid.NewGuid();
                _context.Add(companyLocationPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new { id = companyLocationPoco.Company }));
            }
            ViewData["Company"] = new SelectList(_context.CompanyProfile, "Id", "Id", companyLocationPoco.Company);
            return(View(companyLocationPoco));
        }
        public async Task <IActionResult> Create([Bind("Id,Company,ProfileCreated,IsInactive,IsCompanyHidden")] CompanyJobPoco companyJobPoco)
        {
            if (ModelState.IsValid)
            {
                if (TempData.ContainsKey("Id"))
                {
                    Guid id = (Guid)TempData["Id"];
                    TempData.Keep();
                    companyJobPoco.Company = id;
                }
                companyJobPoco.Id = Guid.NewGuid();
                _context.Add(companyJobPoco);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new { id = companyJobPoco.Company }));
            }
            ViewData["Company"] = new SelectList(_context.CompanyProfile, "Id", "Id", companyJobPoco.Company);
            return(View(companyJobPoco));
        }
        public async Task <IActionResult> CreateJobFlowStart(Guid CompanyId)
        {
            CompanyJobPoco newjob = new CompanyJobPoco();

            newjob.Id              = Guid.NewGuid();
            newjob.ProfileCreated  = DateTime.Now;
            newjob.IsCompanyHidden = false;
            newjob.IsInactive      = false;
            newjob.Company         = CompanyId;
            if (ModelState.IsValid)
            {
                _context.Add(newjob);
                await _context.SaveChangesAsync();

                //ViewData["CompanyId"] = newjob.Company;
                //ViewData["JobId"] = newjob.Id;
                return(RedirectToAction("Details", "CompanyJob", new { id = newjob.Id }));

                //return RedirectToAction("ContinueUpdateJobDescription", "CompanyJobDescription", new { CompanyId = newjob.Company, JobId=newjob.Id });
            }
            return(RedirectToAction("DisplayJobsForGivenCompany", "CompanyJob", new { sortOrder = "Id", companyId = CompanyId }));
        }
Exemple #30
0
        public async Task <IActionResult> Create([Bind("Id,Applicant,Job,ApplicationDate")] ApplicantJobApplicationPoco applicantJobApplicationPoco)
        {
            string strDDLValue = Request.Form["Job"].ToString();

            Guid jobId = (Guid)_context.CompanyJobDescriptions.Where(a => a.JobName == strDDLValue).FirstOrDefault().Job;

            applicantJobApplicationPoco.Job = jobId;
            if (TempData.ContainsKey("ApplicantId"))
            {
                Guid id = (Guid)TempData["ApplicantId"];
                TempData.Keep();
                applicantJobApplicationPoco.Applicant = id;
            }
            applicantJobApplicationPoco.Id = Guid.NewGuid();
            _context.Add(applicantJobApplicationPoco);
            await _context.SaveChangesAsync();

            ViewData["Applicant"] = new SelectList(_context.ApplicantProfiles, "Id", "Id", applicantJobApplicationPoco.Applicant);
            ViewData["Job"]       = new SelectList(_context.CompanyJob, "Id", "Id", applicantJobApplicationPoco.Job);
            ViewData["JobName"]   = new SelectList(_context.CompanyJobDescriptions, "JobName", "JobName");
            return(RedirectToAction(nameof(Index), new { id = applicantJobApplicationPoco.Applicant }));

            // return View(applicantJobApplicationPoco);
        }