Example #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));
        }
Example #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));
        }
Example #3
0
        public ActionResult PartialDailyReversalReport(string CardNo, string AccountNo, string BranchCode, DateTime?ApplicableDateFrom, DateTime?ApplicableDateTo, string RequestType, string CIF, DateTime?TransDate)
        {
            try
            {
                var maxEndDate = TransDate == null ? TransDate : CustomHelper.ConvertToMaxDate(TransDate);
                var data       = new RequestDataAccess().GetDataForDailyReversal(CardNo, AccountNo, BranchCode, maxEndDate.GetValueOrDefault());
                if (data.Rows.Count >= 1)
                {
                    DataRow row = data.NewRow();
                    row[data.Columns[0].ColumnName.ToString()] = DBNull.Value;
                    row[data.Columns[1].ColumnName.ToString()] = DBNull.Value;
                    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()] = "";

                    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()] = "";

                    row[data.Columns[11].ColumnName.ToString()] = "";
                    row[data.Columns[12].ColumnName.ToString()] = data.Compute("Sum([" + data.Columns[12].ColumnName.ToString() + "])", "[" + data.Columns[12].ColumnName.ToString() + "] > 0");
                    row[data.Columns[13].ColumnName.ToString()] = "";
                    row[data.Columns[14].ColumnName.ToString()] = "";
                    row[data.Columns[15].ColumnName.ToString()] = "";
                    row[data.Columns[16].ColumnName.ToString()] = "";

                    row[data.Columns[17].ColumnName.ToString()] = "";
                    row[data.Columns[18].ColumnName.ToString()] = data.Compute("Sum([" + data.Columns[18].ColumnName.ToString() + "])", "[" + data.Columns[18].ColumnName.ToString() + "] > 0");
                    row[data.Columns[19].ColumnName.ToString()] = "";
                    row[data.Columns[20].ColumnName.ToString()] = "";
                    row[data.Columns[21].ColumnName.ToString()] = "";
                    row[data.Columns[22].ColumnName.ToString()] = "";
                    row[data.Columns[23].ColumnName.ToString()] = "";
                    row[data.Columns[24].ColumnName.ToString()] = data.Compute("Sum([" + data.Columns[24].ColumnName.ToString() + "])", "[" + data.Columns[24].ColumnName.ToString() + "] > 0");
                    row[data.Columns[25].ColumnName.ToString()] = "";
                    row[data.Columns[26].ColumnName.ToString()] = "";



                    data.Rows.Add(row);
                }

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

                return(Content(viewModel));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #4
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));
        }
Example #5
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));
        }
Example #6
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; }
        }