Exemplo n.º 1
0
        public async Task <IActionResult> InvoiceSummaryReportList(InvoiceSummaryReport invoiceSummaryReport, PaginationDataTableModel pagination)
        {
            IEnumerable <InvoiceSummaryReport> all = null;

            if (all == null)
            {
                // lấy thong tin từ api
                var dataTable = await this._httpService.FetchDataTableFromGetUrl(
                    this._configuration["ApiUrl"] + ApiRoute.InvoiceSummaryReport + "?" + this._common.ToQueryString(new InvoiceSummaryReport()
                {
                    Id = invoiceSummaryReport.Id,
                }));

                all = dataTable.ToListItem <InvoiceSummaryReport>();

                //this.HttpContext.Session.SetObject("InvoiceSummaryReportList", all);
            }

            var paginatedData = all.Skip(pagination.start).Take(pagination.length);

            return(this.Json(new
            {
                pagination.draw,
                recordsTotal = all.Count(),
                recordsFiltered = all.Count(),
                data = paginatedData,
            }));
        }
        public DataSet Get(InvoiceSummaryReport searchOptions)
        {
            var paramArr = new[]
            {
                new OracleParameter()
                {
                    ParameterName = "P_Cur",
                    Direction     = ParameterDirection.Output,
                    OracleDbType  = OracleDbType.RefCursor,
                },

                new OracleParameter()
                {
                    ParameterName = "P_ID",
                    Direction     = ParameterDirection.Input,
                    OracleDbType  = OracleDbType.Int32,
                    Value         = searchOptions.Id,
                },
            };

            return(this._dataProvider.GetDatasetFromSP(SPRoutes.SP_TUNGTT_SUMMARY_REPORT_INVOICES, paramArr));
        }
Exemplo n.º 3
0
 /// <summary>
 /// This function is used to open window for Port Storage InBound Report
 /// </summary>
 /// <param name="obj"></param>
 private void OpenInvoiceSummaryReport(object obj)
 {
     CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     try
     {
         InvoiceSummaryReport objOpen = new InvoiceSummaryReport();
         CurrentReportControl = objOpen;
     }
     catch (Exception ex)
     {
         LogHelper.LogErrorToDb(ex);
         bool displayErrorOnUI = false;
         CommonSettings.logger.LogError(this.GetType(), ex);
         if (displayErrorOnUI)
         {
             throw;
         }
     }
     finally
     {
         CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     }
 }
 public ResponseMessage Update(InvoiceSummaryReport item)
 {
     throw new NotImplementedException();
 }