Пример #1
0
        public ActionResult Index()
        {
            LedgerTransactionSummaryModel model = new LedgerTransactionSummaryModel();
            var ts = SessionStore.GetTravelSession();

            model.DateFrom = DateTime.Now.AddDays(-15);
            model.DateTo   = DateTime.Now;

            model.ProductsOption   = ledgerTransactionSummaryProvider.GetProductOption();
            model.CurrencyOption   = ledgerTransactionSummaryProvider.GetCurrencyOption();
            model.LedgerOfOption   = ledgerTransactionSummaryProvider.GetLedgerOfOption();
            model.FilterTypeOption = ledgerTransactionSummaryProvider.GerFilterTypeoption();

            return(View(model));
        }
Пример #2
0
        public List <LedgerTransactionSummaryModel> GetSummeryOfLedgerTransactionList(int?ProductId, int CurrencyId, int Type, DateTime DateFrom, DateTime DateTo, int?FilterType, float FilterValue)
        {
            var Data = entity.GL_GetSummeryOfLedgerTransaction(ProductId, CurrencyId, Type, DateFrom, DateTo, FilterType, FilterValue);
            List <LedgerTransactionSummaryModel> Listcollection = new List <LedgerTransactionSummaryModel>();

            foreach (var item in Data)
            {
                LedgerTransactionSummaryModel singleone = new LedgerTransactionSummaryModel()
                {
                    ClosingBalance = item.ClosingBalance,
                    Cr             = item.Cr,
                    Dr             = item.Dr,
                    LedgerId       = item.LedgerId,
                    LedgerName     = item.LedgerName,
                    OpeningBalance = item.OpeningBalance
                };
                Listcollection.Add(singleone);
            }
            return(Listcollection);
        }
Пример #3
0
        public ActionResult Index(ATLTravelPortal.Areas.Airline.Models.ExportModel Expmodel, LedgerTransactionSummaryModel model, FormCollection frm)
        {
            model.LedgerTransactionList = ledgerTransactionSummaryProvider.GetSummeryOfLedgerTransactionList(model.ProductId, model.CurrencyId, model.LedgerOf, model.DateFrom, model.DateTo, model.FilterType, model.FilterValue);

            BookedTicketReportController crtBKT = new BookedTicketReportController();

            crtBKT.GetExportTypeClicked(Expmodel, frm);

            if (Expmodel != null && (Expmodel.ExportTypeExcel != null || Expmodel.ExportTypeWord != null || Expmodel.ExportTypeCSV != null || Expmodel.ExportTypePdf != null))
            {
                try
                {
                    if (Expmodel.ExportTypeExcel != null)
                    {
                        Expmodel.ExportTypeExcel = Expmodel.ExportTypeExcel;
                    }
                    else if (Expmodel.ExportTypeWord != null)
                    {
                        Expmodel.ExportTypeWord = Expmodel.ExportTypeWord;
                    }
                    else if (Expmodel.ExportTypePdf != null)
                    {
                        Expmodel.ExportTypePdf = Expmodel.ExportTypePdf;
                    }
                    int counter    = 1;
                    var exportData = model.LedgerTransactionList.Select(m => new
                    {
                        SN              = counter++,
                        Ledger_Id       = m.LedgerId,
                        Ledger_Name     = m.LedgerName,
                        Opening_Balance = m.OpeningBalance,
                        Dr              = m.Dr,
                        Cr              = m.Cr,
                        Closing_Balance = m.ClosingBalance
                    });
                    App_Class.AppCollection.Export(Expmodel, exportData, "Ledger Transaction");
                }
                catch
                {
                }
            }
            model.ProductsOption   = ledgerTransactionSummaryProvider.GetProductOption();
            model.CurrencyOption   = ledgerTransactionSummaryProvider.GetCurrencyOption();
            model.LedgerOfOption   = ledgerTransactionSummaryProvider.GetLedgerOfOption();
            model.FilterTypeOption = ledgerTransactionSummaryProvider.GerFilterTypeoption();

            return(View(model));
        }