Пример #1
0
        public void AddCompanyJob(CompanyJobPoco[] items)
        {
            EFGenericRepository <CompanyJobPoco> CompanyJobRepo = new EFGenericRepository <CompanyJobPoco>(false);
            var Logic = new CompanyJobLogic(CompanyJobRepo);

            Logic.Add(items);
        }
        public ActionResult PostCompanyJob(
            [FromBody] CompanyJobPoco[] pocos)
        {
            _logic.Add(pocos);

            return(Ok());
        }
Пример #3
0
        public override Task <Empty> CreateCompanyJob(ComJobArray request, ServerCallContext context)
        {
            var pocos = ProtoToPoco(request);

            _logic.Add(pocos.ToArray());
            return(new Task <Empty>(() => new Empty()));
        }
Пример #4
0
        public override Task <Empty> AddCompanyJob(CompanyJobs request, ServerCallContext context)
        {
            var topoco = ToPoco(request).ToArray();

            _logic.Add(topoco);
            return(Task.FromResult <Empty>(null));
        }
Пример #5
0
        public void AddCompanyJob(CompanyJobPoco[] items)
        {
            var logic = new CompanyJobLogic
                            (new EFGenericRepository <CompanyJobPoco>());

            logic.Add(items);
        }
Пример #6
0
        public void AddCompanyJob(CompanyJobPoco[] pocos)
        {
            EFGenericRepository <CompanyJobPoco> repo = new EFGenericRepository <CompanyJobPoco>(false);
            CompanyJobLogic logic = new CompanyJobLogic(repo);

            logic.Add(pocos);
        }
Пример #7
0
        public void AddCompanyJob(CompanyJobPoco[] pocos)
        {
            ApplicantProfileRepository <CompanyJobPoco> repo = new ApplicantProfileRepository <CompanyJobPoco>(false);
            CompanyJobLogic log = new CompanyJobLogic(repo);

            log.Add(pocos);
        }
Пример #8
0
        public void AddCompanyJob(CompanyJobPoco[] item)
        {
            EFGenericRepository <CompanyJobPoco> companyjobrepo = new EFGenericRepository <CompanyJobPoco>(false);
            CompanyJobLogic _companyjoblogic = new CompanyJobLogic(companyjobrepo);

            _companyjoblogic.Add(item);
        }
Пример #9
0
        public ActionResult Create([Bind(Include = "Id,Company,JobName,JobDescription")] CompanyJobs companyJobs)
        {
            if (ModelState.IsValid)
            {
                var  companyJobsLogic = new CompanyJobLogic(new EFGenericRepository <CompanyJobPoco>());
                Guid jobId            = Guid.NewGuid();
                companyJobsLogic.Add(new CompanyJobPoco[] { new CompanyJobPoco
                                                            {
                                                                Id              = jobId,
                                                                Company         = (Guid)System.Web.HttpContext.Current.Session["companyJobsId"],
                                                                ProfileCreated  = DateTime.Now,
                                                                IsInactive      = false,
                                                                IsCompanyHidden = false
                                                            } });
                var  companyJobsDescriptionLogic = new CompanyJobDescriptionLogic(new EFGenericRepository <CompanyJobDescriptionPoco>());
                Guid jobsDescriptionId           = Guid.NewGuid();
                companyJobsDescriptionLogic.Add(new CompanyJobDescriptionPoco[] { new CompanyJobDescriptionPoco
                                                                                  {
                                                                                      Id              = jobsDescriptionId,
                                                                                      Job             = jobId,
                                                                                      JobName         = companyJobs.JobName,
                                                                                      JobDescriptions = companyJobs.JobDescription
                                                                                  } });
                return(RedirectToAction("Index"));
            }

            return(View(companyJobs));
        }
Пример #10
0
 public IHttpActionResult PostCompanyJob(CompanyJobPoco[] companyJob)
 {
     if (companyJob == null)
     {
         return(NotFound());
     }
     _logic.Add(companyJob);
     return(Ok());
 }
