コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public int SaveRequest(ManpowerRequest request)
 {
     request.DateCreated = DateTime.Now;
     _dbContext.ManpowerRequest.Add(request);
     _dbContext.SaveChanges();
     return(request.Id);
 }
コード例 #2
0
        public int Add(ManpowerRequest manpowerRequest)
        {
            manpowerRequest.Status = 0;
            _ctx.Add(manpowerRequest);

            _ctx.SaveChanges();
            var id = manpowerRequest.Id;

            return(id);
        }
コード例 #3
0
        public void CreateRequest(ManpowerRequestVm manpowerRequestVm)
        {
            var manpowerRequest = new ManpowerRequest()
            {
                Description     = manpowerRequestVm.Description,
                HiringManagerId = manpowerRequestVm.HiringManagerId,
                Level           = manpowerRequestVm.Level,
                Status          = 0,
                Title           = manpowerRequestVm.Title
            };
            var id = _manpowerRequestRepository.Add(manpowerRequest);

            this.CreateJob(id);
        }