public ActionResult CreateGroupLoanDisbursement(FormCollection form) { BankMasterViewDto objBank = new BankMasterViewDto(); List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks(); SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); ViewBag.federationbanks = lstFederationBanks; GuarantorDetailsDto objdto = new GuarantorDetailsDto(); List <GuarantorDetailsDto> lstobj = new List <GuarantorDetailsDto>(); int count = Convert.ToInt32(Request.Form["hdnMaxSecurityIndex"]); int AmountId = Convert.ToInt32(Request.Form["AmountId"]); DataTable dt = new DataTable(); dt.Columns.Add("LoanGuarantorMemberID", typeof(Int32)); dt.Columns.Add("LoanMasterID", typeof(Int32)); dt.Columns.Add("IsActive", typeof(bool)); dt.Columns.Add("CreatedBy", typeof(Int32)); dt.Columns.Add("CreatedOn", typeof(DateTime)); for (int i = 1; i <= count; i++) { var AccountCode = Convert.ToInt32(form["hdnAccountCode_" + i]); var AccountName = Convert.ToString(form["hdnAccountName_" + i]); dt.Rows.Add(AmountId, AccountCode, AccountName, UserInfo.UserID, DateTime.Now); } ResultDto resultdto = _groupLoanDisbursementService.GuarantorDetails(dt); return(Json(new { LoanMasterID = AmountId, Message = resultdto.Message, ObjectCode = resultdto.ObjectCode })); }
private void LoadDropDown() { var employeeSelectListDto = _employeeService.GetEmployeeCodeSelectList(); var employeeSelectList = new SelectList(employeeSelectListDto, "ID", "Text"); ViewBag.EmployeeNumber = employeeSelectList; var lstAccountHeads = _accountHeadService.GetJournalLedgers(); //SelectList SlaAHSelectList = new SelectList(lstAccountHeads, "AHID", "AHName"); //ViewBag.SLAAcHeads = SlaAHSelectList; List <SelectListDto> lstselectDto = _accountHeadService.GetGeneralReceiptLedgersDropDown(true); lstselectDto = lstselectDto.ToList().FindAll(l => l.Text != "Cash In Hand" && l.Text != "Bank Accounts" && l.ID != 365683 && l.ID != 365687).ToList(); SelectList lstahcode = new SelectList(lstselectDto, "ID", "Text"); ViewBag.SLAAcHeads = lstahcode; List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList(); SelectList slClusters = new SelectList(lstClusters, "ID", "Text"); ViewBag.clusters = slClusters; List <GroupLookupDto> lstGroupDto = _groupService.Lookup(); SelectList lstgroup = new SelectList(lstGroupDto, "GroupID", "GroupCode"); ViewBag.GroupNames = lstgroup; BankMasterViewDto objBank = new BankMasterViewDto(); List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks(); SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); ViewBag.federationbanks = lstFederationBanks; }
public ActionResult CreateGeneralPayments(FormCollection form) { List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true); SelectList lstahcode = new SelectList(lstselectDto, "ID", "Text"); ViewBag.ahcodes = lstahcode; BankMasterViewDto objBank = new BankMasterViewDto(); List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks(); SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); ViewBag.federationbanks = lstFederationBanks; long AccountMasterID = Convert.ToInt64(Request.Form["hdnObjectID"]); var generalpaymentsDto = ReadFormData(form); var resultDto = new ResultDto(); if (generalpaymentsDto.AccountMasterID == 0) { resultDto = _generalpaymentsService.Insert(generalpaymentsDto); } else { resultDto = _generalpaymentsService.Update(generalpaymentsDto); } ViewBag.Result = resultDto; return(View(generalpaymentsDto)); }
private void LoadDropDowns() { ReceiptMasterDto objreceipt = new ReceiptMasterDto(); List <SelectListDto> lstClusters = _ClusterService.GetClusterSelectList(); SelectList slClusters = new SelectList(lstClusters, "ID", "Text"); ViewBag.Clusters = slClusters; #region DropDowns List <SelectListDto> groupSelectList = _groupService.GetGroupByClusterID(objreceipt.ClusterID); SelectList lstGroupNames = new SelectList(groupSelectList, "ID", "Text"); ViewBag.GroupNames = lstGroupNames; //List<SelectListDto> villageSelectList = _villageService.GetVillageByClusterID(objreceipt.ClusterID); //SelectList lstvillage = new SelectList(villageSelectList, "ID", "Text"); //ViewBag.Village = lstvillage; //List<SelectListDto> groupSelectList = _groupService.GetGroupByVillageID(objreceipt.VillageID); //SelectList lstGroupNames = new SelectList(groupSelectList, "ID", "Text"); //ViewBag.GroupNames = lstGroupNames; //List<BankMasterViewDto> lstAllBanks = _groupReceiptService.GetGroupBanks(); //SelectList lstgroupBanks = new SelectList(lstAllBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); //ViewBag.GroupBanks = lstgroupBanks; #endregion DropDowns BankMasterViewDto objBank = new BankMasterViewDto(); List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks(); SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); ViewBag.federationbanks = lstFederationBanks; }
public ActionResult CreatePaymentsToFederation(FormCollection form) { bool isFederation = true; List <AccountHeadDto> lstslaccounts = _accountheadService.GetAll(isFederation).FindAll(f => f.AHLevel > 4 && f.IsSLAccount == false); SelectList slaccountno = new SelectList(lstslaccounts, "AHID", "AHCode"); ViewBag.slaccounts = slaccountno; List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList(); SelectList slClusters = new SelectList(lstClusters, "ID", "Text"); ViewBag.clusters = slClusters; List <GroupLookupDto> lstGroupDto = _groupService.Lookup(); SelectList lstgroup = new SelectList(lstGroupDto, "GroupID", "GroupCode"); ViewBag.GroupNames = lstgroup; List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true); SelectList lstahcode = new SelectList(lstselectDto, "ID", "Text"); ViewBag.ahcodes = lstahcode; BankMasterViewDto objBank = new BankMasterViewDto(); List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks(); SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); ViewBag.federationbanks = lstFederationBanks; long AccountMasterID = Convert.ToInt64(Request.Form["hdnObjectID"]); var generalpaymentsDto = ReadFormData(form); var resultDto = new ResultDto(); if (generalpaymentsDto.AccountMasterID == 0) { resultDto = _paymentsToFederationService.Insert(generalpaymentsDto); } else { resultDto = _paymentsToFederationService.Update(generalpaymentsDto); } List <uspAccountHeadGetAll_Result> lstuspAccountHeadGetAll_Result = _dbContext.uspAccountHeadGetAll().ToList(); var listOfSearchedIds = new List <string> { "2020", "2114", "1231", "1232", "1241", "1242", "1243" }; lstuspAccountHeadGetAll_Result = (lstuspAccountHeadGetAll_Result.Where(x => listOfSearchedIds.Contains(x.AHCode))).ToList(); SelectList FederationAHeads = new SelectList(lstuspAccountHeadGetAll_Result, "AHID", "AHName"); ViewBag.FederationAH = FederationAHeads; ViewBag.Result = resultDto; return(View(generalpaymentsDto)); }
public ActionResult CreateGeneralReceipt(FormCollection form) { bool isFederation = true; List <AccountHeadDto> lstslaccounts = _accountheadService.GetAll(isFederation).FindAll(f => f.AHLevel > 4 && f.IsSLAccount == false); SelectList slaccountno = new SelectList(lstslaccounts, "AHID", "AHCode"); ViewBag.slaccounts = slaccountno; List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true); SelectList lstahcode = new SelectList(lstselectDto, "ID", "Text"); ViewBag.ahcodes = lstahcode; BankMasterViewDto objBank = new BankMasterViewDto(); List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks(); SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); ViewBag.federationbanks = lstFederationBanks; long AccountMasterID = Convert.ToInt64(Request.Form["hdnObjectID"]); var generalreceiptDto = ReadFormData(form); var resultDto = new ResultDto(); if (generalreceiptDto.AccountMasterID == 0) { resultDto = _generalReceiptService.Insert(generalreceiptDto); } else { resultDto = _generalReceiptService.Update(generalreceiptDto); } int EmployeeID = UserInfo.UserID; EmployeeDto ObjEmployee = _employeeService.GetByID(EmployeeID); generalreceiptDto.EmployeeCode = ObjEmployee.EmployeeCode; generalreceiptDto.EmployeeName = ObjEmployee.EmployeeName; ViewBag.Result = resultDto; ViewBag.LockStatus = GroupInfo.LockStatus; return(View(generalreceiptDto)); }
public ActionResult CreateGeneralPayments(string Id) { long AccountMasterId = string.IsNullOrEmpty(Id.DecryptString()) ? default(int) : Convert.ToInt64(Id.DecryptString()); GeneralPaymentsDto objDto = new GeneralPaymentsDto(); if (AccountMasterId > 0) { objDto = _generalpaymentsService.GetByID(AccountMasterId); if (objDto.Addamount.Count > 0) { List <AddAmountDto> lstAccounts = new List <AddAmountDto>(); var list = objDto.Addamount; foreach (var i in list) { AddAmountDto Addamountdto = new AddAmountDto(); int ahId = i.AHID; bool isFederation = true; AccountHeadDto accountHeadDto = _accountheadService.GetAccountHeadViewBalanceSummary(ahId, isFederation); if (accountHeadDto.ClosingBalance != 0) { Decimal ClosingBalance = accountHeadDto.ClosingBalance - i.DrAmount; Addamountdto.Balance = ClosingBalance; } Addamountdto.AHID = i.AHID; Addamountdto.AHCode = i.AHCode; Addamountdto.AHName = i.AHName; Addamountdto.CrAmount = i.CrAmount; Addamountdto.DrAmount = i.DrAmount; lstAccounts.Add(Addamountdto); } objDto.Addamount = lstAccounts; } } List <SelectListDto> lstselectDto = _accountheadService.GetGeneralReceiptLedgersDropDown(true); SelectList lstahcode = new SelectList(lstselectDto, "ID", "Text"); ViewBag.ahcodes = lstahcode; BankMasterViewDto objBank = new BankMasterViewDto(); List <BankMasterViewDto> lstFedBanks = _groupReceiptService.GetFederationBanks(); SelectList lstFederationBanks = new SelectList(lstFedBanks, "BankEntryID", "AccountNumber", objBank.BankEntryID); ViewBag.federationbanks = lstFederationBanks; List <SelectListDto> lstClusters = _clusterService.GetClusterSelectList(); SelectList slClusters = new SelectList(lstClusters, "ID", "Text"); ViewBag.clusters = slClusters; List <GroupLookupDto> lstGroupDto = _groupService.Lookup(); SelectList lstgroup = new SelectList(lstGroupDto, "GroupID", "GroupCode"); ViewBag.GroupNames = lstgroup; int EmployeeID = UserInfo.UserID; EmployeeDto ObjEmployee = _employeeService.GetByID(EmployeeID); objDto.EmployeeCode = ObjEmployee.EmployeeCode; objDto.EmployeeName = ObjEmployee.EmployeeName; return(View(objDto)); }