Пример #11
0
        public override Task <Empty> AddCompanyJob(CompanyJobList request, ServerCallContext context)
        {
            List <CompanyJobPoco> pocos = new List <CompanyJobPoco>();

            foreach (var item in request.CompanyJobs)
            {
                pocos.Add(ToPoco(item));
            }
            logic.Add(pocos.ToArray());
            return(Task.FromResult(new Empty()));
        }
        public ActionResult Create([Bind(Include = "Id,Company,ProfileCreated,IsInactive,IsCompanyHidden,TimeStamp")] CompanyJobPoco companyJobPoco, string JobName, string JobDescriptions, string Major, int Importance, string Skill, string SkillLevel, short EImportance)
        {
            Session["Company"] = companyJobPoco.Company;
            if (ModelState.IsValid)
            {
                companyJobPoco.Id             = Guid.NewGuid();
                companyJobPoco.ProfileCreated = DateTime.Now;
                compJobPoco[0] = companyJobPoco;

                CompanyJobSkillPoco companySkillsPoco = new CompanyJobSkillPoco();
                companySkillsPoco.Id         = Guid.NewGuid();
                companySkillsPoco.Job        = companyJobPoco.Id;
                companySkillsPoco.Skill      = Skill;
                companySkillsPoco.SkillLevel = SkillLevel;
                companySkillsPoco.Importance = Importance;
                CompanyJobSkillPoco[] compJobSkillPoco = new CompanyJobSkillPoco[]
                {
                    companySkillsPoco
                };

                CompanyJobEducationPoco companyJobEducationPoco = new CompanyJobEducationPoco();
                companyJobEducationPoco.Id         = Guid.NewGuid();
                companyJobEducationPoco.Job        = companyJobPoco.Id;
                companyJobEducationPoco.Major      = Major;
                companyJobEducationPoco.Importance = EImportance;
                CompanyJobEducationPoco[] compEducationPoco = new CompanyJobEducationPoco[]
                {
                    companyJobEducationPoco
                };

                CompanyJobDescriptionPoco companyJobDescriptionPoco = new CompanyJobDescriptionPoco();
                companyJobDescriptionPoco.Id              = Guid.NewGuid();
                companyJobDescriptionPoco.Job             = companyJobPoco.Id;
                companyJobDescriptionPoco.JobName         = JobName;
                companyJobDescriptionPoco.JobDescriptions = JobDescriptions;
                CompanyJobDescriptionPoco[] compJobDescriptionPoco = new CompanyJobDescriptionPoco[]
                {
                    companyJobDescriptionPoco
                };


                companyJobLogic.Add(compJobPoco);
                companyJobSkillLogic.Add(compJobSkillPoco);
                companyJobEducationLogic.Add(compEducationPoco);
                companyJobDescriptionLogic.Add(compJobDescriptionPoco);

                //return RedirectToAction("Details", "CompanyProfile", new { id = companyJobPoco.Company });
                return(RedirectToAction("Details", "CompanyJob", new { id = companyJobPoco.Company }));
            }

            ViewBag.Company = new SelectList(companyJobLogic.GetAll(), "Company", "Company");

            return(View(companyJobPoco));
        }
Пример #13
0
        public override Task <Empty> AddCompanyJob(CompanyJobs request, ServerCallContext context)
        {
            List <CompanyJobPoco> pocos = new List <CompanyJobPoco>();

            foreach (CompanyJobReply reply in request.AppEdus)
            {
                pocos.Add(ToPOCO(reply));
            }
            _logic.Add(pocos.ToArray());
            return(Task.FromResult <Empty>(null));
        }
