public void FillEmployeeKYC(ref EmployeeModel employeeModel) { List <EmployeeKYCDto> objEmployeekyc = new List <EmployeeKYCDto>(); if (employeeModel.EmployeeID > 0) { objEmployeekyc = _employeeKycService.GetByEmployeeID(employeeModel.EmployeeID); } if (objEmployeekyc != null && objEmployeekyc.Count > 0) { List <ReferenceValueDto> kycTypeRefereces = _referenceValueService.GetByRefMasterCode(Enums.RefMasterCodes.KYCTYPE.ToString()); //Fill Employee Model With Kyc Aadhar details var aarharType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.AADHAR.ToString())); EmployeeKYCDto AadharKYC = objEmployeekyc.Find(a => a.KYCType == aarharType.RefID); if (AadharKYC != null) { employeeModel.AadharNo = AadharKYC.KYCNumber; employeeModel.AadharImagePath = AadharKYC.FileName; } //Fill Employee Model With Kyc PAN details var panType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.PAN.ToString())); EmployeeKYCDto panKYC = objEmployeekyc.Find(a => a.KYCType == panType.RefID); if (panKYC != null) { employeeModel.PANNo = panKYC.KYCNumber; employeeModel.PANImagePath = panKYC.FileName; } //Fill Employee Model With Kyc Voter details var voterType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.VOTERID.ToString())); EmployeeKYCDto voterKYC = objEmployeekyc.Find(a => a.KYCType == voterType.RefID); if (voterKYC != null) { employeeModel.VoterNo = voterKYC.KYCNumber; employeeModel.VoterImagePath = voterKYC.FileName; } //Fill Employee Model With Kyc Ration details var rationType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.RATIONCARD.ToString())); EmployeeKYCDto rationKYC = objEmployeekyc.Find(a => a.KYCType == rationType.RefID); if (rationKYC != null) { employeeModel.RationNo = rationKYC.KYCNumber; employeeModel.RationImagePath = rationKYC.FileName; } //Fill Employee Model With Kyc Ration details var bankaccountType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.BANKACCOUNT.ToString())); EmployeeKYCDto bankKYC = objEmployeekyc.Find(a => a.KYCType == bankaccountType.RefID); if (bankKYC != null) { employeeModel.BankAccountNo = bankKYC.KYCNumber; employeeModel.BankImagePath = bankKYC.FileName; } } }
public ActionResult CreateMember(string id) { int memberId = string.IsNullOrEmpty(id.DecryptString()) ? default(int) : Convert.ToInt32(id.DecryptString()); OrganizationService _organizationService = new OrganizationService(); OrganizationDto org = _organizationService.GetAll(); ViewBag.MemberRetirementAge = org != null ? org.MemberRetirementAge : 60; ViewBag.EducationQualification = GetDropDownListByMasterCode(Enums.RefMasterCodes.EDUCATION_QUALIFICATION); SelectList nomineeRelationship = GetDropDownListByMasterCode(Enums.RefMasterCodes.NOMINEE_RELATIONSHIP); ViewBag.nomineeRelationship = nomineeRelationship; SelectList parentGuardionRelationship = GetDropDownListByMasterCode(Enums.RefMasterCodes.PARENT_GUARDIAN_RELATIONSHIP); ViewBag.parentGuardionRelationship = parentGuardionRelationship; SelectList socialCategory = GetDropDownListByMasterCode(Enums.RefMasterCodes.SOCIAL_CATEGORY); ViewBag.socialCategory = socialCategory; SelectList monthlyIncome = GetDropDownListByMasterCode(Enums.RefMasterCodes.MONTHLY_INCOME); ViewBag.monthlyIncome = monthlyIncome; SelectList incomefrequency = GetDropDownListByMasterCode(Enums.RefMasterCodes.INCOME_FREQUENCY); ViewBag.incomefrequency = incomefrequency; SelectList religion = GetDropDownListByMasterCode(Enums.RefMasterCodes.RELIGION); ViewBag.religion = religion; List <SelectListDto> lstoccupationDto = _occupationService.GetOccupationSelectList(); SelectList lstoccupation = new SelectList(lstoccupationDto, "ID", "Text"); ViewBag.OccupationName = lstoccupation; List <GroupLookupDto> lstGroupDto = _groupService.Lookup(); SelectList lstgroup = new SelectList(lstGroupDto, "GroupID", "GroupCode"); ViewBag.GroupNames = lstgroup; List <SelectListDto> lstaccountheaddto = _accountheadservice.GetAccountHeadSelectList(); SelectList lstaccounthead = new SelectList(lstaccountheaddto, "ID", "Text"); ViewBag.accounthead = lstaccounthead; SelectList FederationDesigination = GetDropDownListByMasterCode(Enums.RefMasterCodes.FED_DESG); ViewBag.FED_DESG = FederationDesigination; SelectList GroupDesigination = GetDropDownListByMasterCode(Enums.RefMasterCodes.GROUP_DESG); ViewBag.GROUP_DESG = GroupDesigination; SelectList ClusterDesigination = GetDropDownListByMasterCode(Enums.RefMasterCodes.CLUSTER_DESG); ViewBag.CLUSTER_DESG = ClusterDesigination; MemberDto memberdto = new MemberDto(); if (memberId > 0) { memberdto = _memberservice.GetById(memberId); if (memberdto.DOB != DateTime.MinValue) { memberdto.DateOfRetirement = memberdto.DOB.AddYears(org.MemberRetirementAge); } } MemberModel memberModel = Mapper.Map <MemberDto, MemberModel>(memberdto); List <MemberKYCDto> memberkycdto = new List <MemberKYCDto>(); if (memberId > 0) { memberkycdto = _memberKycService.GetByMemberID(memberId); if (memberkycdto != null && memberkycdto.Count > 0) { List <ReferenceValueDto> kycTypeRefereces = _referenceValueService.GetByRefMasterCode(Enums.RefMasterCodes.KYCTYPE.ToString()); //Fill Member Model With Kyc Aadhar details var aarharType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.AADHAR.ToString())); MemberKYCDto AadharKYC = memberkycdto.Find(a => a.KYCType == aarharType.RefID); if (AadharKYC != null) { memberModel.AadharNo = AadharKYC.KYCNumber; memberModel.AadharImagePath = AadharKYC.FileName; } //Fill Member Model With Kyc PAN details var panType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.PAN.ToString())); MemberKYCDto panKYC = memberkycdto.Find(a => a.KYCType == panType.RefID); if (panKYC != null) { memberModel.PANNo = panKYC.KYCNumber; memberModel.PANImagePath = panKYC.FileName; } //Fill Member Model With Kyc Voter details var voterType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.VOTERID.ToString())); MemberKYCDto voterKYC = memberkycdto.Find(a => a.KYCType == voterType.RefID); if (voterKYC != null) { memberModel.VoterNo = voterKYC.KYCNumber; memberModel.VoterImagePath = voterKYC.FileName; } //Fill Member Model With Kyc Ration details var rationType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.RATIONCARD.ToString())); MemberKYCDto rationKYC = memberkycdto.Find(a => a.KYCType == rationType.RefID); if (rationKYC != null) { memberModel.RationNo = rationKYC.KYCNumber; memberModel.RationImagePath = rationKYC.FileName; } //Fill Member Model With Kyc Ration details var jobcardType = (kycTypeRefereces.Find(k => k.RefCode.ToUpper() == Utilities.Enums.KycType.JOBCARD.ToString())); MemberKYCDto jobcardKYC = memberkycdto.Find(a => a.KYCType == jobcardType.RefID); if (jobcardKYC != null) { memberModel.JobcardNo = jobcardKYC.KYCNumber; memberModel.JobcardImagePath = jobcardKYC.FileName; } } } if (memberId > 0) { ViewBag.MemberID = memberId; } int groupid = GroupInfo.GroupID; PanchayatLookupDto panchayatlookupDto = _panchayatService.GetByGroupID(groupid); memberModel.GroupID = GroupInfo.GroupID; memberModel.GroupName = GroupInfo.GroupName; memberModel.GroupCode = GroupInfo.GroupCode; memberModel.cluster = GroupInfo.Cluster; memberModel.village = GroupInfo.Village; memberModel.panchayat = panchayatlookupDto.Panchayat; //int GroupId = GroupInfo.GroupID; var lstmemberleadership = _memberservice.LeaderShipLookUp(memberId); ViewBag.LeadershipDetails = lstmemberleadership; //return View(lstmemberleadership); return(View(memberModel)); }