예제 #1
0
        public ActionResult Create(int?id)
        {
            var organisationId = UserOrganisationId;

            id = id ?? 0;
            var admission       = _nidanBusinessService.RetrieveAdmissionGrid(organisationId, id.Value, e => true);
            var companies       = _nidanBusinessService.RetrieveCompanies(organisationId, e => true);
            var companyBranches = _nidanBusinessService.RetrieveCompanyBranches(organisationId, e => true);
            var viewModel       = new CandidatePostPlacementViewModel
            {
                AdmissionId            = id.Value,
                BatchId                = admission.BatchId ?? 0,
                CandidateName          = admission.CandidateName,
                Mobile                 = admission.Mobile,
                EmailId                = admission.EmailId,
                Course                 = admission.CourseName,
                Companies              = new SelectList(companies, "CompanyId", "Name"),
                CompanyBranches        = new SelectList(companyBranches, "CompanyBranchId", "CompanyBranchName"),
                CandidatePostPlacement = new CandidatePostPlacement()
                {
                    AdmissionId = id.Value,
                    BatchId     = admission.BatchId ?? 0
                }
            };

            return(View(viewModel));
        }
예제 #2
0
        public ActionResult CompanyBranchByCompanyId(int companyId, Paging paging, List <OrderBy> orderBy)
        {
            bool isSuperAdmin   = User.IsSuperAdmin();
            var  centreId       = UserCentreId;
            var  organisationId = UserOrganisationId;
            var  data           = _nidanBusinessService.RetrieveCompanyBranches(organisationId, p => (isSuperAdmin || p.CentreId == centreId) && p.CompanyId == companyId, orderBy, paging);

            return(this.JsonNet(data));
        }
        public ActionResult Create(int?id)
        {
            var organisationId = UserOrganisationId;

            id = id ?? 0;
            var admission       = _nidanBusinessService.RetrieveAdmissionGrid(organisationId, id.Value, e => true);
            var companies       = _nidanBusinessService.RetrieveCompanies(organisationId, e => true);
            var companyBranches = _nidanBusinessService.RetrieveCompanyBranches(organisationId, e => true);
            var placementStates = _nidanBusinessService.RetrievePlacementStates(organisationId, e => true);
            var candidateFinalPlacementLastRecord = _nidanBusinessService.RetrieveCandidateFinalPlacements(organisationId, e => e.AdmissionId == id.Value).Items.LastOrDefault();
            var candidatefinalPlacement           = candidateFinalPlacementLastRecord.CandidateFinalPlacementId != null
                ? new CandidateFinalPlacement()
            {
                AdmissionId          = id.Value,
                BatchId              = admission.BatchId ?? 0,
                IsFinalPlacementDone = candidateFinalPlacementLastRecord.IsFinalPlacementDone
            }
                : new CandidateFinalPlacement()
            {
                AdmissionId = id.Value,
                BatchId     = admission.BatchId ?? 0
            };
            var viewModel = new CandidateFinalPlacementViewModel
            {
                AdmissionId   = id.Value,
                BatchId       = admission.BatchId ?? 0,
                CandidateName = admission.CandidateName,
                Mobile        = admission.Mobile,
                EmailId       = admission.EmailId,
                Course        = admission.CourseName,
                //CandidateFinalPlacementId = candidateFinalPlacementLastRecord?.CandidateFinalPlacementId ?? 0,
                Companies               = new SelectList(companies, "CompanyId", "Name"),
                CompanyBranches         = new SelectList(companyBranches, "CompanyBranchId", "CompanyBranchName"),
                PlacementStates         = new SelectList(placementStates, "PlacementStatusId", "Name"),
                CandidateFinalPlacement = candidatefinalPlacement
            };

            return(View(viewModel));
        }