public ActionResult CreateLoanSecurityMaster(LoanSecurityMasterModel objLoanSecurityMasterModel) { var resultDto = new ResultDto(); if (ModelState.IsValid) { var loansecurityMasterDto = Mapper.Map <LoanSecurityMasterModel, LoanSecurityMasterDto>(objLoanSecurityMasterModel); loansecurityMasterDto.UserID = UserInfo.UserID; if (loansecurityMasterDto.LoanSecurityID > 0) { resultDto = _loansecurityMasterService.Update(loansecurityMasterDto); } else { resultDto = _loansecurityMasterService.Insert(loansecurityMasterDto); } if (resultDto.ObjectId > 0) { loansecurityMasterDto = _loansecurityMasterService.GetByID(resultDto.ObjectId); objLoanSecurityMasterModel = AutoMapperEntityConfiguration.Cast <LoanSecurityMasterModel>(loansecurityMasterDto); resultDto.ObjectCode = objLoanSecurityMasterModel.LoanSecurityCode; } } SelectList loansecuritymaster = GetDropDownListByMasterCode(Enums.RefMasterCodes.LOAN_SECURITY_TYPE); ViewBag.LoanSecurityMaster = loansecuritymaster; ViewBag.Result = resultDto; return(View(objLoanSecurityMasterModel)); }
public ActionResult CreateGroup(int?id) { GroupModel groupModel = new GroupModel(); List <SelectListDto> lstVillages = _villageService.GetVillageSelectList(); SelectList slVillages = new SelectList(lstVillages, "ID", "Text"); List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList(); SelectList slClusters = new SelectList(lstClusters, "ID", "Text"); SelectList slMeetingFrrequency = GetDropDownListByMasterCode(Enums.RefMasterCodes.MEETING_FREQUENCY); List <SelectListDto> lstpanchayats = _panchayatService.GetPanchayatSelectList(); SelectList slPanchayat = new SelectList(lstpanchayats, "ID", "Text"); ViewBag.villages = slVillages; ViewBag.clusters = slClusters; ViewBag.panchayats = slPanchayat; ViewBag.MeetingFrrequency = slMeetingFrrequency; GroupMasterDto groupMasterDto = new GroupMasterDto(); if (id.HasValue && id.Value > 0) { groupMasterDto = _groupService.GetByID(id.Value); groupModel = AutoMapperEntityConfiguration.Cast <GroupModel>(groupMasterDto); } LoadRegularSavingAccountHeadDropDown(); ViewBag.Result = new ResultDto(); return(View("CreateGroup", groupModel)); }
public ActionResult AddBank(string id) { _log.Info("AddBank() HTTP GET METHOD BEGIN"); BankMasterModel bankMasterModel = new BankMasterModel(); try { int bankId = string.IsNullOrEmpty(id.DecryptString()) ? default(int) : Convert.ToInt32(id.DecryptString()); SelectList bankNames = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_NAME); SelectList accountTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_ACCOUNT_TYPE); ViewBag.BankNames = bankNames; ViewBag.AccountTypes = accountTypes; BankMasterDto bankMasterDto = new BankMasterDto(); if (bankId > 0) { bankMasterDto = _bankService.GetByID(bankId); bankMasterModel = AutoMapperEntityConfiguration.Cast <BankMasterModel>(bankMasterDto); } ViewBag.Result = new ResultDto(); } catch (Exception ex) { _log.Error("Error : Error occured in AddBank() Http Get Method", ex); } _log.Info("AddBank() HTTP GET METHOD END"); return(View("AddBank", bankMasterModel)); }
public ActionResult AddEditSubGroupAccountHead(AccountHeadModel accountHeadModel, FormCollection form) { ResultDto result = new ResultDto(); //if (ModelState.IsValid) //{ accountHeadModel.UserID = 1; accountHeadModel.StatusID = 1; accountHeadModel.IsFederation = false; accountHeadModel.AHID = accountHeadModel.EditAHID > 0 ? accountHeadModel.EditAHID : accountHeadModel.AHID; accountHeadModel.AHCode = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHCode) ? accountHeadModel.SubGroupAHCode : accountHeadModel.AHCode; accountHeadModel.AHName = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHName) ? accountHeadModel.SubGroupAHName : accountHeadModel.AHName; AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel); if (accountHeadModel.AHID > 0) { result = _accountHeadService.Update(accountHeadDto); } else { result = _accountHeadService.Insert(accountHeadDto); } //} TempData["SuccessMsg"] = result; return(RedirectToAction("AccountTree")); }
public ActionResult AddBank(BankMasterModel bankMasterModel) { ResultDto resultDto = new ResultDto(); if (ModelState.IsValid) { var bankMasterDto = Mapper.Map <BankMasterModel, BankMasterDto>(bankMasterModel); bankMasterDto.UserID = UserInfo.UserID; bankMasterDto.isMasterEntry = true; if (bankMasterModel.BankEntryID == 0) { resultDto = _bankService.Insert(bankMasterDto); } else { resultDto = _bankService.Update(bankMasterDto); } if (resultDto.ObjectId > 0) { bankMasterDto = _bankService.GetByID(resultDto.ObjectId); bankMasterModel = AutoMapperEntityConfiguration.Cast <BankMasterModel>(bankMasterDto); resultDto.ObjectCode = bankMasterDto.BankCode; } } SelectList bankNames = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_NAME); SelectList accountTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.BANK_ACCOUNT_TYPE); ViewBag.BankNames = bankNames; ViewBag.AccountTypes = accountTypes; ViewBag.Result = resultDto; return(View("AddBank", bankMasterModel)); }
public ActionResult CreateProject(string id) { int projectId = string.IsNullOrEmpty(id.DecryptString()) ? default(int) : Convert.ToInt32(id.DecryptString()); var projectMasterDto = new ProjectDto(); var projectMasterModel = new ProjectModel(); if (projectId > 0) { projectMasterDto = _projectService.GetByID(projectId); projectMasterDto.UserID = UserInfo.UserID; projectMasterModel = AutoMapperEntityConfiguration.Cast <ProjectModel>(projectMasterDto); } #region DropDowns List <SelectListDto> fundSourceSelectList = _fundSourceService.GetFundSourceSelectList(); SelectList SlstfoundSource = new SelectList(fundSourceSelectList, "ID", "Text", projectMasterDto.FundSourceID); ViewBag.foundSource = SlstfoundSource; SelectList projectPurposes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_PURPOSE); ViewBag.ProjectPurposes = projectPurposes; SelectList projectTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_TYPES); ViewBag.ProjectTypes = projectTypes; #endregion DropDowns ViewBag.Result = new ResultDto(); return(View("CreateProject", projectMasterModel)); }
public ClusterDto GetByID(int clusterID) { var objuspClusterGetByIdResult = _dbContext.uspClusterGetByID(clusterID).ToList().FirstOrDefault(); ClusterDto objClusterDto = AutoMapperEntityConfiguration.Cast <ClusterDto>(objuspClusterGetByIdResult); return(objClusterDto); }
public BranchDto GetByID(int branchId) { var objuspBranchGetByIdResult = _dbContext.uspBranchGetById(branchId).ToList().FirstOrDefault(); BranchDto objBranchDto = AutoMapperEntityConfiguration.Cast <BranchDto>(objuspBranchGetByIdResult); return(objBranchDto); }
public ProjectDto GetByID(int projectID) { uspProjectGetById_Result objuspProjectMasterGetByIdResult = _dbContext.uspProjectGetById(projectID).ToList().FirstOrDefault(); ProjectDto objProjectMasterDto = AutoMapperEntityConfiguration.Cast <ProjectDto>(objuspProjectMasterGetByIdResult); return(objProjectMasterDto); }
public MemberKYCDto GetByKycID(int memberkycId) { var objuspMemberKYCGetByMemberKYCIDResult = _dbContext.uspMemberKYCGetByMemberKYCID(memberkycId).ToList().FirstOrDefault(); MemberKYCDto objMemberKYCDto = AutoMapperEntityConfiguration.Cast <MemberKYCDto>(objuspMemberKYCGetByMemberKYCIDResult); return(objMemberKYCDto); }
public MandalDto GetByID(int MandalID) { var objuspMandalGetByIdResult = _dbContext.uspMandalGetByID(MandalID).ToList().FirstOrDefault(); MandalDto objMandalDto = AutoMapperEntityConfiguration.Cast <MandalDto>(objuspMandalGetByIdResult); return(objMandalDto); }
public EmployeeKYCDto GetByKycID(int employeekycId) { var objuspEmployeeKYCGetByEmployeeKYCIDResult = _dbContext.uspEmployeeKYCGetByEmployeeKYCID(employeekycId).ToList().FirstOrDefault(); EmployeeKYCDto objEmployeeKYCDto = AutoMapperEntityConfiguration.Cast <EmployeeKYCDto>(objuspEmployeeKYCGetByEmployeeKYCIDResult); return(objEmployeeKYCDto); }
//public List<BankMasterLookupDto> GetLookup() //{ // var lstBankMasterLookupDtos = new List<BankMasterLookupDto>(); // var uspBankMasterLookupResults = _dbContext.uspBankMasterLookup().ToList(); // foreach (var bank in uspBankMasterLookupResults) // { // BankMasterLookupDto lookupDto = Mapper.Map<uspBankMasterLookup_Result, BankMasterLookupDto>(bank); // lstBankMasterLookupDtos.Add(lookupDto); // } // return lstBankMasterLookupDtos; //} public BankMasterDto GetByID(int bankEntryId) { uspBankMasterGetByBankId_Result objuspBankMasterGetByBankIdResult = _dbContext.uspBankMasterGetByBankId(bankEntryId).ToList().FirstOrDefault(); BankMasterDto objBankMasterDto = AutoMapperEntityConfiguration.Cast <BankMasterDto>(objuspBankMasterGetByBankIdResult); return(objBankMasterDto); }
//public ActionResult BindDropDowns(int parentAhid, int accountHeadLevel, string Id,bool isFederation) //{ // StringBuilder sbDropdownOptions = new StringBuilder(); // #region ddlEditSubGroup // if (Id == "SubGroup") // { // StringBuilder sbAccountHeadOptions = new StringBuilder(); // StringBuilder sbSubGroupOptions = new StringBuilder(); // if (accountHeadLevel == 4) // { // var dropDownAccountHeadOptions = (from item in AccountHeadDtos // where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 4 // select new { AHCode = item.AHID + "_" + item.AHCode, AhName = item.AHName } // ); // foreach (var dropDownOption in dropDownAccountHeadOptions) // { // sbSubGroupOptions.Append("<option value='" + dropDownOption.AHCode + "'>" + dropDownOption.AhName + "</option>"); // } // } // else // { // var dropDownSubGroupOptions = (from item in AccountHeadDtos // where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 4 // select new { ParentAhid = item.AHID, AhName = item.AHName } // ); // foreach (var dropDownOption in dropDownSubGroupOptions) // { // sbSubGroupOptions.Append("<option value='" + dropDownOption.ParentAhid + "'>" + dropDownOption.AhName + "</option>"); // } // } // if (accountHeadLevel == 5) // { // var dropDownAccountHeadOptions = (from item in AccountHeadDtos // where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 5 // select new { AHCode = item.AHID + "_" + item.AHCode, AhName = item.AHName } // ); // foreach (var dropDownOption in dropDownAccountHeadOptions) // { // sbAccountHeadOptions.Append("<option value='" + dropDownOption.AHCode + "'>" + dropDownOption.AhName + "</option>"); // } // } // return Json(new { AccountHeadOptions = sbAccountHeadOptions != null ? sbAccountHeadOptions.ToString() : "", SubGroupOptions = sbSubGroupOptions != null ? sbSubGroupOptions.ToString() : "" }); // } // #endregion ddlEditSubGroup // else if (Id == "SearchAccountHead") // { // var dropDownAccountHeadOptions = (from item in AccountHeadDtos // where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 5 // select new { AHCode = item.AHID + "_" + item.AHCode, AhName = item.AHName } // ); // foreach (var dropDownOption in dropDownAccountHeadOptions) // { // sbDropdownOptions.Append("<option value='" + dropDownOption.AHCode + "'>" + dropDownOption.AhName + "</option>"); // } // return Json(new { DropDownOptions = sbDropdownOptions.ToString() }); // } // else if (Id == "MoveSubGroupAccountHead") // { // var subGroupFields = (from item in AccountHeadDtos // where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 4 // select new { ParentAhid = item.AHID, AhName = item.AHName } // ); // var accountHeadFields = (from item in AccountHeadDtos // where item.ParentAHID == parentAhid && item.IsFederation && item.AHLevel == 5 // select new { ParentAhid = item.AHID, AhName = item.AHName } // ); // return Json(new { SubGroupFields = subGroupFields, AccountHeadFields = accountHeadFields }); // } // else if (Id == "ViewBalanceAccountHead") // { // var dropDownOptions = (from item in AccountHeadDtos // where item.IsFederation && item.AHLevel == accountHeadLevel // select new { ParentAhid = item.AHID, AhName = item.AHName } // ); // foreach (var dropDownOption in dropDownOptions) // { // sbDropdownOptions.Append("<option value='" + dropDownOption.ParentAhid + "'>" + dropDownOption.AhName + "</option>"); // } // return Json(new { DropDownOptions = sbDropdownOptions.ToString() }); // } // else // { // var dropDownOptions = (from item in AccountHeadDtos // where item.ParentAHID == parentAhid && item.IsFederation // select new { ParentAhid = item.AHID, AhName = item.AHName } // ); // foreach (var dropDownOption in dropDownOptions) // { // sbDropdownOptions.Append("<option value='" + dropDownOption.ParentAhid + "'>" + dropDownOption.AhName + "</option>"); // } // return Json(new { DropDownOptions = sbDropdownOptions.ToString() }); // } //} public ActionResult MoveSubGroupOrAccountHead(AccountHeadModel accountHeadModel) { accountHeadModel.UserID = 1; accountHeadModel.StatusID = 1; accountHeadModel.ParentAHID = accountHeadModel.ParentMoveAHID; AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel); _accountHeadService.MoveAccountHead(accountHeadDto); return(RedirectToAction("GroupAccountTree")); }
public OrganizationDto GetAll() { var objuspOrganizationGetAllResult = _dbContext.uspOrganizationGetAll(null).ToList().FirstOrDefault(); OrganizationDto objOrganizationDto = new OrganizationDto(); if (objuspOrganizationGetAllResult != null) { objOrganizationDto = AutoMapperEntityConfiguration.Cast <OrganizationDto>(objuspOrganizationGetAllResult); } return(objOrganizationDto); }
public ActionResult MoveSubGroupOrAccountHead(AccountHeadModel accountHeadModel) { ResultDto result = new ResultDto(); accountHeadModel.UserID = 1; accountHeadModel.StatusID = 1; accountHeadModel.ParentAHID = accountHeadModel.ParentMoveAHID; AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel); result = _accountHeadService.MoveAccountHead(accountHeadDto); TempData["SuccessMsg"] = result; return(RedirectToAction("AccountTree")); }
public ActionResult AddEditSubGroupAccountHead(AccountHeadModel accountHeadModel, FormCollection form) { ResultDto result = new ResultDto(); //if (ModelState.IsValid) //{ bool isFederation = string.IsNullOrEmpty(form.Get("isFederation")) ? true : Convert.ToBoolean(form.Get("isFederation")); accountHeadModel.UserID = 1; accountHeadModel.StatusID = 1; accountHeadModel.IsFederation = isFederation; accountHeadModel.AHID = accountHeadModel.EditAHID > 0 ? accountHeadModel.EditAHID : accountHeadModel.AHID; accountHeadModel.AHCode = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHCode) ? accountHeadModel.SubGroupAHCode : accountHeadModel.AHCode; accountHeadModel.AHName = !string.IsNullOrEmpty(accountHeadModel.SubGroupAHName) ? accountHeadModel.SubGroupAHName : accountHeadModel.AHName; accountHeadModel.TE_AHName = !string.IsNullOrEmpty(accountHeadModel.SubGroupTEAHName) ? accountHeadModel.SubGroupTEAHName : accountHeadModel.TE_AHName; AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel); if (accountHeadModel.AHID > 0) { result = _accountHeadService.Update(accountHeadDto); } else { result = _accountHeadService.Insert(accountHeadDto); } //} ViewBag.IsFederation = isFederation; TempData["SuccessMsg"] = result; if (isFederation) { return(RedirectToAction("AccountTree")); } else { return(RedirectToAction("GroupAccountTree")); } }
public ActionResult CreateVillage(FormCollection Form) { var resultDto = new ResultDto(); int villageId = default(int); int clusterId = default(int); int.TryParse(Request.Form["VillageID"], out villageId); int.TryParse(Request.Form["ClusterID"], out clusterId); VillageModel objVillage = new VillageModel(); objVillage.VillageID = villageId; objVillage.ClusterID = clusterId; objVillage.Village = Convert.ToString(Request.Form["txtVillage"]); objVillage.TEVillageName = Convert.ToString(Request.Form["TEVillageName"]); objVillage.VillageCode = Convert.ToString(Request.Form["VillageCode"]); if (ModelState.IsValid) { var villageDto = Mapper.Map <VillageModel, VillageDto>(objVillage); villageDto.UserID = UserInfo.UserID; if (villageDto.VillageID > 0) { resultDto = _villageService.Update(villageDto); } else { resultDto = _villageService.Insert(villageDto); } if (resultDto.ObjectId > 0) { villageDto = _villageService.GetByID(resultDto.ObjectId); objVillage = AutoMapperEntityConfiguration.Cast <VillageModel>(villageDto); resultDto.ObjectCode = villageDto.VillageCode; } } LoadDropDowns(objVillage.StateID, objVillage.DistrictID, objVillage.MandalID, objVillage.ClusterID); ViewBag.Result = resultDto; return(View(objVillage)); }
public ActionResult CreateProject(ProjectModel objprojectModel) { ResultDto resultDto = new ResultDto(); if (ModelState.IsValid) { var projectMasterDto = Mapper.Map <ProjectModel, ProjectDto>(objprojectModel); projectMasterDto.UserID = UserInfo.UserID; if (objprojectModel.ProjectID == 0) { resultDto = _projectService.Insert(projectMasterDto); } else { resultDto = _projectService.Update(projectMasterDto); } if (resultDto.ObjectId > 0) { projectMasterDto = _projectService.GetByID(resultDto.ObjectId); objprojectModel = AutoMapperEntityConfiguration.Cast <ProjectModel>(projectMasterDto); resultDto.ObjectCode = projectMasterDto.ProjectCode; } } #region DropDowns var projectMasterdto = new ProjectDto(); List <SelectListDto> fundSourceSelectList = _fundSourceService.GetFundSourceSelectList(); SelectList SlstfoundSource = new SelectList(fundSourceSelectList, "ID", "Text", projectMasterdto.FundSourceID); ViewBag.foundSource = SlstfoundSource; SelectList projectPurposes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_PURPOSE); ViewBag.ProjectPurposes = projectPurposes; SelectList projectTypes = GetDropDownListByMasterCode(Enums.RefMasterCodes.PRJ_TYPES); ViewBag.ProjectTypes = projectTypes; #endregion DropDowns ViewBag.Result = resultDto; return(View("CreateProject", objprojectModel)); }
public ActionResult MoveSubGroupOrAccountHead(AccountHeadModel accountHeadModel) { bool isFederation = string.IsNullOrEmpty(Request.Form.Get("isFederation")) ? true : Convert.ToBoolean(Request.Form.Get("isFederation")); ResultDto result = new ResultDto(); accountHeadModel.UserID = 1; accountHeadModel.StatusID = 1; accountHeadModel.ParentAHID = accountHeadModel.ParentMoveAHID; AccountHeadDto accountHeadDto = AutoMapperEntityConfiguration.Cast <AccountHeadDto>(accountHeadModel); result = _accountHeadService.MoveAccountHead(accountHeadDto); ViewBag.IsFederation = isFederation; TempData["SuccessMsg"] = result; if (isFederation) { return(RedirectToAction("AccountTree")); } else { return(RedirectToAction("GroupAccountTree")); } }
public ActionResult CreateLoanPurpose(LoanPurposeModel objLoanPurpose) { var resultDto = new ResultDto(); if (ModelState.IsValid) { var loanPurposeDto = Mapper.Map <LoanPurposeModel, LoanPurposeDto>(objLoanPurpose); loanPurposeDto.UserID = UserInfo.UserID; if (loanPurposeDto.LoanPurposeID == 0) { resultDto = _loanpurposeService.Insert(loanPurposeDto); } else { resultDto = _loanpurposeService.Update(loanPurposeDto); } if (resultDto.ObjectId > 0) { loanPurposeDto = _loanpurposeService.GetByID(resultDto.ObjectId); objLoanPurpose = AutoMapperEntityConfiguration.Cast <LoanPurposeModel>(loanPurposeDto); resultDto.ObjectCode = loanPurposeDto.LoanPurposeCode; } } //SelectList loanpurpose = GetDropDownListByMasterCode(Enums.RefMasterCodes.LOAN_PURPOSE_TYPE); //ViewBag.LoanPurpose = loanpurpose; List <SelectListDto> Projects = _projectService.GetProjectSelectList(); SelectList lst = new SelectList(Projects, "ID", "Text"); ViewBag.Projects = lst; ViewBag.Result = resultDto; return(View(objLoanPurpose)); }
public ActionResult CreateMember(MemberModel objmembermodel, List <HttpPostedFileBase> fileUpload, FormCollection form) { string CurrentTab = Request.Form.Get("CurrentTab"); ViewBag.CurrentTab = CurrentTab; var resultDto = new ResultDto(); #region Drop Downs SelectList educationQualification = GetDropDownListByMasterCode(Enums.RefMasterCodes.EDUCATION_QUALIFICATION); ViewBag.educationQualification = educationQualification; 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; #endregion Drop Downs MemberDto memberDto = new MemberDto(); MemberModel fileModelTemp = new MemberModel(); // Insert Or Update Member Personal Details if (CurrentTab.ToUpper() == Enums.MemberTabs.PERSONALDETAILS.ToString().ToUpper()) { //BEGIN PHOTO SAVING string directoryPath = "AssetUploads/Member/" + objmembermodel.MemberID; if (!Directory.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, directoryPath))) { Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, directoryPath)); } var file = Request.Files["Photo"]; string guid = Guid.NewGuid().ToString(); string extension = Path.GetExtension(file.FileName); string fullFileName = directoryPath + "/" + guid + extension; file.SaveAs(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fullFileName)); objmembermodel.Photo = fullFileName; //END PHOTO SAVING memberDto = Mapper.Map <MemberModel, MemberDto>(objmembermodel); memberDto.UserID = UserInfo.UserID; if (memberDto.MemberID == 0) { resultDto = _memberservice.Insert(memberDto); } else { resultDto = _memberservice.Update(memberDto); } } else if (CurrentTab.ToUpper() == Enums.MemberTabs.FAMILYDETAILS.ToString().ToUpper()) { memberDto = Mapper.Map <MemberModel, MemberDto>(objmembermodel); memberDto.UserID = UserInfo.UserID; resultDto = _memberservice.UpdateFamily(memberDto); resultDto.ObjectId = objmembermodel.MemberID; resultDto.ObjectCode = objmembermodel.MemberCode; List <MemberKYCDto> lstKyc = new List <MemberKYCDto>(); MemberKycModel objkycdto = new MemberKycModel(); lstKyc = _memberKycService.GetByMemberID(objmembermodel.MemberID); List <ReferenceValueDto> lstReferenceValueDto = _referenceValueService.GetByRefMasterCode(Enums.RefMasterCodes.KYCTYPE.ToString()); //AADHAR var aadharref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.AADHAR.ToString().ToUpper()); var fileAadhar = Request.Files["fileAadhar"]; if (fileAadhar != null && fileAadhar.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["AADHAR"]) ? Request.Form["AADHAR"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == aadharref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == aadharref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileAadhar, objmembermodel.MemberID, aadharref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.AadharImagePath = obj.FileName; fileModelTemp.AadharNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == aadharref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == aadharref.RefID); fileModelTemp.AadharImagePath = obj.FileName; fileModelTemp.AadharNo = obj.KYCNumber; } } //VOTER var voterref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.VOTERID.ToString().ToUpper()); var fileVoter = Request.Files["fileVoter"]; if (fileVoter != null && fileVoter.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["VoterID"]) ? Request.Form["VoterID"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == voterref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == voterref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileVoter, objmembermodel.MemberID, voterref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.VoterImagePath = obj.FileName; fileModelTemp.VoterNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == voterref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == voterref.RefID); fileModelTemp.VoterImagePath = obj.FileName; fileModelTemp.VoterNo = obj.KYCNumber; } } //PAN var panref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.PAN.ToString().ToUpper()); var filepan = Request.Files["filePan"]; if (filepan != null && filepan.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["PANCard"]) ? Request.Form["PANCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == panref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == panref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(filepan, objmembermodel.MemberID, panref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.PANImagePath = obj.FileName; fileModelTemp.PANNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == panref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == panref.RefID); fileModelTemp.PANImagePath = obj.FileName; fileModelTemp.PANNo = obj.KYCNumber; } } //RATION var rationref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.RATIONCARD.ToString().ToUpper()); var fileration = Request.Files["fileRation"]; if (fileration != null && fileration.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["RationCard"]) ? Request.Form["RationCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == rationref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == rationref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileration, objmembermodel.MemberID, rationref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.RationImagePath = obj.FileName; fileModelTemp.RationNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == rationref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == rationref.RefID); fileModelTemp.RationImagePath = obj.FileName; fileModelTemp.RationNo = obj.KYCNumber; } } //JOB CARD var Jobcardref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.JOBCARD.ToString().ToUpper()); var fileJobcard = Request.Files["fileJobcard"]; if (fileJobcard != null && fileJobcard.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["JobCard"]) ? Request.Form["JobCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == Jobcardref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == Jobcardref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileJobcard, objmembermodel.MemberID, Jobcardref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.JobcardImagePath = obj.FileName; fileModelTemp.JobcardNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == Jobcardref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == Jobcardref.RefID); fileModelTemp.JobcardImagePath = obj.FileName; fileModelTemp.JobcardNo = obj.KYCNumber; } } } else if (CurrentTab.ToUpper() == Enums.MemberTabs.GENERALACCOUNTHEAD.ToString().ToUpper()) { memberDto = Mapper.Map <MemberModel, MemberDto>(objmembermodel); memberDto.UserID = UserInfo.UserID; resultDto = _memberservice.UpdateAccountHead(memberDto); resultDto.ObjectId = objmembermodel.MemberID; resultDto.ObjectCode = objmembermodel.MemberCode; List <MemberKYCDto> lstKyc = new List <MemberKYCDto>(); MemberKycModel objkycdto = new MemberKycModel(); lstKyc = _memberKycService.GetByMemberID(resultDto.ObjectId); List <ReferenceValueDto> lstReferenceValueDto = _referenceValueService.GetByRefMasterCode(Enums.RefMasterCodes.KYCTYPE.ToString()); //AADHAR var aadharref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.AADHAR.ToString().ToUpper()); var fileAadhar = Request.Files["fileAadhar"]; if (fileAadhar != null && fileAadhar.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["AADHAR"]) ? Request.Form["AADHAR"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == aadharref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == aadharref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileAadhar, objmembermodel.MemberID, aadharref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.AadharImagePath = obj.FileName; fileModelTemp.AadharNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == aadharref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == aadharref.RefID); fileModelTemp.AadharImagePath = obj.FileName; fileModelTemp.AadharNo = obj.KYCNumber; } } //VOTER var voterref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.VOTERID.ToString().ToUpper()); var fileVoter = Request.Files["fileVoter"]; if (fileVoter != null && fileVoter.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["VoterID"]) ? Request.Form["VoterID"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == voterref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == voterref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileVoter, objmembermodel.MemberID, voterref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.VoterImagePath = obj.FileName; fileModelTemp.VoterNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == voterref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == voterref.RefID); fileModelTemp.VoterImagePath = obj.FileName; fileModelTemp.VoterNo = obj.KYCNumber; } } //PAN var panref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.PAN.ToString().ToUpper()); var filepan = Request.Files["filePan"]; if (filepan != null && filepan.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["PANCard"]) ? Request.Form["PANCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == panref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == panref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(filepan, objmembermodel.MemberID, panref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.PANImagePath = obj.FileName; fileModelTemp.PANNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == panref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == panref.RefID); fileModelTemp.PANImagePath = obj.FileName; fileModelTemp.PANNo = obj.KYCNumber; } } //RATION var rationref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.RATIONCARD.ToString().ToUpper()); var fileration = Request.Files["fileRation"]; if (fileration != null && fileration.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["RationCard"]) ? Request.Form["RationCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == rationref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == rationref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileration, objmembermodel.MemberID, rationref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.RationImagePath = obj.FileName; fileModelTemp.RationNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == rationref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == rationref.RefID); fileModelTemp.RationImagePath = obj.FileName; fileModelTemp.RationNo = obj.KYCNumber; } } //JOB CARD var Jobcardref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.JOBCARD.ToString().ToUpper()); var fileJobcard = Request.Files["fileJobcard"]; if (fileJobcard != null && fileJobcard.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["JobCard"]) ? Request.Form["JobCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == Jobcardref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == Jobcardref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileJobcard, objmembermodel.MemberID, Jobcardref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.JobcardImagePath = obj.FileName; fileModelTemp.JobcardNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == Jobcardref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == Jobcardref.RefID); fileModelTemp.JobcardImagePath = obj.FileName; fileModelTemp.JobcardNo = obj.KYCNumber; } } } else if (CurrentTab.ToUpper() == Enums.MemberTabs.PROOFS.ToString().ToUpper()) { List <MemberKYCDto> lstKyc = new List <MemberKYCDto>(); MemberKycModel objkycdto = new MemberKycModel(); lstKyc = _memberKycService.GetByMemberID(objmembermodel.MemberID); List <ReferenceValueDto> lstReferenceValueDto = _referenceValueService.GetByRefMasterCode(Enums.RefMasterCodes.KYCTYPE.ToString()); //AADHAR var aadharref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.AADHAR.ToString().ToUpper()); var fileAadhar = Request.Files["fileAadhar"]; if (fileAadhar != null && fileAadhar.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["AADHAR"]) ? Request.Form["AADHAR"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == aadharref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == aadharref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileAadhar, objmembermodel.MemberID, aadharref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.AadharImagePath = obj.FileName; fileModelTemp.AadharNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == aadharref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == aadharref.RefID); fileModelTemp.AadharImagePath = obj.FileName; fileModelTemp.AadharNo = obj.KYCNumber; } } //VOTER var voterref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.VOTERID.ToString().ToUpper()); var fileVoter = Request.Files["fileVoter"]; if (fileVoter != null && fileVoter.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["VoterID"]) ? Request.Form["VoterID"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == voterref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == voterref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileVoter, objmembermodel.MemberID, voterref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.VoterImagePath = obj.FileName; fileModelTemp.VoterNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == voterref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == voterref.RefID); fileModelTemp.VoterImagePath = obj.FileName; fileModelTemp.VoterNo = obj.KYCNumber; } } //PAN var panref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.PAN.ToString().ToUpper()); var filepan = Request.Files["filePan"]; if (filepan != null && filepan.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["PANCard"]) ? Request.Form["PANCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == panref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == panref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(filepan, objmembermodel.MemberID, panref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.PANImagePath = obj.FileName; fileModelTemp.PANNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == panref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == panref.RefID); fileModelTemp.PANImagePath = obj.FileName; fileModelTemp.PANNo = obj.KYCNumber; } } //RATION var rationref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.RATIONCARD.ToString().ToUpper()); var fileration = Request.Files["fileRation"]; if (fileration != null && fileration.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["RationCard"]) ? Request.Form["RationCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == rationref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == rationref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileration, objmembermodel.MemberID, rationref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.RationImagePath = obj.FileName; fileModelTemp.RationNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == rationref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == rationref.RefID); fileModelTemp.RationImagePath = obj.FileName; fileModelTemp.RationNo = obj.KYCNumber; } } //JOB CARD var Jobcardref = lstReferenceValueDto.Find(l => l.RefCode.ToUpper() == Enums.KycType.JOBCARD.ToString().ToUpper()); var fileJobcard = Request.Files["fileJobcard"]; if (fileJobcard != null && fileJobcard.ContentLength > 0) { objkycdto.KYCNumber = !string.IsNullOrEmpty(Request.Form["JobCard"]) ? Request.Form["JobCard"] : ""; if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == Jobcardref.RefID) != null) { objkycdto.MemberKYCID = lstKyc.Find(f => f.KYCType == Jobcardref.RefID).MemberKYCID; } MemberKYCDto obj = SaveKYC(fileJobcard, objmembermodel.MemberID, Jobcardref.RefID, objkycdto.KYCNumber, objkycdto.MemberKYCID); fileModelTemp.JobcardImagePath = obj.FileName; fileModelTemp.JobcardNo = obj.KYCNumber; } else { if (lstKyc != null && lstKyc.Count > 0 && lstKyc.Find(f => f.KYCType == Jobcardref.RefID) != null) { MemberKYCDto obj = lstKyc.Find(f => f.KYCType == Jobcardref.RefID); fileModelTemp.JobcardImagePath = obj.FileName; fileModelTemp.JobcardNo = obj.KYCNumber; } } resultDto.Message = "Member KYC data saved successfully for member code : " + objmembermodel.MemberCode; resultDto.ObjectId = objmembermodel.MemberID; resultDto.ObjectCode = objmembermodel.MemberCode; } else if (CurrentTab.ToUpper() == Enums.MemberTabs.LEADERSHIP.ToString().ToUpper()) { memberDto.leaderShipLevel = Convert.ToString(Request.Form["Leadership"]); memberDto.designation = Convert.ToInt32(Request.Form["FederationDesigination"]); memberDto.FromDate = Convert.ToDateTime(Request.Form["FromDate"]); memberDto.MemberID = objmembermodel.MemberID; resultDto = _memberservice.UpdateMemberLeaderShip(memberDto.MemberID, memberDto.leaderShipLevel, memberDto.designation, memberDto.FromDate, UserInfo.UserID); resultDto.ObjectId = objmembermodel.MemberID; resultDto.ObjectCode = objmembermodel.MemberCode; resultDto.Message = "Leadership details saved successfully for member code : " + objmembermodel.MemberCode; var lstmemberleadership = _memberservice.LeaderShipLookUp(objmembermodel.MemberID); ViewBag.LeadershipDetails = lstmemberleadership; } if (resultDto.ObjectId > 0) { memberDto = _memberservice.GetById(resultDto.ObjectId); objmembermodel = AutoMapperEntityConfiguration.Cast <MemberModel>(memberDto); OrganizationService _organizationService = new OrganizationService(); OrganizationDto org = _organizationService.GetAll(); ViewBag.MemberRetirementAge = org != null ? org.MemberRetirementAge : 60; //fill values get back objmembermodel.JobcardNo = fileModelTemp.JobcardNo; objmembermodel.JobcardImagePath = fileModelTemp.JobcardImagePath; objmembermodel.VoterNo = fileModelTemp.VoterNo; objmembermodel.VoterImagePath = fileModelTemp.VoterImagePath; objmembermodel.AadharNo = fileModelTemp.AadharNo; objmembermodel.AadharImagePath = fileModelTemp.AadharImagePath; objmembermodel.PANNo = fileModelTemp.PANNo; objmembermodel.PANImagePath = fileModelTemp.PANImagePath; objmembermodel.RationNo = fileModelTemp.RationNo; objmembermodel.RationImagePath = fileModelTemp.RationImagePath; if (objmembermodel.DOB != DateTime.MinValue) { objmembermodel.DateOfRetirement = objmembermodel.DOB.AddYears(org.MemberRetirementAge); } resultDto.ObjectCode = memberDto.MemberCode; } ModelState.Clear(); int groupid = GroupInfo.GroupID; PanchayatLookupDto panchayatlookupDto = _panchayatService.GetByGroupID(groupid); objmembermodel.GroupID = GroupInfo.GroupID; objmembermodel.GroupName = GroupInfo.GroupName; objmembermodel.GroupCode = GroupInfo.GroupCode; objmembermodel.cluster = GroupInfo.Cluster; objmembermodel.village = GroupInfo.Village; objmembermodel.panchayat = panchayatlookupDto.Panchayat; ViewBag.Result = resultDto; return(View(objmembermodel)); }