Ejemplo n.º 1
0
        public void AddCompanyProfile(CompanyProfilePoco[] item)
        {
            EFGenericRepository <CompanyProfilePoco> companyprofilerepo = new EFGenericRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic _companyprofilelogic = new CompanyProfileLogic(companyprofilerepo);

            _companyprofilelogic.Add(item);
        }
        public CompanyProfileController()
        {
            EFGenericRepository <CompanyProfilePoco> repo =
                new EFGenericRepository <CompanyProfilePoco>(false);

            _logic = new CompanyProfileLogic(repo);
        }
        public ActionResult Index([Bind(Include = "RegistrationDate,CompanyWebsite,ContactPhone,ContactName")] CompanyProfilePoco poco)
        {
            // Put random bytes into this array.
            byte[] array = new byte[8];
            // Use Random class and NextBytes method.
            // ... Display the bytes with following method.
            Random random = new Random();

            random.NextBytes(array);

            poco.CompanyLogo = array;
            CompanyProfilePoco[] pocos = new CompanyProfilePoco[] { poco };
            var request = new RestRequest("api/careercloud/company/v1/profile", Method.POST);

            request.AddJsonBody(pocos);
            request.RequestFormat = DataFormat.Json;
            var response = client.Execute(request);

            //Get Back The Company just saved and add to session

            CompanyProfileRepository repository = new CompanyProfileRepository();
            CompanyProfileLogic      logic      = new CompanyProfileLogic(repository);
            var companyProfile = logic.GetAll().Where(s => s.CompanyWebsite == poco.CompanyWebsite && s.ContactPhone == poco.ContactPhone && s.ContactName == poco.ContactName).FirstOrDefault();

            if (Session["Company"] == null)
            {
                Session["Company"] = companyProfile.Id;
            }

            return(RedirectToAction("Description"));
        }
Ejemplo n.º 4
0
        public CompanyProfilePoco GetSingleCompanyProfile(string Id)
        {
            ApplicantProfileRepository <CompanyProfilePoco> repo = new ApplicantProfileRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic log = new CompanyProfileLogic(repo);

            return(log.Get(Guid.Parse(Id)));
        }
Ejemplo n.º 5
0
        public List <CompanyProfilePoco> GetAllCompanyProfile()
        {
            var repo  = new EFGenericRepository <CompanyProfilePoco>(false);
            var logic = new CompanyProfileLogic(repo);

            return(logic.GetAll());
        }
Ejemplo n.º 6
0
        public void UpdateCompanyProfile(CompanyProfilePoco[] pocos)
        {
            var repo  = new EFGenericRepository <CompanyProfilePoco>(false);
            var logic = new CompanyProfileLogic(repo);

            logic.Update(pocos);
        }
Ejemplo n.º 7
0
        public Company()
        {
            EFGenericRepository <CompanyDescriptionPoco> repo = new EFGenericRepository <CompanyDescriptionPoco>(false);

            _logic = new CompanyDescriptionLogic(repo);

            EFGenericRepository <CompanyJobDescriptionPoco> repo1 = new EFGenericRepository <CompanyJobDescriptionPoco>(false);

            _logicAJL = new CompanyJobDescriptionLogic(repo1);

            EFGenericRepository <CompanyJobEducationPoco> repo2 = new EFGenericRepository <CompanyJobEducationPoco>(false);

            _logicEducation = new CompanyJobEducationLogic(repo2);

            EFGenericRepository <CompanyJobPoco> repo3 = new EFGenericRepository <CompanyJobPoco>(false);

            _logicJob = new CompanyJobLogic(repo3);

            EFGenericRepository <CompanyJobSkillPoco> repo4 = new EFGenericRepository <CompanyJobSkillPoco>(false);

            _logicJobSkill = new CompanyJobSkillLogic(repo4);

            EFGenericRepository <CompanyLocationPoco> repo5 = new EFGenericRepository <CompanyLocationPoco>(false);

            _logicCompanyLocation = new CompanyLocationLogic(repo5);

            EFGenericRepository <CompanyProfilePoco> repo6 = new EFGenericRepository <CompanyProfilePoco>(false);

            _logicCompanyProfile = new CompanyProfileLogic(repo6);
        }
        public CompanyProfileController(CareerCloudContext context)
        {
            _context = context;
            var repo = new EFGenericRepository <CompanyProfilePoco>();

            _logic = new CompanyProfileLogic(repo);
        }
Ejemplo n.º 9
0
        public void UpdateCompanyProfile(CompanyProfilePoco[] items)
        {
            EFGenericRepository <CompanyProfilePoco> companyprofilerepo = new EFGenericRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic _companyprofilelogic = new CompanyProfileLogic(companyprofilerepo);

            _companyprofilelogic.Update(items);
        }
