Beispiel #1
0
        public ActionResult PegawaiKadetForm(int id, int acquisitionid)
        {
            var vm = new ResumeViewModel() { ApplicantModel = new ApplicantModel() { ApplicantId = 0, NationalityCd = "MYS", GenderCd = "L" }, AcquisitionId = acquisitionid };

            if (id != 0 && acquisitionid != 0)
            {
                var applicant = ObjectBuilder.GetObject<IApplicantSubmittedPersistence>("ApplicantSubmittedPersistence").GetApplicant(id, acquisitionid);
                if (null != applicant)
                {
                    vm.ApplicantModel = new ApplicantModel(applicant, acquisitionid);
                }
            }
            else
            {
                vm.ApplicantModel = new ApplicantModel(new ApplicantSubmitted() { ColorBlindInd = true }, acquisitionid);
            }

            var acq = ObjectBuilder.GetObject<IAcquisitionPersistence>("AcquisitionPersistence").GetAcquisition(acquisitionid);
            if (null != acq)
            {
                vm.Acquisition = acq;
                vm.ServiceCode = acq.AcquisitionType.ServiceCd;
            }
            return View(vm);
        }
Beispiel #2
0
        public ActionResult TUDMForm(int id, int acquisitionid)
        {
            var vm = new ResumeViewModel() { ApplicantModel = new ApplicantModel() { ApplicantId = 0, NationalityCd = "MYS", GenderCd = "L" }, AcquisitionId = acquisitionid };
            var zones = ObjectBuilder.GetObject<IReferencePersistence>("ReferencePersistence").GetZones();
            if (null != zones && zones.Any())
                vm.Zones.AddRange(zones);

            if (id != 0 && acquisitionid != 0)
            {
                var applicant = ObjectBuilder.GetObject<IApplicantSubmittedPersistence>("ApplicantSubmittedPersistence").GetApplicant(id, acquisitionid);
                if (null != applicant)
                {
                    vm.ApplicantModel = new ApplicantModel(applicant, acquisitionid);
                }
            }
            else
            {
                vm.ApplicantModel = new ApplicantModel(new ApplicantSubmitted() { ColorBlindInd = true }, acquisitionid);
            }

            var acq = ObjectBuilder.GetObject<IAcquisitionPersistence>("AcquisitionPersistence").GetAcquisition(acquisitionid);
            if (null != acq)
            {

                if (null != acq.AcquisitionType)
                {
                    vm.ServiceCode = acq.AcquisitionType.ServiceCd;
                    vm.AcquisitionName = acq.AcquisitionType.AcquisitionTypeNm;
                }
                vm.AcquisitionSiri = acq.Siri.Value;
                vm.AcquisitionYear = acq.Year.Value;
                vm.Acquisition = acq;
            }
            return View(vm);
        }
Beispiel #3
0
        public ActionResult PegawaiKadetForm(int id)
        {
            var vm = new ResumeViewModel() { ApplicantModel = new ApplicantModel() { ApplicantId = 0, NationalityCd = "MYS", GenderCd = "L" }, AcquisitionId = id };
            var login = ObjectBuilder.GetObject<ILoginUserPersistance>("LoginUserPersistance").GetByUserName(User.Identity.Name);
            if (null != login && id != 0)
            {
                if (login.ApplicantId.HasValue && login.ApplicantId.Value != 0)
                {
                    var applicant = ObjectBuilder.GetObject<IApplicantPersistence>("ApplicantPersistence").GetApplicant(login.ApplicantId.Value);
                    if (null != applicant)
                    {
                        vm.ApplicantModel = new ApplicantModel(applicant, id);
                    }
                }
                else
                {
                    vm.ApplicantModel = new ApplicantModel(new Applicant() { NewICNo = login.LoginId, Email = login.Email, FullName = login.FullName, ColorBlindInd = true }, id);
                }

                vm.ApplicantModel.FullName = login.FullName;
                vm.ApplicantModel.Email = login.Email;
                vm.ApplicantModel.NewIcNo = login.LoginId;

                var acq = ObjectBuilder.GetObject<IAcquisitionPersistence>("AcquisitionPersistence").GetAcquisition(id);
                if (null != acq)
                {
                    vm.Acquisition = acq;
                    vm.ServiceCode = acq.AcquisitionType.ServiceCd;
                }
            }
            return View(vm);
        }
