public ActionResult GetDesignReport() { try { if (!string.IsNullOrEmpty(Request.QueryString["DataMethod"])) { var info = new ReportProvider().GetType().GetMethod(Request.QueryString["DataMethod"]); if (info != null) { var invoke = info.Invoke(info, string.IsNullOrEmpty(Request.QueryString["DataMethodParamets"]) ? null : new[] { Request.QueryString["DataMethodParamets"] }); if (invoke != null) { var report = new StiReport(); report.Load((byte[])invoke); return(StiMvcDesigner.GetReportResult(report)); } } } return(null); } catch (Exception ex) { return(null); } }
public string GetPageTitle() { string title = _titleLabel.Text; ReportProvider.LogInfo($"Page title= '{title}'"); return(title); }
public ActionResult Edit() { string ReportNum = WebUtil.GetQueryStringValue <string>("ReportNum", string.Empty); Session[CacheKey.JOOSHOW_REPORTPARAM_CACHE] = null; if (ReportNum.IsEmpty()) { return(Redirect("/Report/Manager/List")); } ReportProvider provider = new ReportProvider(); ReportsEntity entity = provider.GetReport(ReportNum); if (entity.IsNull()) { return(Redirect("/Report/Manager/List")); } ViewBag.Entity = entity; ViewBag.ReportType = EnumHelper.GetOptions <EReportType>(entity.ReportType); ViewBag.DataSourceType = EnumHelper.GetOptions <EDataSourceType>(entity.DsType); List <ReportParamsEntity> list = provider.GetParams(ReportNum); if (!list.IsNullOrEmpty()) { Session[CacheKey.JOOSHOW_REPORTPARAM_CACHE] = list; } return(View()); }
protected DataQuery GetDataQuery() { DataQuery dataQuery = ReportProvider.CreateDataQuery(); dataQuery.Filters.AddRange(filters); string reportClass = GetType().FullName; BusinessDomain.ReportQueryStates [reportClass] = dataQuery.Clone(); if (!AllowOperatorsManage()) { // Filter for the current user if the user cannot manage operators DataFilter filter = new DataFilter(DataFilterLogic.ExactMatch, UserField) { IsValid = true, Values = new object [] { BusinessDomain.LoggedUser.Id }, ShowColumns = true }; dataQuery.Filters.Add(filter); } dataQuery.OrderBy = DataField.OperationTimeStamp; return(dataQuery); }
public async Task <IActionResult> Edit(int id, [Bind("Id,ProviderName,TotalProviderExpectedPayInAmount,TotalSlipAmount,MissingSlipAmount")] ReportProvider reportProvider) { if (id != reportProvider.ProviderTradingProfileID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reportProvider); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReportProviderExists(reportProvider.ProviderTradingProfileID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(reportProvider)); }
public static bool CanChooseDataField(DbField field) { DataType fieldType = ReportProvider.GetDataFieldType(field); switch (field.StrongField) { case DataField.PartnerName: case DataField.PartnersGroupsName: case DataField.ItemName: case DataField.ItemsGroupName: case DataField.LocationName: case DataField.SourceLocationName: case DataField.TargetLocationName: case DataField.LocationsGroupsName: case DataField.UserName: case DataField.OperationsUserName: case DataField.OperationsOperatorName: case DataField.UsersGroupsName: case DataField.OperationsUsersGroupsName: case DataField.OperationsOperatorsGroupsName: return(true); default: return(fieldType == DataType.Date || fieldType == DataType.DateTime); } }
public string GetTextInInput() { string input = _searchInput.GetAttribute("value"); ReportProvider.LogInfo($"Input text= '{input}'"); return(input); }
public ActionResult GetList() { int status = WebUtil.GetFormValue <int>("Status", 0); int ReportType = WebUtil.GetFormValue <int>("ReportType", -1); string ReportName = WebUtil.GetFormValue <string>("ReportName", string.Empty); int pageSize = WebUtil.GetFormValue <int>("PageSize", 10); int pageIndex = WebUtil.GetFormValue <int>("PageIndex", 1); PageInfo pageInfo = new PageInfo() { PageIndex = pageIndex, PageSize = pageSize }; ReportsEntity entity = new ReportsEntity(); ReportProvider provider = new ReportProvider(); if (status > -1) { entity.Where(a => a.Status == status); } if (!ReportName.IsEmpty()) { entity.Where("ReportName", ECondition.Like, "%" + ReportName + "%"); } if (ReportType > 0) { entity.Where(a => a.ReportType == ReportType); } List <ReportsEntity> listResult = provider.GetList(entity, ref pageInfo); listResult = listResult == null ? new List <ReportsEntity>() : listResult; string json = JsonConvert.SerializeObject(listResult); this.ReturnJson.AddProperty("Data", json); this.ReturnJson.AddProperty("RowCount", pageInfo.RowCount); return(Content(this.ReturnJson.ToString())); }
public ReportFilterDateRange(FilterDateRange filter) : base(filter) { foreach (DbField field in filter.FilteredFields) { DataType type = ReportProvider.GetDataFieldType(field); if (type != DataType.Date && type != DataType.DateTime) { throw new ArgumentException(string.Format("Filter is used on column of type {0} but is expected to be on a column of type {1}", type, DataType.Date)); } } dateRanges = new List <KeyValuePair <FilterDateRange.DateRanges, string> > { new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.Custom, Translator.GetString("Custom Dates")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.Today, Translator.GetString("Today")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.Yesterday, Translator.GetString("Yesterday")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.ThisWeek, Translator.GetString("This Week")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.PastWeek, Translator.GetString("Past Week")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.LastWeek, Translator.GetString("Last Week")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.ThisMonth, Translator.GetString("This Month")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.PastMonth, Translator.GetString("Past Month")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.LastMonth, Translator.GetString("Last Month")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.ThisYear, Translator.GetString("This Year")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.PastYear, Translator.GetString("Past Year")), new KeyValuePair <FilterDateRange.DateRanges, string> (FilterDateRange.DateRanges.LastYear, Translator.GetString("Last Year")) }; InitializeWidgets(); ColumnVisible = base.filter.ColumnVisible; }
public static void TearDown() { string testResultStatus = TestContext.CurrentContext.Result.Outcome.Status.ToString(); string resultMessage = TestContext.CurrentContext.Result.Message; ReportProvider.GenerateHtmlReport(testResultStatus, resultMessage); ReportProvider.LogTestFinished(); WebDriverProvider.QuitWebDriver(); }
protected override object MainProcess() { var result = ReportProvider.Search(Query); var items = result.Items.OfType <IReport>().Where(_ => Roles.IsInRole(User.Identity, _.Role)).ToArray(); result.TypedItems = null; result.Items = items; return(result.stringify(Mode)); }
public void DoExportWord() { string lFileName = ShowExportDialog(RsExportFormat.PortableFormatDocument); if (lFileName != null) { ReportProvider.ReportExporter = new RsRptToWordExporter(ReportProvider); ReportProvider.ExportReport(lFileName); } }
public static bool CreateDirectory(string dir) { if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); ReportProvider.LogInfo($"Directory created: {dir}"); return(true); } return(false); }
public void DoExportExcel() { string lFileName = ShowExportDialog(RsExportFormat.ExcelDocument); if (lFileName != null) { ReportProvider.ReportExporter = new RsRptToExcelExporter(ReportProvider); ReportProvider.ExportReport(lFileName); } }
private static string GetFieldText(DbField field, object value) { if (value == null) { return(string.Empty); } string ret = value as string; return(ret ?? GetFieldText(ReportProvider.GetDataFieldType(field), value)); }
public override DataExchangeSet GetExportData(string title) { DataType [] columnTypes = new DataType [dataQueryResult.Result.Columns.Count]; for (int i = 0; i < dataQueryResult.Result.Columns.Count; i++) { DbField field = dataQueryResult.Columns [i].Field; columnTypes [i] = ReportProvider.GetDataFieldType(field); } return(new DataExchangeSet(title, grid.ToDataTable(false), TotalsShown, columnTypes)); }
public void DoExportHTML32() { string lFileName = ShowExportDialog(RsExportFormat.PortableFormatDocument); if (lFileName != null) { ReportProvider.ReportExporter = new RsRptToHtmlExporter(ReportProvider); ((RsRptToHtmlExporter)(ReportProvider.ReportExporter)).HtmlVersion = RsHtmlVersion.Html32; ReportProvider.ExportReport(lFileName); } }
public async Task <IActionResult> Create([Bind("Id,ProviderName,TotalProviderExpectedPayInAmount,TotalSlipAmount,MissingSlipAmount")] ReportProvider reportProvider) { if (ModelState.IsValid) { _context.Add(reportProvider); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(reportProvider)); }
public ActionResult GetMetadata() { ReportProvider provider = new ReportProvider(); string ProceName = WebUtil.GetFormValue <string>("ProceName", string.Empty); List <ReportParamsEntity> list = provider.GetProceMetadata(ProceName); if (!list.IsNullOrEmpty()) { Session[CacheKey.JOOSHOW_REPORTPARAM_CACHE] = list; } return(Content(this.ReturnJson.ToString())); }
public static DataTable getcheckSaleInvoice(string salesInvoiceId, long financialYearID) { try { DataTable i = ReportProvider.getcheckSaleInvoice(salesInvoiceId, financialYearID); return(i); } catch (Exception ex) { throw ex; } }
public static DataTable getSaleFerTilizerInvoice(string salesInvoiceId, long financialYearID) { try { DataTable i = ReportProvider.getSaleFerTilizerInvoice(salesInvoiceId, financialYearID); return(i); } catch (Exception ae) { throw ae; } }
public static DataTable getWholeSaleInvoiceByHSNCode(string SaleID, long financialYearID) { try { DataTable i = ReportProvider.getWholeSaleInvoiceByHSNCode(SaleID, financialYearID); return(i); } catch (Exception ae) { throw ae; } }
public static DataTable getPurchaseReturn(string purchaseReutrnInvoiceId, long financialYearId) { try { DataTable dt = ReportProvider.getPurchaseReturn(purchaseReutrnInvoiceId, financialYearId); return(dt); } catch (Exception ex) { throw ex; } }
public static DataTable getPGROtherInvoice(string SaleID, long financialYearID) { try { DataTable dtPGROther = ReportProvider.getPGROtherInvoice(SaleID, financialYearID); return(dtPGROther); } catch (Exception ae) { throw ae; } }
public static DataTable getServer() { try { DataTable i = ReportProvider.getServer(); return(i); } catch (Exception ex) { throw ex; } }
/// <summary> /// 获得报表主体 /// </summary> /// <returns></returns> public ActionResult GetSingle() { string CompanyID = WebUtil.GetFormValue <string>("CompanyID", string.Empty); string SnNum = WebUtil.GetFormValue <string>("SnNum", string.Empty); ReportProvider provider = new ReportProvider(CompanyID); ReportsEntity entity = provider.GetReport(SnNum); DataResult <ReportsEntity> result = new DataResult <ReportsEntity>(); result.Code = (int)EResponseCode.Success; result.Message = "响应成功"; result.Result = entity; return(Content(JsonHelper.SerializeObject(result))); }
/// <summary> /// 获得存储过程参数 /// </summary> /// <returns></returns> public ActionResult GetProcParameter() { string CompanyID = WebUtil.GetFormValue <string>("CompanyID", string.Empty); string argProceName = WebUtil.GetFormValue <string>("ProceName", string.Empty); ReportProvider provider = new ReportProvider(CompanyID); List <ReportParamsEntity> listResult = provider.GetProceMetadata(argProceName); DataResult <List <ReportParamsEntity> > result = new DataResult <List <ReportParamsEntity> >(); result.Code = (int)EResponseCode.Success; result.Message = "响应成功"; result.Result = listResult; return(Content(JsonHelper.SerializeObject(result))); }
public ActionResult Create() { ReportProvider provider = new ReportProvider(); ReportsEntity oldEntity = null; ReportsEntity entity = WebUtil.GetFormObject <ReportsEntity>("entity", null); entity.CreateTime = DateTime.Now; entity.IsDelete = (int)EIsDelete.NotDelete; entity.Status = (int)EBool.No; //是否被禁用 entity.FileName = entity.FileName.IsEmpty() ? "/Theme/content/report/" + Guid.NewGuid().ToString() + ".frx" : entity.FileName; List <ReportParamsEntity> listSource = Session[CacheKey.JOOSHOW_REPORTPARAM_CACHE] as List <ReportParamsEntity>; if (!entity.ReportNum.IsEmpty()) { oldEntity = provider.GetReport(entity.ReportNum); } if (oldEntity != null) { if (oldEntity.FileName != entity.FileName) { string FileRealPath = Server.MapPath("~" + oldEntity.FileName); string FileTempPath = Server.MapPath("~" + entity.FileName); FileManager.DeleteFile(FileRealPath); System.IO.File.Copy(FileTempPath, FileRealPath, true); entity.FileName = oldEntity.FileName; } } else { FileItem fileItem = FileManager.GetItemInfo(Server.MapPath("~" + entity.FileName)); string FileRealPath = Server.MapPath("~/Theme/content/report/" + fileItem.Name); string FileTempPath = Server.MapPath("~" + entity.FileName); FileManager.MoveFile(FileTempPath, FileRealPath); entity.FileName = "/Theme/content/report/" + fileItem.Name; } int line = provider.Create(entity, listSource); if (line > 0) { this.ReturnJson.AddProperty("Key", "1000"); this.ReturnJson.AddProperty("Value", "操作成功"); } else { this.ReturnJson.AddProperty("Key", "1001"); this.ReturnJson.AddProperty("Value", "操作失败"); } return(Content(this.ReturnJson.ToString())); }
/// <summary> /// 查询报表分页列表 /// </summary> /// <returns></returns> public ActionResult GetList() { string ReportNum = WebUtil.GetFormValue <string>("ReportNum"); string ReportName = WebUtil.GetFormValue <string>("ReportName"); int ReportType = WebUtil.GetFormValue <int>("ReportType", 0); int DsType = WebUtil.GetFormValue <int>("DsType", 0); int Status = WebUtil.GetFormValue <int>("Status", 0); string CompanyID = WebUtil.GetFormValue <string>("CompanyID"); int PageIndex = WebUtil.GetFormValue <int>("PageIndex", 1); int PageSize = WebUtil.GetFormValue <int>("PageSize", 10); ReportsEntity entity = new ReportsEntity(); PageInfo pageInfo = new PageInfo() { PageIndex = PageIndex, PageSize = PageSize }; ReportProvider provider = new ReportProvider(CompanyID); if (ReportNum.IsNotEmpty()) { entity.And("ReportNum", ECondition.Like, "%" + ReportNum + "%"); } if (ReportName.IsNotEmpty()) { entity.And("ReportName", ECondition.Like, "%" + ReportName + "%"); } if (ReportType > 0) { entity.And(a => a.ReportType == ReportType); } if (DsType > 0) { entity.And(a => a.DsType == DsType); } if (Status > 0) { entity.And(a => a.Status == Status); } List <ReportsEntity> listResult = provider.GetList(entity, ref pageInfo); DataListResult <ReportsEntity> dataResult = new DataListResult <ReportsEntity>() { Code = (int)EResponseCode.Success, Message = "响应成功", Result = listResult, PageInfo = pageInfo }; return(Content(JsonHelper.SerializeObject(dataResult))); }
public async Task TriggerReportService() { try { ReportProvider rp = new ReportProvider(_reportProcessorRunService, _reportLogger, _subscriptionService, _reportProcessor, true); await rp.CallReportProcessor(new System.Threading.CancellationToken()); } catch (Exception ex) { _logger.LogError(ex.GetLogText("reportapi_start")); } }