|
|
@ -1,4 +1,5 @@ |
|
|
|
using System.Data; |
|
|
|
using System.Data; |
|
|
|
|
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using AgileObjects.AgileMapper; |
|
|
|
using AgileObjects.AgileMapper; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.AspNetCore.Http.HttpResults; |
|
|
|
using Microsoft.AspNetCore.Http.HttpResults; |
|
|
@ -8,8 +9,10 @@ using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using NPOI.OpenXmlFormats.Spreadsheet; |
|
|
|
using NPOI.OpenXmlFormats.Spreadsheet; |
|
|
|
using SqlSugar; |
|
|
|
using SqlSugar; |
|
|
|
|
|
|
|
using SqlSugar.Extensions; |
|
|
|
using Tiobon.Core.Common; |
|
|
|
using Tiobon.Core.Common; |
|
|
|
using Tiobon.Core.Common.DB.Dapper; |
|
|
|
using Tiobon.Core.Common.DB.Dapper; |
|
|
|
|
|
|
|
using Tiobon.Core.Common.DB.Dapper.Extensions; |
|
|
|
using Tiobon.Core.Common.Helper; |
|
|
|
using Tiobon.Core.Common.Helper; |
|
|
|
using Tiobon.Core.DataAccess; |
|
|
|
using Tiobon.Core.DataAccess; |
|
|
|
using Tiobon.Core.IServices; |
|
|
|
using Tiobon.Core.IServices; |
|
|
@ -1132,7 +1135,7 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
|
|
|
|
|
|
|
|
case "F_Training_Demand_ToDo": |
|
|
|
case "F_Training_Demand_ToDo": |
|
|
|
case "F_TeacherManageTemporary": |
|
|
|
case "F_TeacherManageTemporary": |
|
|
|
case "F_TeacherChangeTemporary": |
|
|
|
case "F_TeacherChangeTemporary": |
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "NewYN").FirstOrDefault(); |
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "NewYN").FirstOrDefault(); |
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; } |
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; } |
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault(); |
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault(); |
|
|
@ -2959,4 +2962,326 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
catch (Exception) { throw; } |
|
|
|
catch (Exception) { throw; } |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<Dictionary<String, Object>> getPostCommonAES(JObject param) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
string procName = ""; |
|
|
|
|
|
|
|
string _commonType = ""; // 类别 |
|
|
|
|
|
|
|
string userID = ""; |
|
|
|
|
|
|
|
bool hasUserIDPara = false; |
|
|
|
|
|
|
|
string SqlCompanyKey = "SELECT CompanyKey from Ghro_company where IsEnable=1"; |
|
|
|
|
|
|
|
DataTable dtCompanyKey = await Db.Ado.GetDataTableAsync(SqlCompanyKey); |
|
|
|
|
|
|
|
string tokenKey = "Tiobon"; |
|
|
|
|
|
|
|
if (dtCompanyKey.Rows.Count > 0) |
|
|
|
|
|
|
|
tokenKey = dtCompanyKey.Rows[0][0].ToString(); |
|
|
|
|
|
|
|
string token = ""; |
|
|
|
|
|
|
|
string menuName = ""; // 页面别 |
|
|
|
|
|
|
|
string exportSet = ""; // 导出配置 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dic = new Dictionary<string, object>(); |
|
|
|
|
|
|
|
string NewTokenstring = ""; |
|
|
|
|
|
|
|
var sortedObj = new JObject(param.Properties().OrderBy(p => (string)p.Name)); |
|
|
|
|
|
|
|
IEnumerable<JProperty> properties = sortedObj.Properties(); |
|
|
|
|
|
|
|
foreach (JProperty item in properties) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (item.Name == "token") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
token = item.Value.ToString(); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (item.Name.ToLower() == "timestamp") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
NewTokenstring = NewTokenstring + tokenKey + item.Value.ToString(); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
NewTokenstring = NewTokenstring + item.Value.ToString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (item.Name == "procName") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
procName = item.Value.ToString(); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (item.Name == "commonType") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
_commonType = item.Value.ToString(); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (item.Name == "userId") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
userID = item.Value.ToString(); |
|
|
|
|
|
|
|
hasUserIDPara = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (item.Name == "menuName") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
menuName = item.Value.ToString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (item.Name == "exportSet") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
exportSet = item.Value.ToString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string jokey = item.Name; |
|
|
|
|
|
|
|
object joValue = item.Value; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dic.Add(jokey, joValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
NewTokenstring = NewTokenstring.Replace("\r", "").Replace("\n", "").Replace(" ", ""); |
|
|
|
|
|
|
|
NewTokenstring = Regex.Replace(NewTokenstring, @"\s+", ""); |
|
|
|
|
|
|
|
//if (DBCommon.sha256(NewTokenstring).ToLower() != token.ToLower()) |
|
|
|
|
|
|
|
//{ |
|
|
|
|
|
|
|
// //throw new Exception("token验证错误->" + NewTokenstring + "->" + DBCommon.sha256(NewTokenstring).ToLower()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
if (hasUserIDPara && (userID == "0" || string.IsNullOrEmpty(userID)) && procName != "PT_GHR30_Login_IUD" && procName != "PT_GHR30_UserPasswordReset_IUD") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
throw new Exception("页面已失效,请重新登陆"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
DataSet ds = await Db.Ado.UseStoredProcedure().GetDataSetAllAsync(procName, dic); |
|
|
|
|
|
|
|
// 导出Excel ExportExcel 直接下载 ExportExcel2 预下载 |
|
|
|
|
|
|
|
if (_commonType == "ExportExcel" || _commonType == "ExportExcel2") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// tisking 20240118 add 保存当前导出列 |
|
|
|
|
|
|
|
//string SaveEEConfig = string.Format(@" |
|
|
|
|
|
|
|
// delete [dbo].[Ghrs_ExportExcelByUserConfig] where UserID = {0} and MenuName = '{1}'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// insert into [dbo].[Ghrs_ExportExcelByUserConfig] |
|
|
|
|
|
|
|
// (UserID,MenuName,ExportSet,CreateBy,CreateProg,CreateTime) |
|
|
|
|
|
|
|
// select {0} ,'{1}','{2}',{0},'GHR30.getPostCommonAES.ExportExcel2',GETDATE()", |
|
|
|
|
|
|
|
// userID, menuName, exportSet); |
|
|
|
|
|
|
|
//try |
|
|
|
|
|
|
|
//{ |
|
|
|
|
|
|
|
// await Db.Ado.ExecuteCommandAsync(SaveEEConfig); |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
//catch (Exception) |
|
|
|
|
|
|
|
//{ |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//IList<NPOIModel> list = new List<NPOIModel>(); |
|
|
|
|
|
|
|
//string TableTitle = ""; |
|
|
|
|
|
|
|
//string fileName = ""; |
|
|
|
|
|
|
|
//for (int RowNums = 0; RowNums < ds.Tables.Count; RowNums = RowNums + 2) |
|
|
|
|
|
|
|
//{ |
|
|
|
|
|
|
|
// DataTable Exdt = ds.Tables[RowNums]; |
|
|
|
|
|
|
|
// string Fileds = ds.Tables[RowNums + 1].Rows[0]["Fileds"].ToString(); |
|
|
|
|
|
|
|
// string HeaderName = ds.Tables[RowNums + 1].Rows[0]["HeaderName"].ToString(); |
|
|
|
|
|
|
|
// TableTitle = ds.Tables[RowNums + 1].Rows[0]["TableTitle"].ToString(); |
|
|
|
|
|
|
|
// string IsTitle = ds.Tables[RowNums + 1].Rows[0]["IsTitle"].ToString(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// string SheetName = ""; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// try |
|
|
|
|
|
|
|
// { |
|
|
|
|
|
|
|
// fileName = ds.Tables[RowNums + 1].Rows[0]["FileName"].ToString(); |
|
|
|
|
|
|
|
// SheetName = ds.Tables[RowNums + 1].Rows[0]["SheetName"].ToString(); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// catch (Exception) |
|
|
|
|
|
|
|
// { |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (string.IsNullOrEmpty(fileName)) |
|
|
|
|
|
|
|
// fileName = TableTitle; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// //关键字替换 |
|
|
|
|
|
|
|
// string invalidChars = @"[\\/:*?""<>|]"; // 使用正则表达式替换特殊符号为空字符串 |
|
|
|
|
|
|
|
// fileName = Regex.Replace(fileName, invalidChars, ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// int TitleFontSize = Convert.ToInt32(ds.Tables[RowNums + 1].Rows[0]["TitleFontSize"].ToString()); |
|
|
|
|
|
|
|
// int HeadFontSize = Convert.ToInt32(ds.Tables[RowNums + 1].Rows[0]["HeadFontSize"].ToString()); |
|
|
|
|
|
|
|
// int BodyFontSize = Convert.ToInt32(ds.Tables[RowNums + 1].Rows[0]["BodyFontSize"].ToString()); |
|
|
|
|
|
|
|
// int DefaultWidth = Convert.ToInt32(ds.Tables[RowNums + 1].Rows[0]["DefaultWidth"].ToString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// DefaultWidth = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// list.Add(new NPOIModel(Exdt, |
|
|
|
|
|
|
|
// Fileds, //字段 |
|
|
|
|
|
|
|
// !String.IsNullOrEmpty(SheetName) ? SheetName : TableTitle, //sheetName |
|
|
|
|
|
|
|
// HeaderName, //表头 |
|
|
|
|
|
|
|
// IsTitle == "Y" ? TableTitle : "",// 标题 |
|
|
|
|
|
|
|
// 0,// 是否添加序号 |
|
|
|
|
|
|
|
// TitleFontSize, // 标题大小 |
|
|
|
|
|
|
|
// HeadFontSize, // 表头大小 |
|
|
|
|
|
|
|
// BodyFontSize, // 正文大小 |
|
|
|
|
|
|
|
// DefaultWidth // 默认宽度 0为自适应 其余值为默认宽度 需大于0 |
|
|
|
|
|
|
|
// )); |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
//string ExportMessage = "导出成功"; |
|
|
|
|
|
|
|
//string ExportType = "success"; |
|
|
|
|
|
|
|
//int ExportCode = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// 文件名称 |
|
|
|
|
|
|
|
//fileName = fileName + "_" + userID + "_" + (DateTime.Now.ToString("yyyyMMddHHmmssfff")) + ".xls"; |
|
|
|
|
|
|
|
//if (_commonType == "ExportExcel2") |
|
|
|
|
|
|
|
//{ |
|
|
|
|
|
|
|
// try |
|
|
|
|
|
|
|
// { |
|
|
|
|
|
|
|
// NPOIHelper.ExportPath(fileName, list, menuName); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// catch (Exception ex) |
|
|
|
|
|
|
|
// { |
|
|
|
|
|
|
|
// ExportMessage = "导出失败:" + ex.ToString(); |
|
|
|
|
|
|
|
// ExportType = "error"; |
|
|
|
|
|
|
|
// ExportCode = 1; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// Dictionary<String, Object> excelData = new Dictionary<String, Object>{ |
|
|
|
|
|
|
|
// {"result", ""}, |
|
|
|
|
|
|
|
// {"tableTitle", TableTitle}, |
|
|
|
|
|
|
|
// {"fileName", @"\File\DownLoad\"+fileName}, |
|
|
|
|
|
|
|
// {"message",ExportMessage}, |
|
|
|
|
|
|
|
// {"type",ExportType}, |
|
|
|
|
|
|
|
// {"code",ExportCode} |
|
|
|
|
|
|
|
// }; |
|
|
|
|
|
|
|
// return Json(excelData); |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
//// 直接下载 |
|
|
|
|
|
|
|
//if (_commonType == "ExportExcel1") |
|
|
|
|
|
|
|
//{ |
|
|
|
|
|
|
|
// return ResponseMessage(NPOIHelper.ExportResponse(fileName, list)); |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 此块为存储过程返回的信息 DT_ProcedureResult |
|
|
|
|
|
|
|
DataTable DT_ProcedureResult = null; |
|
|
|
|
|
|
|
DataTable dt = ds.Tables[0]; |
|
|
|
|
|
|
|
string strJson = "{"; |
|
|
|
|
|
|
|
int i = 1; |
|
|
|
|
|
|
|
foreach (DataColumn dc in dt.Columns) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (dt.Rows[0][dc.ColumnName].ToString() == "DT_ProcedureResult") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DT_ProcedureResult = ds.Tables[i]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
strJson = strJson + "\"" + dt.Rows[0][dc.ColumnName].ToString() + "\":"; |
|
|
|
|
|
|
|
String json = JsonConvert.SerializeObject(ds.Tables[i]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool tableIsJson = false; |
|
|
|
|
|
|
|
// 根据 table 的栏位名是否为 #Json#开头来判断,是否有Json对象 |
|
|
|
|
|
|
|
foreach (DataColumn dcDetail in ds.Tables[i].Columns) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (dcDetail.ColumnName.StartsWith("#Json#")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
tableIsJson = true; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (tableIsJson) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
dynamic dyn = JsonConvert.DeserializeObject(json); |
|
|
|
|
|
|
|
// DT_TableDataT1 |
|
|
|
|
|
|
|
if (ds.Tables[i].Rows.Count == 1 && (!dt.Rows[0][dc.ColumnName].ToString().StartsWith("DT_TableData")))// 单行数据 |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var obj = dyn[0]; |
|
|
|
|
|
|
|
foreach (DataColumn dcDetail in ds.Tables[i].Columns) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (dcDetail.ColumnName.StartsWith("#Json#")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
obj[dcDetail.ColumnName] = (JToken)JsonConvert.DeserializeObject((string)obj[dcDetail.ColumnName]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch { } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
dyn = obj; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach (var obj in dyn) // 逐行逐列判断 |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach (DataColumn dcDetail in ds.Tables[i].Columns) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (dcDetail.ColumnName.StartsWith("#Json#")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
obj[dcDetail.ColumnName] = (JToken)JsonConvert.DeserializeObject((string)obj[dcDetail.ColumnName]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch { } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
json = JsonConvert.SerializeObject(dyn); |
|
|
|
|
|
|
|
json = json.Replace("#Json#", ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
strJson = strJson + json; |
|
|
|
|
|
|
|
if (i < ds.Tables.Count - 1) // 第一个table定义 各表的内容 |
|
|
|
|
|
|
|
strJson = strJson + ","; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
i = i + 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
strJson = strJson + "}"; |
|
|
|
|
|
|
|
string isOK = "0"; |
|
|
|
|
|
|
|
string ErrorMsg = ""; |
|
|
|
|
|
|
|
string WarnMsg = ""; |
|
|
|
|
|
|
|
string SuccessMsg = ""; |
|
|
|
|
|
|
|
string type = "success"; |
|
|
|
|
|
|
|
string message = ""; |
|
|
|
|
|
|
|
if (DT_ProcedureResult.Rows.Count == 1) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
isOK = DT_ProcedureResult.Rows[0]["IsOK"].ToString(); |
|
|
|
|
|
|
|
ErrorMsg = DT_ProcedureResult.Rows[0]["ErrorMsg"].ToString(); |
|
|
|
|
|
|
|
WarnMsg = DT_ProcedureResult.Rows[0]["WarnMsg"].ToString(); |
|
|
|
|
|
|
|
SuccessMsg = DT_ProcedureResult.Rows[0]["SuccessMsg"].ToString(); |
|
|
|
|
|
|
|
if (isOK == "0") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(WarnMsg)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type = "warning"; |
|
|
|
|
|
|
|
message = WarnMsg; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type = "success"; |
|
|
|
|
|
|
|
message = SuccessMsg; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type = "error"; |
|
|
|
|
|
|
|
message = ErrorMsg; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Dictionary<String, Object> data = new Dictionary<String, Object> |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
{"result", JObject.Parse(strJson)}, |
|
|
|
|
|
|
|
{"message",message}, |
|
|
|
|
|
|
|
{"type",type}, |
|
|
|
|
|
|
|
{"code",int.Parse(isOK)} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
foreach (DataColumn dcProcedureResult in DT_ProcedureResult.Columns) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (dcProcedureResult.ColumnName != "IsOK" && dcProcedureResult.ColumnName != "ErrorMsg" && |
|
|
|
|
|
|
|
dcProcedureResult.ColumnName != "WarnMsg" && dcProcedureResult.ColumnName != "SuccessMsg") |
|
|
|
|
|
|
|
data.Add(dcProcedureResult.ColumnName, DT_ProcedureResult.Rows[0][dcProcedureResult.ColumnName].ToString()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return data; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Dictionary<String, Object> data = new Dictionary<String, Object> |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
{"result", "{}"}, |
|
|
|
|
|
|
|
{"message",e.Message}, |
|
|
|
|
|
|
|
{"type","error"}, |
|
|
|
|
|
|
|
{"code",1} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return data; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//DataSet dt = await Db.Ado.UseStoredProcedure().GetDataSetAllAsync(param.procName, dic); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//return dt; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|