Example #1
0
        public void AddApplicantSkill(ApplicantSkillPoco[] pocos)
        {
            EFGenericRepository <ApplicantSkillPoco> repo = new EFGenericRepository <ApplicantSkillPoco>(false);
            ApplicantSkillLogic logic = new ApplicantSkillLogic(repo);

            logic.Add(pocos);
        }
        public ActionResult PostApplicantSkill(
            [FromBody] ApplicantSkillPoco[] pocos)
        {
            _logic.Add(pocos);

            return(Ok());
        }
Example #3
0
 public IHttpActionResult PostApplicantSkill(ApplicantSkillPoco[] applicantSkill)
 {
     if (applicantSkill == null)
     {
         return(NotFound());
     }
     _logic.Add(applicantSkill);
     return(Ok());
 }
Example #4
0
        public void AddAppliantSkills(ApplicantSkillPoco[] items)
        {
            var logic = new ApplicantSkillLogic
                        (
                new EFGenericRepository <ApplicantSkillPoco>()
                        );

            logic.Add(items);
        }
            public ActionResult Create([Bind(Include = "Id,Applicant,Skill,SkillLevel,StartMonth,StartYear, EndMonth, EndYear")] ApplicantSkillPoco applicantSkill)
            {
                Guid _userProfileId = (Guid)TempData["Applicant"];

                TempData.Keep();
                applicantSkill.Id        = Guid.NewGuid();
                applicantSkill.Applicant = _userProfileId;
                _logic.Add(new ApplicantSkillPoco[] { applicantSkill });
                return(RedirectToAction("Index"));
            }
 public IHttpActionResult PostApplicantSkill([FromBody] ApplicantSkillPoco[] pocos)
 {
     try
     {
         _logic.Add(pocos);
         return(Ok());
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
        public async Task <IActionResult> Create([Bind("Applicant,Skill,SkillLevel,StartMonth,StartYear,EndMonth,EndYear")] ApplicantSkillPoco applicantSkillPoco)
        {
            if (ModelState.IsValid)
            {
                applicantSkillPoco.Id = Guid.NewGuid();
                _logic.Add(new ApplicantSkillPoco[] { applicantSkillPoco });

                return(RedirectToAction(nameof(Details), "ApplicantProfile", new { Id = applicantSkillPoco.Applicant }));
            }
            PopulateApplicantList(applicantSkillPoco.Applicant);
            return(View(applicantSkillPoco));
        }
        public ActionResult Create([Bind(Include = "Id,Applicant,Skill,SkillLevel,StartMonth,StartYear,EndMonth,EndYear,TimeStamp")] ApplicantSkillPoco applicantSkillPoco)
        {
            if (ModelState.IsValid)
            {
                applicantSkillPoco.Id = Guid.NewGuid();
                appSkillPoco[0]       = applicantSkillPoco;
                applicantSkillLogic.Add(appSkillPoco);
                return(RedirectToAction("Index"));
            }

            ViewBag.Applicant = new SelectList(applicantSkillLogic.GetAll(), "Applicant", "Applicant");
            return(View(applicantSkillPoco));
        }
Example #9
0
        public ActionResult Create([Bind(Include = "Id,SkillLevel,StartMonth,StartYear,EndMonth,EndYear,TimeStamp,Applicant,Skill")] ApplicantSkillPoco applicantSkillPoco)
        {
            if (ModelState.IsValid)
            {
                applicantSkillPoco.Id = Guid.NewGuid();
                //db.ApplicantSkill.Add(applicantSkillPoco);
                //db.SaveChanges();
                _logic.Add(new ApplicantSkillPoco[] { applicantSkillPoco });
                return(RedirectToAction("Index"));
            }

            ViewBag.Applicant = new SelectList(db.ApplicantProfile, "Id", "Country", applicantSkillPoco.Applicant);
            return(View(applicantSkillPoco));
        }
Example #10
0
 public ActionResult PostApplicantSkill([FromBody] ApplicantSkillPoco[] skill)
 {
     try
     {
         _logic.Add(skill);
         return(Ok());
     }
     catch (AggregateException e)
     {
         return(BadRequest(e));
     }
     catch
     {
         return(StatusCode(500));
     }
 }
Example #11
0
        public override Task <Empty> CreateApplicantSkill(ApplicantSkillPayload request, ServerCallContext context)
        {
            ApplicantSkillPoco[] pocos = new ApplicantSkillPoco[1];
            pocos[0].Id         = Guid.Parse(request.Id);
            pocos[0].Applicant  = Guid.Parse(request.Applicant);
            pocos[0].Skill      = request.Skill;
            pocos[0].SkillLevel = request.SkillLevel;
            pocos[0].StartMonth = Convert.ToByte(request.StartMonth);
            pocos[0].StartYear  = request.StartYear;
            pocos[0].EndMonth   = Convert.ToByte(request.EndMonth);
            pocos[0].EndYear    = request.EndYear;


            _logic.Add(pocos);
            return(new Task <Empty>(null));
        }
Example #12
0
 public override Task <Empty> CreateApplicantSkill(ApplicantSkillPayload request, ServerCallContext context)
 {
     ApplicantSkillPoco[] pocos = { new ApplicantSkillPoco()
                                    {
                                        Id         = Guid.Parse(request.Id),
                                        Applicant  = Guid.Parse(request.Applicant),
                                        Skill      = request.Skill,
                                        SkillLevel = request.SkillLevel,
                                        StartMonth = (byte)request.StartMonth,
                                        EndMonth   = (byte)request.EndMonth,
                                        StartYear  = request.StartYear,
                                        EndYear    = request.EndYear
                                    } };
     _logic.Add(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
 public override Task <Empty> CreateApplicantSkill(ApplicantSkillPayload request, ServerCallContext context)
 {
     ApplicantSkillPoco[] pocos = new ApplicantSkillPoco[1];
     foreach (var poco in pocos)
     {
         poco.Id         = Guid.Parse(request.Id);
         poco.Applicant  = Guid.Parse(request.Applicant);
         poco.Skill      = request.Skill;
         poco.SkillLevel = request.SkillLevel;
         poco.StartMonth = (byte)request.StartMonth;
         poco.StartYear  = (byte)request.StartYear;
         poco.EndMonth   = (byte)request.EndMonth;
         poco.EndYear    = request.EndYear;
     }
     _logic.Add(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
        public override Task <Empty> CreateApplicantSkill(ApplicantSkillPayload request, ServerCallContext context)
        {
            ApplicantSkillPoco poco = new ApplicantSkillPoco()
            {
                Id         = Guid.Parse(request.Id),
                Applicant  = Guid.Parse(request.Applicant),
                Skill      = request.Skill,
                SkillLevel = request.SkillLevel,
                StartMonth = (byte)request.StartMonth,
                EndMonth   = Convert.ToByte(request.EndMonth),
                StartYear  = request.StartYear,
                EndYear    = request.EndYear,
            };

            _logic.Add(new ApplicantSkillPoco[] { poco });
            return(null);
        }
 public IHttpActionResult PostApplicantSkill([FromBody] ApplicantSkillPoco[] 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);
     }
 }
Example #16
0
        public void AddApplicantSkill(ApplicantSkillPoco[] pocos)
        {
            var logic = new ApplicantSkillLogic(new EFGenericRepository <ApplicantSkillPoco>(false));

            logic.Add(pocos);
        }
Example #17
0
 public void AddApplicantSkill(ApplicantSkillPoco[] item)
 {
     _sLogic.Add(item);
 }
Example #18
0
 public void addApplicantSkillPoco(ApplicantSkillPoco[] item)
 {
     _logicApplicantSkillLogic.Add(item);
 }
Example #19
0
 public IHttpActionResult PostApplicantSkill([FromBody] ApplicantSkillPoco[] ApplicantSkills)
 {
     _logic.Add(ApplicantSkills);
     return(Ok());
 }
Example #20
0
 public void AddApplicantSkill(ApplicantSkillPoco[] pocos)
 {
     _ApplicantSkillLogic.Add(pocos);
 }
Example #21
0
        // ApplicantSkill
        public void AddApplicantSkill(ApplicantSkillPoco[] items)
        {
            var _logic = new ApplicantSkillLogic(new EFGenericRepository <ApplicantSkillPoco>(false));

            _logic.Add(items);
        }
Example #22
0
 public override Task <Empty> CreateApplicantSkill(ApplicantSkillPayload request, ServerCallContext context)
 {
     _logic.Add(GetArray(request));
     return(new Task <Empty>(null));
 }
Example #23
0
        public void AddApplicantSkill(ApplicantSkillPoco[] items)
        {
            var reference = new ApplicantSkillLogic(new EFGenericRepository <ApplicantSkillPoco>(false));

            reference.Add(items);
        }