Esempio n. 1
0
        public ActionResult ProcessRequest(int stakeHolderId, string stakeHolderOrganization)
        {
            var model = new ReportRequestViewModel();

            model.StakeHolderId           = stakeHolderId;
            model.StakeHolderOrganization = stakeHolderOrganization;
            model.JobStatus = Req.Enums.JobStatus.New;
            ViewBag.Takers  = _takerBLL.GetTakers();
            return(View(model));
        }
Esempio n. 2
0
        //public ActionResult AssignJob()
        //{
        //    var priorityJob = (Job)_jobQueueService.PriorityQue.Dequeue();
        //    var takerId = (int)(Session[Constants.TakerId]);
        //    priorityJob.AssignedToId = takerId;
        //    priorityJob.Status = Req.Enums.JobStatus.Assigned;
        //    _jobBLL.UpdateJob(priorityJob);
        //    var jobs = _jobBLL.GetJobsByTakerId(takerId).ToList();
        //    return View("ViewJobs", jobs);
        //}

        public ActionResult EditJobForStakeHolder(int jobId)
        {
            var job           = _jobBLL.GetJobById(jobId);
            var stakeHolderId = (int)(Session[Constants.StakeHolderId]);
            var stakeHolder   = _stakeHolderBLL.GetStakeHolderById(stakeHolderId);
            //var filePath = _fileBLL.GetFolderPath(job.JobId);
            //if (Directory.Exists(filePath))
            //{
            //    files = Directory.GetFiles(filePath);
            //}
            var folderPath = _fileBLL.GetFolderPath(job.JobId);

            string[] files = null;
            try
            {
                files = Directory.GetFiles(folderPath, "*.*", SearchOption.AllDirectories) != null?Directory.GetFiles(folderPath, "*.*", SearchOption.AllDirectories) : null;
            }
            catch
            {
            }

            var model = new UpdateStakeHolderJobViewModel
            {
                JobId = jobId,
                EstimatedTimeInHours  = job.EstimatedTimeHour,
                ActualTimeTakenHrPart = job.ActualTimeTakenHour,
                AssignedTakerId       = job.AssignedToId,
                ReportedBy            = job.ReportedBy.ClientOrganization,
                CreatedOn             = job.CreatedOn,
                JobTitle       = job.JobTitle,
                JobType        = job.JobCategory,
                JobStatus      = job.Status,
                JobDescription = job.JobDescription,
                ReleaseVersion = job.ReleaseVersion,
                Comments       = job.Comments,
                LastUpdatedOn  = job.UpdatedOn,
                JobPriority    = job.JobPriority,
                FileNames      = files
            };

            ViewBag.Takers = _takerBLL.GetTakers();
            return(View(model));
        }