更新wtm
This commit is contained in:
1 parent
f119665d29
commit
3467d4aa9d
60 files changed
+1932
-397
No files matched your search
@@ -48,7 +48,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
, string _DONOT_USE_CURRENTCS
|
||||
)
|
||||
{
|
||||
string cs = string.IsNullOrEmpty(_DONOT_USE_CURRENTCS) ? "default" : _DONOT_USE_CURRENTCS;
|
||||
string cs =_DONOT_USE_CURRENTCS;
|
||||
Wtm.CurrentCS = cs;
|
||||
var listVM = Wtm.CreateVM(_DONOT_USE_VMNAME, null, null, true) as IBasePagedListVM<TopBasePoco, ISearcher>;
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
//var vmType = Type.GetType(_DONOT_USE_VMNAME);
|
||||
//var vmCreater = vmType.GetConstructor(Type.EmptyTypes);
|
||||
//var listVM = vmCreater.Invoke(null) as BaseVM;
|
||||
Wtm.CurrentCS = (string.IsNullOrEmpty(_DONOT_USE_CS) == true) ? "default" : _DONOT_USE_CS;
|
||||
Wtm.CurrentCS = _DONOT_USE_CS;
|
||||
var listVM = Wtm.CreateVM(_DONOT_USE_VMNAME, null, null, true) as IBasePagedListVM<TopBasePoco, BaseSearcher>;
|
||||
listVM.FC = qs;
|
||||
if (listVM is IBasePagedListVM<TopBasePoco, ISearcher>)
|
||||
@@ -210,7 +210,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionDescription("Export")]
|
||||
public IActionResult GetExportExcel(string _DONOT_USE_VMNAME, string _DONOT_USE_CS = "default")
|
||||
public IActionResult GetExportExcel(string _DONOT_USE_VMNAME, string _DONOT_USE_CS)
|
||||
{
|
||||
var qs = new Dictionary<string, object>();
|
||||
foreach (var item in Request.Query.Keys)
|
||||
@@ -226,7 +226,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
}
|
||||
var instanceType = Type.GetType(_DONOT_USE_VMNAME);
|
||||
|
||||
Wtm.CurrentCS = (string.IsNullOrEmpty(_DONOT_USE_CS) == true) ? "default" : _DONOT_USE_CS;
|
||||
Wtm.CurrentCS = _DONOT_USE_CS;
|
||||
var listVM = Wtm.CreateVM(_DONOT_USE_VMNAME) as IBasePagedListVM<TopBasePoco, ISearcher>;
|
||||
|
||||
listVM.FC = qs;
|
||||
@@ -253,9 +253,9 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ActionDescription("DownloadTemplate")]
|
||||
public IActionResult GetExcelTemplate(string _DONOT_USE_VMNAME, string _DONOT_USE_CS = "default")
|
||||
public IActionResult GetExcelTemplate(string _DONOT_USE_VMNAME, string _DONOT_USE_CS)
|
||||
{
|
||||
Wtm.CurrentCS = _DONOT_USE_CS ?? "default";
|
||||
//Wtm.CurrentCS = _DONOT_USE_CS ?? "default";
|
||||
var importVM = Wtm.CreateVM(_DONOT_USE_VMNAME) as IBaseImport<BaseTemplateVM>;
|
||||
var qs = new Dictionary<string, string>();
|
||||
foreach (var item in Request.Query.Keys)
|
||||
@@ -325,7 +325,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("UploadFileRoute")]
|
||||
public IActionResult Upload([FromServices] WtmFileProvider fp, string sm = null, string groupName = null, string subdir = null, string extra = null, bool IsTemprory = true, string _DONOT_USE_CS = "default")
|
||||
public IActionResult Upload([FromServices] WtmFileProvider fp, string sm = null, string groupName = null, string subdir = null, string extra = null, bool IsTemprory = true, string _DONOT_USE_CS=null)
|
||||
{
|
||||
var FileData = Request.Form.Files[0];
|
||||
var file = fp.Upload(FileData.FileName, FileData.Length, FileData.OpenReadStream(), groupName, subdir, extra, sm, Wtm.CreateDC(cskey: _DONOT_USE_CS));
|
||||
@@ -334,7 +334,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("UploadFileRoute")]
|
||||
public IActionResult UploadImage([FromServices] WtmFileProvider fp, string sm = null, string groupName = null, string subdir = null, string extra = null, bool IsTemprory = true, string _DONOT_USE_CS = "default", int? width = null, int? height = null)
|
||||
public IActionResult UploadImage([FromServices] WtmFileProvider fp, string sm = null, string groupName = null, string subdir = null, string extra = null, bool IsTemprory = true, string _DONOT_USE_CS = null, int? width = null, int? height = null)
|
||||
{
|
||||
if (width == null && height == null)
|
||||
{
|
||||
@@ -368,7 +368,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("UploadForLayUIRichTextBox")]
|
||||
public IActionResult UploadForLayUIRichTextBox([FromServices] WtmFileProvider fp, string _DONOT_USE_CS = "default", string groupName = null, string subdir = null)
|
||||
public IActionResult UploadForLayUIRichTextBox([FromServices] WtmFileProvider fp, string _DONOT_USE_CS = null, string groupName = null, string subdir = null)
|
||||
{
|
||||
var FileData = Request.Form.Files[0];
|
||||
var file = fp.Upload(FileData.FileName, FileData.Length, FileData.OpenReadStream(), groupName, subdir, dc: Wtm.CreateDC(cskey: _DONOT_USE_CS));
|
||||
@@ -387,13 +387,13 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
}
|
||||
|
||||
[ActionDescription("GetFileName")]
|
||||
public IActionResult GetFileName([FromServices] WtmFileProvider fp, Guid id, string _DONOT_USE_CS = "default")
|
||||
public IActionResult GetFileName([FromServices] WtmFileProvider fp, Guid id, string _DONOT_USE_CS)
|
||||
{
|
||||
return Ok(fp.GetFileName(id.ToString(), Wtm.CreateDC(cskey: _DONOT_USE_CS)));
|
||||
}
|
||||
|
||||
[ActionDescription("GetFile")]
|
||||
public async Task<IActionResult> GetFile([FromServices] WtmFileProvider fp, string id, bool stream = false, string _DONOT_USE_CS = "default", int? width = null, int? height = null)
|
||||
public async Task<IActionResult> GetFile([FromServices] WtmFileProvider fp, string id, bool stream = false, string _DONOT_USE_CS = null, int? width = null, int? height = null)
|
||||
{
|
||||
var file = fp.GetFile(id, true, Wtm.CreateDC(cskey: _DONOT_USE_CS));
|
||||
if (file == null)
|
||||
@@ -463,7 +463,7 @@ namespace WalkingTec.Mvvm.Mvc
|
||||
}
|
||||
|
||||
[ActionDescription("ViewFile")]
|
||||
public IActionResult ViewFile([FromServices] WtmFileProvider fp, string id, string width, string _DONOT_USE_CS = "default")
|
||||
public IActionResult ViewFile([FromServices] WtmFileProvider fp, string id, string width, string _DONOT_USE_CS = null)
|
||||
{
|
||||
var file = fp.GetFile(id, false, Wtm.CreateDC(cskey: _DONOT_USE_CS));
|
||||
string html = string.Empty;
|
||||
|
||||
Reference in new issue
Block a user