1 Star 0 Fork 1.8K

javaSwing/OpenAuth.Net

forked from dotNET China/OpenAuth.Net 
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
DesignerController.cs 1.58 KB
Copy Edit Raw Blame History
李玉宝 authored 2016-09-08 16:20 +08:00 . 调整删除时http提交方式
using System;
using System.Collections.Specialized;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Xml.Linq;
using OpenAuth.Mvc.Models;
using OptimaJet.Workflow;
using OptimaJet.Workflow.Core.Builder;
using OptimaJet.Workflow.Core.Bus;
using OptimaJet.Workflow.Core.Runtime;
using OptimaJet.Workflow.DbPersistence;
using WorkflowRuntime = OptimaJet.Workflow.Core.Runtime.WorkflowRuntime;
namespace OpenAuth.Mvc.Controllers
{
public class DesignerController : BaseController
{
public ActionResult Index(string schemeName)
{
return View();
}
public ActionResult API()
{
Stream filestream = null;
if (Request.Files.Count > 0)
filestream = Request.Files[0].InputStream;
var pars = new NameValueCollection();
pars.Add(Request.Params);
if (Request.HttpMethod.Equals("POST", StringComparison.InvariantCultureIgnoreCase))
{
var parsKeys = pars.AllKeys;
foreach (var key in Request.Form.AllKeys)
{
if (!parsKeys.Contains(key))
{
pars.Add(Request.Form);
}
}
}
var res = WorkflowInit.Runtime.DesignerAPI(pars, filestream, true);
if (pars["operation"].ToLower() == "downloadscheme")
return File(Encoding.UTF8.GetBytes(res), "text/xml", "scheme.xml");
return Content(res);
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/javaSwing/OpenAuth.Net.git
git@gitee.com:javaSwing/OpenAuth.Net.git
javaSwing
OpenAuth.Net
OpenAuth.Net
master

Search