public async Task <InterviewProcessDetailModel> Handle(GetInterviewProcessDetailQuery request, CancellationToken cancellationToken)
            {
                var interviewprocess = new InterviewProcess();

                interviewprocess = await _context.GetById(request.Id);

                return(InterviewProcessDetailModel.Create(interviewprocess));
            }
示例#2
0
 public async void Add(InterviewProcess obj)
 {
     try
     {
         await DbSet.InsertOneAsync(obj);
     }
     catch (Exception ex)
     { }
 }
            public async Task <bool> Handle(UpdateInterviewProcessCommand request, CancellationToken cancellationToken)
            {
                var interviewProcess = new InterviewProcess();

                interviewProcess.Id             = request.Id;
                interviewProcess.FeedbackStatus = request.FeedbackStatus;
                interviewProcess.EndDate        = System.DateTime.Now;
                var result = await _context.Update(interviewProcess);

                return(result);
            }
            public async Task <Unit> Handle(CreateInterviewProcessCommand request, CancellationToken cancellationToken)
            {
                var entity = new InterviewProcess
                {
                    CandidateId    = request.CandidateId,
                    FeedbackStatus = request.FeedbackStatus,
                    StartDate      = System.DateTime.Now,
                    EndDate        = System.DateTime.Now
                };

                _context.Add(entity);
                return(Unit.Value);
            }
        public HttpResponseMessage ShowViewToReceptionist(DateTime date)
        {
            var list         = new List <ShowView>();
            var responseCode = HttpStatusCode.OK;

            try
            {
                InterviewProcess cc = new InterviewProcess();
                list = cc.ShowViewToGajju(date);
            }
            catch (Exception e)
            {
                responseCode = HttpStatusCode.BadRequest;
            }
            return(Request.CreateResponse(responseCode, list));
        }
        public HttpResponseMessage ScheduleTime([FromBody] InterviewSchedule Schedule)
        {
            var responseCode = HttpStatusCode.OK;

            try
            {
                InterviewProcess cc = new InterviewProcess();
                cc.ScheduleInterview(Schedule);
            }
            catch (Exception e)
            {
                responseCode = HttpStatusCode.BadRequest;
            }
            return(new HttpResponseMessage {
                StatusCode = responseCode
            });
        }
        public HttpResponseMessage GetFrontDeskData(DateTime date)
        {
            var responseCode = HttpStatusCode.OK;;

            try
            {
                InterviewProcess cc = new InterviewProcess();
                cc.ReturnFrontDesk(date);
            }
            catch (Exception e)
            {
                responseCode = HttpStatusCode.BadRequest;
            }
            return(new HttpResponseMessage {
                StatusCode = responseCode
            });
        }
示例#8
0
        public async Task <bool> Update(InterviewProcess obj)
        {
            bool result   = false;
            var  filterId = Builders <InterviewProcess> .Filter.Eq(i => i.Id, obj.Id);

            var data = await DbSet.FindAsync(filterId);

            try {
                var interviewProcess = data.FirstOrDefault();
                if (!string.IsNullOrEmpty(obj.FeedbackStatus))
                {
                    interviewProcess.FeedbackStatus = obj.FeedbackStatus;
                }
                interviewProcess.EndDate = obj.EndDate;
                result = Convert.ToBoolean(await DbSet.FindOneAndReplaceAsync(filterId, interviewProcess));
            }
            catch (Exception ex)
            {
            }
            return(result);
        }
        public HttpResponseMessage CreateCandidate([FromBody] Candidate value)
        {
            var responseCode = HttpStatusCode.OK;;

            try
            {
                InterviewProcess cc = new InterviewProcess();
                int id         = cc.CreateCandidate(value);
                var interSched = new InterviewSchedule();
                interSched.CandidateId = id;
                interSched.RoomId      = value.interviewSchedule.RoomId;
                interSched.UserId      = value.interviewSchedule.UserId;
                interSched.Date        = value.interviewSchedule.Date;
                interSched.Time        = value.interviewSchedule.Time;
                cc.ScheduleInterview(interSched);
            }
            catch (Exception e)
            {
                responseCode = HttpStatusCode.BadRequest;
            }
            return(new HttpResponseMessage {
                StatusCode = responseCode
            });
        }
示例#10
0
 public static InterviewProcessDetailModel Create(InterviewProcess interviewProcess)
 {
     return(Projection.Compile().Invoke(interviewProcess));
 }