Пример #14
0
 public IHttpActionResult PostCompanyJob([FromBody] CompanyJobPoco[] pocos)
 {
     try
     {
         _logic.Add(pocos);
         return(Ok());
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
Пример #15
0
 public override Task <Empty> CreateCompanyJob(CompanyJobPayload request, ServerCallContext context)
 {
     CompanyJobPoco[] pocos = { new CompanyJobPoco()
                                {
                                    Id              = Guid.Parse(request.Id),
                                    Company         = Guid.Parse(request.Company),
                                    IsCompanyHidden = request.IsCompanyHidden,
                                    IsInactive      = request.IsInactive,
                                    ProfileCreated  = request.ProfileCreated.ToDateTime()
                                } };
     _logic.Add(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
Пример #16
0
        public override Task <Empty> CreateCompanyJob(CompanyJobPayload request, ServerCallContext context)
        {
            CompanyJobPoco[] pocos = new CompanyJobPoco[1];

            pocos[0].Id              = Guid.Parse(request.Id);
            pocos[0].Company         = Guid.Parse(request.Company);
            pocos[0].ProfileCreated  = request.ProfileCreated.ToDateTime();
            pocos[0].IsInactive      = request.IsInactive;
            pocos[0].IsCompanyHidden = request.IsCompanyHidden;

            _logic.Add(pocos);
            return(new Task <Empty>(null));
        }
        public override Task <Empty> CreateCompanyJob(CompanyJobObjs request, ServerCallContext context)
        {
            var _logic = new CompanyJobLogic(new EFGenericRepository <CompanyJobPoco>());
            List <CompanyJobPoco> pocos = new List <CompanyJobPoco>();

            foreach (var item in request.Obj)
            {
                pocos.Add(TranslateFromProto(item, new CompanyJobPoco()));
            }

            _logic.Add(pocos.ToArray());
            return(Task.FromResult(new Empty()));
        }
Пример #18
0
 public override Task <Empty> CreateCompanyJob(CompanyJobPayload request, ServerCallContext context)
 {
     CompanyJobPoco[] pocos = new CompanyJobPoco[1];
     foreach (var poco in pocos)
     {
         poco.Id              = Guid.Parse(request.Id);
         poco.Company         = Guid.Parse(request.Company);
         poco.ProfileCreated  = request.ProfileCreated.ToDateTime();
         poco.IsInactive      = request.IsInactive;
         poco.IsCompanyHidden = request.IsCompanyHidden;
     }
     _logic.Add(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
Пример #19
0
        public override Task <Empty> CreateCompanyJob(CompanyJobPayload request, ServerCallContext context)
        {
            CompanyJobPoco poco = new CompanyJobPoco()
            {
                Id              = Guid.Parse(request.Id),
                Company         = Guid.Parse(request.Company),
                IsCompanyHidden = request.IsCompanyHidden,
                IsInactive      = request.IsInactive,
                ProfileCreated  = request.ProfileCreadted.ToDateTime()
            };

            _logic.Add(new CompanyJobPoco[] { poco });
            return(null);
        }
        public ActionResult Create([Bind(Include = "Id,ProfileCreated,IsInactive,IsCompanyHidden,TimeStamp,Company")] CompanyJobPoco companyJobPoco)
        {
            if (ModelState.IsValid)
            {
                companyJobPoco.Id = Guid.NewGuid();
                //db.CompanyJob.Add(companyJobPoco);
                //db.SaveChanges();
                _logic.Add(new CompanyJobPoco[] { companyJobPoco });
                return(RedirectToAction("Index"));
            }

            ViewBag.Company = new SelectList(db.CompanyProfile, "Id", "CompanyWebsite", companyJobPoco.Company);
            return(View(companyJobPoco));
        }
Пример #21
0
 public ActionResult PostCompanyJob([FromBody] CompanyJobPoco[] job)
 {
     try
     {
         _logic.Add(job);
         return(Ok());
     }
     catch (AggregateException e)
     {
         return(BadRequest(e));
     }
     catch
     {
         return(StatusCode(500));
     }
 }
Пример #22
0
        public ActionResult Create([Bind(Include = "JobName,JobDescription,Major,EduImportance, Skill, SkillLevel, SkillImportance, Created, IfInactive,IfHidden")] CompanyJobPost companyJobPost)
        {
            CompanyJobPoco jobPoco = new CompanyJobPoco
            {
                Id              = Guid.NewGuid(),
                Company         = (Guid)TempData["Company"],
                ProfileCreated  = DateTime.Now,
                IsInactive      = companyJobPost.IfInactive,
                IsCompanyHidden = companyJobPost.IfHidden
            };

            TempData.Keep();
            _jobLogic.Add(new CompanyJobPoco[] { jobPoco });

            CompanyJobDescriptionPoco jobDescPoco = new CompanyJobDescriptionPoco
            {
                Id              = Guid.NewGuid(),
                Job             = jobPoco.Id,
                JobName         = companyJobPost.JobName,
                JobDescriptions = companyJobPost.JobDescription
            };

            _descLogic.Add(new CompanyJobDescriptionPoco[] { jobDescPoco });

            CompanyJobSkillPoco jobSkillPoco = new CompanyJobSkillPoco()
            {
                Id         = Guid.NewGuid(),
                Job        = jobPoco.Id,
                Skill      = companyJobPost.Skill,
                SkillLevel = companyJobPost.SkillLevel,
                Importance = companyJobPost.SkillImportance
            };

            _skillLogic.Add(new CompanyJobSkillPoco[] { jobSkillPoco });

            CompanyJobEducationPoco jobEduPoco = new CompanyJobEducationPoco()
            {
                Id         = Guid.NewGuid(),
                Job        = jobPoco.Id,
                Major      = companyJobPost.Major,
                Importance = companyJobPost.EduImportance
            };

            _eduLogic.Add(new CompanyJobEducationPoco[] { jobEduPoco });

            return(RedirectToAction("Index"));
        }
Пример #23
0
        public override Task <Empty> AddGetCompanyJobs(CompanyJobs request, ServerCallContext context)
        {
            List <CompanyJobPoco> pocos = new List <CompanyJobPoco>();

            foreach (CompanyJobReply reply in request.CompanyJobReplies)
            {
                pocos.Add(
                    new CompanyJobPoco()
                {
                    Company         = Guid.Parse(reply.Company),
                    IsCompanyHidden = reply.IsCompanyHidden,
                    IsInactive      = reply.IsInactive,
                    ProfileCreated  = DateTime.Parse(reply.ProfileCreated.ToString())
                });
            }
            _logic.Add(pocos.ToArray());
            return(Task.FromResult <Empty>(null));
        }
Пример #24
0
        public override Task <Empty> CreateCompanyJob(CompanyJobs request, ServerCallContext context)
        {
            List <CompanyJobPoco> pocos = new List <CompanyJobPoco>();

            foreach (var item in request.Cj)
            {
                CompanyJobPoco poco = new CompanyJobPoco()
                {
                    Id              = Guid.Parse(item.Id),
                    Company         = Guid.Parse(item.Company),
                    IsCompanyHidden = item.IsCompanyHidden,
                    IsInactive      = item.IsInactive,
                    ProfileCreated  = item.ProfileCreated.ToDateTime()
                };
                pocos.Add(poco);
            }

            _logic.Add(pocos.ToArray());
            return(Task.FromResult(new Empty()));
        }
Пример #25
0
 public IHttpActionResult PostCompanyJob([FromBody] CompanyJobPoco[] pocos)
 {
     try
     {
         _logicObj.Add(pocos);
         return(this.Ok());
     }
     catch (AggregateException e)
     {
         IEnumerable <ValidationException> exceptions = e.InnerExceptions.Cast <ValidationException>();
         HttpResponseMessage response =
             this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, exceptions.FirstOrDefault());
         throw new HttpResponseException(response);
     }
     catch (Exception e)
     {
         HttpResponseMessage response =
             this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, e);
         throw new HttpResponseException(response);
     }
 }
Пример #26
0
        public void AddCompanyJob(CompanyJobPoco[] pocos)
        {
            var logic = new CompanyJobLogic(new EFGenericRepository <CompanyJobPoco>(false));

            logic.Add(pocos);
        }
 public IHttpActionResult PostCompanyJob([FromBody] CompanyJobPoco[] CompanyJobs)
 {
     _logic.Add(CompanyJobs);
     return(Ok());
 }
Пример #28
0
        public void AddCompanyJob(CompanyJobPoco[] items)
        {
            var reference = new CompanyJobLogic(new EFGenericRepository <CompanyJobPoco>(false));

            reference.Add(items);
        }
 public override Task <Empty> CreateCompanyJob(CompanyJobPayload request, ServerCallContext context)
 {
     _logic.Add(GetArray(request));
     return(new Task <Empty>(null));
 }
Пример #30
0
 public void AddCompanyJob(CompanyJobPoco[] item)
 {
     _cjLogic.Add(item);
 }