Ejemplo n.º 1
0
        public ActionResult PartialTransactionReport(DateTime?startDate, DateTime?endDate)
        {
            var minStartDate = startDate == null ? startDate : CustomHelper.ConvertToMinDate(startDate);
            var maxEndDate   = endDate == null ? endDate : CustomHelper.ConvertToMaxDate(endDate);
            var viewModel    = new TransactionDataAccess().GetTransactions(minStartDate, maxEndDate);

            return(PartialView("_partialTransactionReport", viewModel));
        }
Ejemplo n.º 2
0
        public ActionResult PartialRecoveryReport(string CardNo, string AccountNo, string BranchCode, DateTime?StartDate, DateTime?EndDate)
        {
            var minStartDate = StartDate == null ? StartDate : CustomHelper.ConvertToMinDate(StartDate);
            var maxEndDate   = EndDate == null ? EndDate : CustomHelper.ConvertToMaxDate(EndDate);
            var data         = new RequestDataAccess().GetRecoveryDataForReport(CardNo, AccountNo, BranchCode, minStartDate.GetValueOrDefault(), maxEndDate.GetValueOrDefault());
            var viewModel    = data.ToHTMLTable(Url.Action("Export", "Report"));

            return(Content(viewModel));
        }
Ejemplo n.º 3
0
        public ActionResult PartialRequestReport(string CardNo, string AccountNo, string BranchCode, int?CardTypeId, string CIF, long?RequestNo, int?Waive, string RequestType, string ReportType, DateTime?StartDate, DateTime?EndDate, string AuthorizeStatus)
        {
            Waive      = Waive ?? -1;
            CardTypeId = CardTypeId ?? -1;
            RequestNo  = RequestNo ?? -1;
            var minStartDate = StartDate == null ? StartDate : CustomHelper.ConvertToMinDate(StartDate);
            var maxEndDate   = EndDate == null ? EndDate : CustomHelper.ConvertToMaxDate(EndDate);
            var data         = new RequestDataAccess().GetRequestDataForReport(CardNo, AccountNo, BranchCode, CardTypeId, CIF, RequestNo, Waive, RequestType, ReportType, minStartDate.GetValueOrDefault(), maxEndDate.GetValueOrDefault(), AuthorizeStatus);
            var viewModel    = data.ToHTMLTable(Url.Action("Export", "Report"));

            return(Content(viewModel));
        }
Ejemplo n.º 4
0
        public ActionResult PartialExceptionReport(DateTime?startDate, DateTime?endDate)
        {
            var minStartDate = startDate == null ? startDate : CustomHelper.ConvertToMinDate(startDate);
            var maxEndDate   = endDate == null ? endDate : CustomHelper.ConvertToMaxDate(endDate);

            var data      = new UserLogDataAccess().GetExceptionLog("Import", minStartDate, maxEndDate, "M");
            var viewModel = new List <ExceptionLogReportVM>();

            foreach (var item in data.Where(e => !string.IsNullOrEmpty(e.Descp)).ToList())
            {
                var datum = JsonConvert.DeserializeObject <List <ExceptionLogReportVM> >(item.Descp);
                datum.ForEach(e => e.Timestamp = item.ActionTimestamp);
                viewModel.AddRange(datum);
            }

            return(PartialView("_partialExceptionReport", viewModel));
        }
Ejemplo n.º 5
0
        public ActionResult PartialCurrentRecoveryReport(string CardNo, string AccountNo, string BranchCode, DateTime?StartDate, DateTime?EndDate, string RequestType, string CIF, DateTime?TransDate)
        {
            try
            {
                var minStartDate = StartDate == null ? StartDate : CustomHelper.ConvertToMinDate(StartDate);
                var maxEndDate   = EndDate == null ? EndDate : CustomHelper.ConvertToMaxDate(EndDate);
                var data         = new RequestDataAccess().GetDataForCurrentRecovery(CardNo, AccountNo, BranchCode, minStartDate.GetValueOrDefault(), maxEndDate.GetValueOrDefault(), RequestType, CIF);
                //***Add Row  Total in datatable
                if (data.Rows.Count >= 1)
                {
                    DataRow row = data.NewRow();
                    row[data.Columns[0].ColumnName.ToString()] = DBNull.Value;
                    row[data.Columns[1].ColumnName.ToString()] = "";
                    row[data.Columns[2].ColumnName.ToString()] = "";

                    row[data.Columns[3].ColumnName.ToString()] = "";
                    row[data.Columns[4].ColumnName.ToString()] = "";
                    row[data.Columns[5].ColumnName.ToString()] = "";

                    row[data.Columns[6].ColumnName.ToString()] = data.Compute("Sum([" + data.Columns[6].ColumnName.ToString() + "])", "[" + data.Columns[6].ColumnName.ToString() + "] > 0");
                    row[data.Columns[7].ColumnName.ToString()] = data.Compute("Sum([" + data.Columns[7].ColumnName.ToString() + "])", "[" + data.Columns[7].ColumnName.ToString() + "] > 0");
                    row[data.Columns[8].ColumnName.ToString()] = data.Compute("Sum([" + data.Columns[8].ColumnName.ToString() + "])", "[" + data.Columns[8].ColumnName.ToString() + "] > 0");

                    row[data.Columns[9].ColumnName.ToString()]  = "";
                    row[data.Columns[10].ColumnName.ToString()] = DBNull.Value;


                    data.Rows.Add(row);
                }

                var viewModel = data.ToHTMLTable(Url.Action("Export", "Report"));

                return(Content(viewModel));
            }
            catch (Exception ex)
            { throw ex; }
        }
Ejemplo n.º 6
0
        public ActionResult PartialCardImportReport(ReportCardImportVM request)
        {
            var minProductionDate = request.CardProductionDate == null ? request.CardProductionDate : CustomHelper.ConvertToMinDate(request.CardProductionDate);
            var minCardImportDate = request.CardImportDate == null ? request.CardImportDate : CustomHelper.ConvertToMinDate(request.CardImportDate);
            var data = new FileImportDataAccess().GetFileImports(request.AccountNo, request.CardNo, request.BranchCode, request.CardTypeId, minProductionDate, minCardImportDate);
            var html = data.ToHTMLTable(Url.Action("Export", "Report"));

            return(Content(html));
        }