Beispiel #4
0
        public ActionResult TDForm(int id)
        {
            var vm = new ResumeViewModel() { ApplicantModel = new ApplicantModel() { ApplicantId = 0, NationalityCd = "MYS", GenderCd = "L" }, AcquisitionId = id };
            var zones = ObjectBuilder.GetObject<IReferencePersistence>("ReferencePersistence").GetZones();
            if (null != zones && zones.Any())
                vm.Zones.AddRange(zones);

            var login = ObjectBuilder.GetObject<ILoginUserPersistance>("LoginUserPersistance").GetByUserName(User.Identity.Name);
            if (null != login && id != 0)
            {
                if (login.ApplicantId.HasValue && login.ApplicantId.Value != 0)
                {
                    var applicant = ObjectBuilder.GetObject<IApplicantPersistence>("ApplicantPersistence").GetApplicant(login.ApplicantId.Value);
                    if (null != applicant)
                    {
                        vm.ApplicantModel = new ApplicantModel(applicant, id);
                    }
                }
                else
                {
                    vm.ApplicantModel = new ApplicantModel(new Applicant() { NewICNo = login.LoginId, Email = login.Email, FullName = login.FullName, ColorBlindInd = true }, id);
                }
                vm.ApplicantModel.FullName = login.FullName;
                vm.ApplicantModel.Email = login.Email;
                vm.ApplicantModel.NewIcNo = login.LoginId;

                var acq = ObjectBuilder.GetObject<IAcquisitionPersistence>("AcquisitionPersistence").GetAcquisition(id);
                if (null != acq)
                {
                    if (null != acq.AcquisitionType)
                    {
                        vm.ServiceCode = acq.AcquisitionType.ServiceCd;
                        vm.AcquisitionName = acq.AcquisitionType.AcquisitionTypeNm;
                    }
                    vm.AcquisitionSiri = acq.Siri.Value;
                    vm.AcquisitionYear = acq.Year.Value;
                    vm.Acquisition = acq;
                }
            }
            vm.MaritalStatuses.AddRange(ObjectBuilder.GetObject<IReferencePersistence>("ReferencePersistence").GetMaritalStatus());
            return View(vm);
        }
Beispiel #5
0
        public ActionResult Resume()
        {
            var vm = new ResumeViewModel() { ApplicantModel = new ApplicantModel() { ApplicantId = 0, NationalityCd = "MYS" } };
            var login = ObjectBuilder.GetObject<ILoginUserPersistance>("LoginUserPersistance").GetByUserName(User.Identity.Name);
            if (null != login)
            {
                vm.ApplicantModel.FullName = login.FullName;
                vm.ApplicantModel.Email = login.Email;
                vm.ApplicantModel.NewIcNo = login.LoginId;
                if (login.ApplicantId.HasValue && login.ApplicantId.Value != 0)
                {
                    var applicant = ObjectBuilder.GetObject<IApplicantPersistence>("ApplicantPersistence").GetApplicant(login.ApplicantId.Value);
                    if (null != applicant)
                    {
                        vm.ApplicantModel = new ApplicantModel(applicant, 0);
                    }
                }

                // get all high education level
                var refrepos = new ReferenceRepo();
                var he = refrepos.GetHighEduLevels();
                if (he.Any())
                {
                    he = he.OrderBy(a => a.IndexNo);
                    foreach (var h in he)
                    {
                        var edu = new ApplicantEducation() { HighEduLevelCd = h.HighEduLevelCd, HighEduLevel = h.HighestEduLevel };
                        if (h.HighEduLevelCd == "14")
                        {
                            var subjects = refrepos.GetSubjects(h.HighEduLevelCd);
                            if (subjects.Any())
                                foreach (var s in subjects)
                                    edu.ApplicantEduSubjectCollection.Add(new ApplicantEduSubject() { SubjectCd = s.SubjectCd, Subject = s.SubjectDescription });
                        }
                        vm.ApplicantModel.ApplicantEducations.Add(edu);
                    }
                }
            }
            var repos = new ReferenceRepo();
            vm.MaritalStatuses.AddRange(repos.GetMaritalStatus());
            return View(vm);
        }