Ejemplo n.º 10
0
        public List <CompanyProfilePoco> GetAllCompanyProfile()
        {
            EFGenericRepository <CompanyProfilePoco> companyprofilerepo = new EFGenericRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic _companyprofilelogic = new CompanyProfileLogic(companyprofilerepo);

            return(_companyprofilelogic.GetAll());
        }
Ejemplo n.º 11
0
        public void AddCompanyProfile(CompanyProfilePoco[] items)
        {
            EFGenericRepository <CompanyProfilePoco> CompanyProfileRepo = new EFGenericRepository <CompanyProfilePoco>(false);
            var Logic = new CompanyProfileLogic(CompanyProfileRepo);

            Logic.Add(items);
        }
Ejemplo n.º 12
0
        public List <CompanyProfilePoco> GetAllCompanyProfile()
        {
            ApplicantProfileRepository <CompanyProfilePoco> repo = new ApplicantProfileRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic log = new CompanyProfileLogic(repo);

            return(log.GetAll());
        }
Ejemplo n.º 13
0
        public ActionResult Create([Bind(Include = "Id,RegistrationDate,CompanyWebsite,ContactPhone,ContactName,CompanyLogo,TimeStamp")] CompanyProfilePoco companyProfilePoco)
        {
            CompanyProfileLogic profileLogic = new CompanyProfileLogic(repository);

            if (ModelState.IsValid)
            {
                companyProfilePoco.Id = Guid.NewGuid();
                companyProfilePoco.RegistrationDate = DateTime.Now;
                try
                {
                    db.CompanyProfiles.Add(companyProfilePoco);
                    db.SaveChanges();
                } catch (DbEntityValidationException dbEx)
                {
                    foreach (var validationErrors in dbEx.EntityValidationErrors)
                    {
                        foreach (var validationError in validationErrors.ValidationErrors)
                        {
                            System.Console.WriteLine("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);
                        }
                    }
                }
                System.Web.HttpContext.Current.Session["companyProfileId"] = companyProfilePoco.Id;
                return(RedirectToAction("Create", "CompanyDescription"));
            }

            return(View(companyProfilePoco));
        }
Ejemplo n.º 14
0
        public CompanyProfilePoco GetSingleCompanyProfile(string id)
        {
            EFGenericRepository <CompanyProfilePoco> companyprofilerepo = new EFGenericRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic _companyprofilelogic = new CompanyProfileLogic(companyprofilerepo);

            return(_companyprofilelogic.Get(Guid.Parse(id)));
        }
Ejemplo n.º 15
0
        public CompanyProfilePoco GetSingleCompanyProfile(string Id)
        {
            Guid id    = new Guid(Id);
            var  logic = new CompanyProfileLogic(new EFGenericRepository <CompanyProfilePoco>(false));

            return(logic.Get(id));
        }
Ejemplo n.º 16
0
        public void AddCompanyProfile(CompanyProfilePoco[] items)
        {
            var logic = new CompanyProfileLogic
                            (new EFGenericRepository <CompanyProfilePoco>());

            logic.Add(items);
        }
Ejemplo n.º 17
0
        public void RemoveCompanyProfile(CompanyProfilePoco[] items)
        {
            var logic = new CompanyProfileLogic
                            (new EFGenericRepository <CompanyProfilePoco>());

            logic.Delete(items);
        }
Ejemplo n.º 18
0
        public CompanyProfilePoco GetSingleCompanyProfile(string Id)
        {
            EFGenericRepository <CompanyProfilePoco> repo = new EFGenericRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic logic = new CompanyProfileLogic(repo);

            return(logic.Get(Guid.Parse(Id)));
        }
Ejemplo n.º 19
0
        public void AddCompanyProfile(CompanyProfilePoco[] pocos)
        {
            ApplicantProfileRepository <CompanyProfilePoco> repo = new ApplicantProfileRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic log = new CompanyProfileLogic(repo);

            log.Add(pocos);
        }
Ejemplo n.º 20
0
        public void AddCompanyProfile(CompanyProfilePoco[] pocos)
        {
            EFGenericRepository <CompanyProfilePoco> repo = new EFGenericRepository <CompanyProfilePoco>(false);
            CompanyProfileLogic logic = new CompanyProfileLogic(repo);

            logic.Add(pocos);
        }
Ejemplo n.º 21
0
        public void UpdateCompanyProfile(CompanyProfilePoco[] items)
        {
            var logic = new CompanyProfileLogic
                            (new EFGenericRepository <CompanyProfilePoco>(false));

            logic.Update(items);
        }
Ejemplo n.º 22
0
        // GET: CompanyJob
        public ActionResult Index()
        {
            List <JobInformation> jobInfoList = new List <JobInformation>();
            //Company Job via WebAPI
            var request     = new RestRequest("api/careercloud/company/v1/job");
            var response    = client.Execute <CompanyJobPoco>(request);
            var companyJobs = JsonConvert.DeserializeObject <IEnumerable <CompanyJobPoco> >(response.Content);

            foreach (var companyJob in companyJobs)
            {
                JobInformation jobInformation = new JobInformation();

                CompanyJobDescriptionPoco companyJobDescriptionPoco;

                jobInformation.profileCreated = companyJob.ProfileCreated;
                jobInformation.companyJobPoco = companyJob;


                CompanyJobDescriptionRepository companyJobDescriptionRepository = new CompanyJobDescriptionRepository();
                CompanyJobDescriptionLogic      companyJobDescriptionLogic      = new CompanyJobDescriptionLogic(companyJobDescriptionRepository);
                companyJobDescriptionPoco = companyJobDescriptionLogic.GetAll().Where(s => s.Job == companyJob.Id).FirstOrDefault();

                if (companyJobDescriptionPoco == null)
                {
                    continue;
                }

                jobInformation.jobName        = companyJobDescriptionPoco.JobName;
                jobInformation.jobDescription = companyJobDescriptionPoco.JobDescriptions;


                CompanyProfilePoco       companyProfilePoco;
                CompanyProfileRepository companyProfileRepository = new CompanyProfileRepository();
                CompanyProfileLogic      companyProfileLogic      = new CompanyProfileLogic(companyProfileRepository);
                companyProfilePoco = companyProfileLogic.GetAll().Where(s => s.Id == companyJob.Company).FirstOrDefault();

                if (companyProfilePoco == null)
                {
                    continue;
                }



                CompanyDescriptionPoco       companyDescriptionPoco;
                CompanyDescriptionRepository companyDescriptionRepository = new CompanyDescriptionRepository();
                CompanyDescriptionLogic      companyDescriptionLogic      = new CompanyDescriptionLogic(companyDescriptionRepository);
                companyDescriptionPoco = companyDescriptionLogic.GetAll().Where(s => s.Company == companyProfilePoco.Id).FirstOrDefault();

                if (companyDescriptionPoco == null)
                {
                    continue;
                }

                jobInformation.companyName = companyDescriptionPoco.CompanyName;
                jobInfoList.Add(jobInformation);
            }

            return(View(jobInfoList));
        }
Ejemplo n.º 23
0
        public List <CompanyProfilePoco> GetAllCompanyProfile()
        {
            List <CompanyProfilePoco> companyProfilePoco = new List <CompanyProfilePoco>();
            var logic = new CompanyProfileLogic(new EFGenericRepository <CompanyProfilePoco>(false));

            companyProfilePoco = logic.GetAll();
            return(companyProfilePoco);
        }
Ejemplo n.º 24
0
        public CompanyProfilePoco GetSingleCompanyProfile(string Id)
        {
            var logic = new CompanyProfileLogic(new EFGenericRepository <CompanyProfilePoco>(false));
            CompanyProfilePoco companyProfilePoco = new CompanyProfilePoco();

            companyProfilePoco = logic.Get(Guid.Parse(Id));
            return(companyProfilePoco);
        }
Ejemplo n.º 25
0
        public CompanyProfileController()
        {
            IDataRepository <CompanyProfilePoco> cpRepo = new EFGenericRepository <CompanyProfilePoco>();

            companyProfileLogic = new CompanyProfileLogic(cpRepo);
            IDataRepository <CompanyDescriptionPoco> cdRepo = new EFGenericRepository <CompanyDescriptionPoco>();

            companyDescriptionLogic = new CompanyDescriptionLogic(cdRepo);
        }
Ejemplo n.º 26
0
 public Company()
 {
     _CompanyDescriptionLogic    = new CompanyDescriptionLogic(new EFGenericRepository <CompanyDescriptionPoco>(false));
     _CompanyJobEducationLogic   = new CompanyJobEducationLogic(new EFGenericRepository <CompanyJobEducationPoco>(false));
     _CompanyJobLogic            = new CompanyJobLogic(new EFGenericRepository <CompanyJobPoco>(false));
     _CompanyJobSkillLogic       = new CompanyJobSkillLogic(new EFGenericRepository <CompanyJobSkillPoco>(false));
     _CompanyLocationLogic       = new CompanyLocationLogic(new EFGenericRepository <CompanyLocationPoco>(false));
     _CompanyProfileLogic        = new CompanyProfileLogic(new EFGenericRepository <CompanyProfilePoco>(false));
     _CompanyJobDescriptionLogic = new CompanyJobDescriptionLogic(new EFGenericRepository <CompanyJobDescriptionPoco>(false));
 }
Ejemplo n.º 27
0
        public CompanySignUpController()
        {
            var loginRepo          = new EFGenericRepository <SecurityLoginPoco>(false);
            var roleRepo           = new EFGenericRepository <SecurityRolePoco>(false);
            var loginRoleRepo      = new EFGenericRepository <SecurityLoginsRolePoco>(false);
            var companyProfileRepo = new EFGenericRepository <CompanyProfilePoco>(false);

            _loginLogic          = new SecurityLoginLogic(loginRepo);
            _roleLogic           = new SecurityRoleLogic(roleRepo);
            _loginRoleLogic      = new SecurityLoginsRoleLogic(loginRoleRepo);
            _companyProfileLogic = new CompanyProfileLogic(companyProfileRepo);
        }
Ejemplo n.º 28
0
        public Company()
        {
            EFGenericRepository <CompanyDescriptionPoco> cdRepo =
                new EFGenericRepository <CompanyDescriptionPoco>(false);

            _cdLogic = new CompanyDescriptionLogic(cdRepo);


            EFGenericRepository <CompanyJobEducationPoco> cjeRepo =
                new EFGenericRepository <CompanyJobEducationPoco>(false);

            _cjeLogic = new CompanyJobEducationLogic(cjeRepo);

            EFGenericRepository <CompanyJobSkillPoco> cjsRepo =
                new EFGenericRepository <CompanyJobSkillPoco>(false);

            _cjsLogic = new CompanyJobSkillLogic(cjsRepo);


            EFGenericRepository <CompanyJobPoco> cjRepo =
                new EFGenericRepository <CompanyJobPoco>(false);

            _cjLogic = new CompanyJobLogic(cjRepo);


            EFGenericRepository <CompanyJobDescriptionPoco> cjdRepo =
                new EFGenericRepository <CompanyJobDescriptionPoco>(false);

            _cjdLogic = new CompanyJobDescriptionLogic(cjdRepo);


            EFGenericRepository <CompanyLocationPoco> clRepo =
                new EFGenericRepository <CompanyLocationPoco>(false);

            _clLogic = new CompanyLocationLogic(clRepo);


            EFGenericRepository <CompanyProfilePoco> cpRepo =
                new EFGenericRepository <CompanyProfilePoco>(false);

            _cpLogic = new CompanyProfileLogic(cpRepo);
        }
Ejemplo n.º 29
0
        public Company()
        {
            //CompanyDescriptionRepository Desrepo = new CompanyDescriptionRepository();
            EFGenericRepository <CompanyDescriptionPoco> Desrepo = new EFGenericRepository <CompanyDescriptionPoco>(false);

            _companyDescription = new CompanyDescriptionLogic(Desrepo);

            //CompanyJobDescriptionRepository DesJobrepo = new CompanyJobDescriptionRepository();
            EFGenericRepository <CompanyJobDescriptionPoco> DesJobrepo = new EFGenericRepository <CompanyJobDescriptionPoco>(false);

            _companyJobDescription = new CompanyJobDescriptionLogic(DesJobrepo);

            //CompanyJobEducationRepository JobEdurepo = new CompanyJobEducationRepository();
            EFGenericRepository <CompanyJobEducationPoco> JobEdurepo = new EFGenericRepository <CompanyJobEducationPoco>(false);

            _companyJobEducation = new CompanyJobEducationLogic(JobEdurepo);

            //CompanyJobRepository Jobrepo = new CompanyJobRepository();
            EFGenericRepository <CompanyJobPoco> Jobrepo = new EFGenericRepository <CompanyJobPoco>(false);

            _companyJob = new CompanyJobLogic(Jobrepo);

            //CompanyJobSkillRepository JobSkillrepo = new CompanyJobSkillRepository();
            EFGenericRepository <CompanyJobSkillPoco> JobSkillrepo = new EFGenericRepository <CompanyJobSkillPoco>(false);

            _companyJobSkill = new CompanyJobSkillLogic(JobSkillrepo);

            //CompanyLocationRepository Locationrepo = new CompanyLocationRepository();
            EFGenericRepository <CompanyLocationPoco> Locationrepo = new EFGenericRepository <CompanyLocationPoco>(false);

            _companyLocation = new CompanyLocationLogic(Locationrepo);

            //CompanyProfileRepository Profilerepo = new CompanyProfileRepository();
            EFGenericRepository <CompanyProfilePoco> Profilerepo = new EFGenericRepository <CompanyProfilePoco>(false);

            _companyProfile = new CompanyProfileLogic(Profilerepo);
        }
Ejemplo n.º 30
0
        public CompanyProfilePoco GetSingleCompanyProfile(string id)
        {
            var _logic = new CompanyProfileLogic(new EFGenericRepository <CompanyProfilePoco>(false));

            return(_logic.Get(Guid.Parse(id)));
        }