public List <AgentLedgerTransactionsModel> GetTransactionList(int?AgentLedgerId, int productId, DateTime FromDate, DateTime ToDate, int Currency, int Type) { EntityModel ent = new EntityModel(); var data = ent.Air_GetLedgerTransaction(AgentLedgerId, productId, Currency, Type, FromDate, ToDate); List <AgentLedgerTransactionsModel> list = new List <AgentLedgerTransactionsModel>(); foreach (var item in data) { var temp = new AgentLedgerTransactionsModel { Balance = item.Balance, CrAmount = item.CrAmount, DrAmount = item.DrAmount, DrCr = item.DrCr, Narration1 = item.Narration1, RefrenceNo = item.RefrenceNo, TranID = item.TranID, VoucherNumber = item.VoucherNumber.Value, TranDate = item.TranDate }; list.Add(temp); } return(list.ToList()); }
public ActionResult Index() { var ts = SessionStore.GetTravelSession(); AgentLedgerTransactionsModel model = new AgentLedgerTransactionsModel(); model.DistributorList = ser.GetAllAdminDistributorList(); model.Currencies = ser.GetAllCurrenciesList(); return(View(model)); }
public ActionResult Index(AgentLedgerTransactionsModel model) { model.LedgerList = pro.GetTransactionList(model.AgentId, model.ProductId, (DateTime)model.FromDate, (DateTime)model.ToDate, model.CurrencyId, 1); model.AgentList = pro.GetAllAgentList(); if (model.AgentId != null) { model.AvailableBalance = new ATLTravelPortal.Areas.Airline.Repository.GeneralProvider().GetAccountInfoByAgentId(model.AgentId.Value); model.CreditLimitList = new CreditLimitProvider().GetAgentCreditLimitListByAgentId(model.AgentId.Value); } model.ProductList = pro.GetAllProductList(); ViewData["Currency"] = new SelectList(pro.GetCurrencies(), "CurrencyId", "CurrencyCode"); return(View(model)); }
public ActionResult Index() { AgentLedgerTransactionsModel model = new AgentLedgerTransactionsModel { AgentList = pro.GetAllAgentList(), ProductList = pro.GetAllProductList(), }; ViewData["Currency"] = new SelectList(pro.GetCurrencies(), "CurrencyId", "CurrencyCode"); model.FromDate = DateTime.Now.AddDays(-30); model.ToDate = DateTime.Now; return(View(model)); }
public ActionResult Index(AgentLedgerTransactionsModel model) { GeneralRepository _generalRepo = new GeneralRepository(); model.LedgerList = pro.GetTransactionList(model.DistributorId, 1, (DateTime)model.FromDate, (DateTime)model.ToDate, model.CurrencyId, 3); model.DistributorList = ser.GetAllAdminDistributorList(); if (model.DistributorId > 0) { model.AvailableBalance = new Airline.Repository.GeneralProvider().GetDistributorAccountInfoByDistributorId(model.DistributorId.Value); model.CreditLimitList = new CreditLimitProvider().GetLedgerCreditLimitList(model.DistributorId.Value); } model.Currencies = ser.GetAllCurrenciesList(); return(View(model)); }
public ActionResult Index(AgentLedgerTransactionsModel model) { var ts = SessionStore.GetTravelSession(); GeneralRepository _generalRepo = new GeneralRepository(); model.LedgerList = pro.GetTransactionList(ts.LoginTypeId, 1, (DateTime)model.FromDate, (DateTime)model.ToDate, model.CurrencyId, 3); model.AgentList = ser.GetAllAgentListByDistributorId(); if (model.AgentId > 0) { model.AvailableBalance = new Airline.Repository.GeneralProvider().GetAgentAccountInfoByAgentId(model.AgentId.Value); model.CreditLimitList = new CreditLimitProvider().GetAgentCreditLimitListByAgentId(model.AgentId.Value); } model.Currencies = ser.GetAllCurrenciesList(); return(View(model)); }
public ActionResult Index() { var ts = SessionStore.GetTravelSession(); AgentLedgerTransactionsModel model = new AgentLedgerTransactionsModel(); model.DistributorList = ser.GetAllDistributorList(); model.Currencies = ser.GetAllCurrenciesList(); //model.ToDate = GeneralRepository.CurrentDateTime(); //model.FromDate = GeneralRepository.CurrentDateTime().AddDays(-15); //model.LedgerList = pro.GetTransactionList(model.DistributorId, 1, model.FromDate, model.ToDate, model.CurrencyId); //if (model.DistributorId > 0) //{ // model.AvailableBalance = new Airline.Repository.GeneralProvider().GetDistributorAccountInfoByDistributorId(model.DistributorId); // model.CreditLimitList = new CreditLimitProvider().GetLedgerCreditLimitList(model.DistributorId); //} return(View(model)); }