91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 7KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-16
  • 語言: C#
  • 標簽: MVC??html5??

資源簡介

銳浪asp.net MVC html5報表顯示示例,c#下的MVC訪問,主從顯示 銳浪asp.net MVC html5報表顯示示例,c#下的MVC訪問,主從顯示

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Data;
using?System.IO;
using?System.Linq;
using?System.Web;
using?System.Web.Mvc;
using?Newtonsoft.Json;
using?Newtonsoft.Json.Converters;
using?Newtonsoft.Json.Linq;

namespace?ReportManage.Controllers
{
????public?class?RubylongExampleController?:?Controller
????{
????????private?T_CUSTOM_REPORTApp?reportapp?=?new?T_CUSTOM_REPORTApp();

????????//
????????//?GET:?/ReportManage/RubylongExample/

????????public?ActionResult?Index()
????????{
????????????return?View();
????????}

????????///?
????????///?獲取文件
????????///?

????????///?
????????public?FileStreamResult?GetGrfFile()
????????{
????????????string?path?=?Request.PhysicalApplicationPath?+?“Content\\1a.grf“;
????????????//path?=?Server.MapPath(path);
????????????return?File(new?FileStream(path?FileMode.Open)?“application/octet-stream“?Server.UrlEncode(“1a.grf“));
????????}

????????///?
????????///?從數據庫中獲取grf模板數據
????????///?

????????///?
????????[HttpGet]
????????public?ContentResult?GetGrfResult()
????????{
//?此處從數據庫中獲取到rpt模板數據
//?也可以從文件中獲取
????????????var?data?=?reportapp.GetEntity(“c47a7e73-4304-4b27-ad4a-02f74c5cf00c“);
????????????return?Content(data.REPORT_CONTENT);
????????}

????????///?
????????///?下載文件
????????///?

????????///?
????????public?ActionResult?DownFile()
????????{
????????????string?path?=?Request.PhysicalApplicationPath?+?“Content\\1a.grf“;
????????????//string?path?=?Server.MapPath(“~/Content/1a.grf“);
????????????FileStream?fs?=?new?FileStream(path?FileMode.Open);
????????????byte[]?bytes?=?new?byte[(int)fs.Length];
????????????fs.Read(bytes?0?bytes.Length);
????????????fs.Close();
????????????Response.Charset?=?“UTF-8“;
????????????Response.ContentEncoding?=?System.Text.Encoding.GetEncoding(“UTF-8“);
????????????Response.ContentType?=?“application/octet-stream“;

????????????Response.AddHeader(“Content-Disposition“?“attachment;?filename=“?+?Server.UrlEncode(“1a.grf“));
????????????Response.BinaryWrite(bytes);
????????????Response.Flush();
????????????Response.End();
????????????return?new?EmptyResult();
????????}

????????///?
????????///?獲取xml數據
????????///?

????????///?
????????public?ActionResult?GetxmlDataResult()
????????{
????????????DataSet?ds?=?new?DataSet();
????????????DataTable?dt?=?new?DataTable();
????????????dt.Columns.Add(“CustomerID“);
????????????dt.Columns.Add(“CompanyName“);
????????????dt.Columns.Add(“ContactName“);
????????????dt.Columns.Add(“Contacttitle“);
????????????dt.Columns.Add(“Address“);
????????????dt.Columns.Add(“City“);
????????????dt.Columns.Add(“Region“);
????????????dt.Columns.Add(“PostalCode“);
????????????dt.Columns.Add(“Country“);
????????????dt.Columns.Add(“Phone“);
????????????dt.Columns.Add(“Fax“);

??????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????5760??2017-09-15?15:31??銳浪MVC\1a.grf

?????文件???????9967??2017-09-15?16:59??銳浪MVC\Controllers\RubylongExampleController.cs

?????文件???????5855??2017-09-15?16:57??銳浪MVC\Views\RubylongExample\Index.cshtml

?????文件???????2919??2017-09-14?16:15??銳浪MVC\Views\Web.config

?????目錄??????????0??2017-09-15?16:52??銳浪MVC\Views\RubylongExample

?????目錄??????????0??2017-09-15?16:52??銳浪MVC\Controllers

?????目錄??????????0??2017-09-15?16:52??銳浪MVC\Views

?????目錄??????????0??2017-09-15?16:52??銳浪MVC

-----------?---------??----------?-----??----

????????????????24501????????????????????8


評論

共有 條評論