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()); }
public override Task <Empty> CreateCompanyJob(ComJobArray request, ServerCallContext context) { var pocos = ProtoToPoco(request); _logic.Add(pocos.ToArray()); return(new Task <Empty>(() => new Empty())); }
public override Task <Empty> AddCompanyJob(CompanyJobs request, ServerCallContext context) { var topoco = ToPoco(request).ToArray(); _logic.Add(topoco); return(Task.FromResult <Empty>(null)); }
public void AddCompanyJob(CompanyJobPoco[] items) { var logic = new CompanyJobLogic (new EFGenericRepository <CompanyJobPoco>()); logic.Add(items); }
public void AddCompanyJob(CompanyJobPoco[] pocos) { EFGenericRepository <CompanyJobPoco> repo = new EFGenericRepository <CompanyJobPoco>(false); CompanyJobLogic logic = new CompanyJobLogic(repo); logic.Add(pocos); }
public void AddCompanyJob(CompanyJobPoco[] pocos) { ApplicantProfileRepository <CompanyJobPoco> repo = new ApplicantProfileRepository <CompanyJobPoco>(false); CompanyJobLogic log = new CompanyJobLogic(repo); log.Add(pocos); }
public void AddCompanyJob(CompanyJobPoco[] item) { EFGenericRepository <CompanyJobPoco> companyjobrepo = new EFGenericRepository <CompanyJobPoco>(false); CompanyJobLogic _companyjoblogic = new CompanyJobLogic(companyjobrepo); _companyjoblogic.Add(item); }
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)); }
public IHttpActionResult PostCompanyJob(CompanyJobPoco[] companyJob) { if (companyJob == null) { return(NotFound()); } _logic.Add(companyJob); return(Ok()); }
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)); }
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)); }
public IHttpActionResult PostCompanyJob([FromBody] CompanyJobPoco[] pocos) { try { _logic.Add(pocos); return(Ok()); } catch (Exception e) { return(InternalServerError(e)); } }
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())); }
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())); }
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())); }
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)); }
public ActionResult PostCompanyJob([FromBody] CompanyJobPoco[] job) { try { _logic.Add(job); return(Ok()); } catch (AggregateException e) { return(BadRequest(e)); } catch { return(StatusCode(500)); } }
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")); }
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)); }
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())); }
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); } }
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()); }
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)); }
public void AddCompanyJob(CompanyJobPoco[] item) { _cjLogic.Add(item); }