Commit 40498d7f authored by solho's avatar solho

架構修改

parent eb909c89
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace WebAPI.App_Code
{
public class CommonFunc
{
public static void aa()
{
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
public class HelloWorldModule : IHttpModule
public class HelloWorldModule : IHttpModule
{
public HelloWorldModule()
{
......
This diff is collapsed.
This diff is collapsed.
......@@ -10,8 +10,7 @@ namespace WebAPI.Controllers
{
public ActionResult Index()
{
ViewBag.Title = "Home Page";
ViewBag.Title = "Home Page";
return View();
}
}
......
This diff is collapsed.
using Microsoft.International.Formatters;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Web;
using static WebAPI.Models.CurHisModel;
namespace WebAPI.Models
{
public class CommonModel
{
public class Message
{
public String outNoticemsg, outErrmsg, outCustmsg;
public int code, Status;
}
public class MessageList
{
public List<Message> msglist; //報價規則
public List<核稿歷史> CurHislist; //核稿評分歷史
public List<核稿歷史Excel> CurHislist_Excel; //核稿評分歷史
public int CurHislist_Count; //核稿評分歷史
public int ListCode //回傳代碼
, ErrCount; //錯誤筆數
public String Listmsg; //回傳訊息
}
public static DataSet GetSqlToDs(SqlCommand cmd)
{
using (DataSet ds = new DataSet())
{
SqlDataAdapter da = new SqlDataAdapter
{
SelectCommand = cmd
};
da.Fill(ds);
return ds;
}
}
public static DataTable InsertSqlToDr(SqlCommand cmd)
{
using (DataTable dt = new DataTable())
{
if (cmd.Connection.State == ConnectionState.Closed)
cmd.Connection.Open();
dt.Load(cmd.ExecuteReader());
cmd.Connection.Close();
return dt;
}
}
#region 共用函式
public string EastAsia_Format(string Msg)
{
Match m;
while ((m = Regex.Match(Msg, "\\d+")).Success)
{
int n = int.Parse(m.Value);
string t =
EastAsiaNumericFormatter.FormatWithCulture("Ln", n,
null, new CultureInfo("zh-TW"));
//"L"-大寫,壹貳參... "Ln"-一二三... "Lc"-貨幣,同L
Msg = Msg.Substring(0, m.Index) + t +
Msg.Substring(m.Index + m.Value.Length);
}
return Msg;
}
#region 簡轉繁
internal const int LOCALE_SYSTEM_DEFAULT = 0x0800;
internal const int LCMAP_SIMPLIFIED_CHINESE = 0x02000000;
internal const int LCMAP_TRADITIONAL_CHINESE = 0x04000000;
[DllImport("kernel32", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern int LCMapString(int Locale, int dwMapFlags, string lpSrcStr, int cchSrc, [Out] string lpDestStr, int cchDest);
public static string ToSimplified(string pSource)
{
String tTarget = new String(' ', pSource.Length);
int tReturn = LCMapString(LOCALE_SYSTEM_DEFAULT, LCMAP_SIMPLIFIED_CHINESE, pSource, pSource.Length, tTarget, pSource.Length);
return tTarget;
}
public static string ToTraditional(string pSource)
{
String tTarget = new String(' ', pSource.Length);
int tReturn = LCMapString(LOCALE_SYSTEM_DEFAULT, LCMAP_TRADITIONAL_CHINESE, pSource, pSource.Length, tTarget, pSource.Length);
return tTarget;
}
#endregion
#endregion
}
}
\ No newline at end of file
using Microsoft.International.Formatters;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Web;
namespace WebAPI.Models
{
public class CurHisModel: CommonModel
{
public class CurHisParam
{
public String trids { get; set; }
public String isCount { get; set; }
}
public class 核稿歷史
{
public String eflow_id { get; set; }
public String case_volume { get; set; }
public String case_type_zh_tw { get; set; }
public String proc_status_zh_tw { get; set; }
public String ctrl_proc_zh_tw { get; set; }
public String audit_cn_name { get; set; }
public String audit_time { get; set; }
public String remark { get; set; }
public String audit_type_id { get; set; }
public String audit_type_zh_cn { get; set; }
public String to_cn_name { get; set; }
public String finish_date { get; set; }
public String score { get; set; }
public int Count { get; set; }
public int rejectCount { get; set; }
}
public class 核稿歷史Excel
{
/// <summary>
/// 流程ID
/// </summary>
public String eflow_id { get; set; }
public String create_time { get; set; }
public String Reject_Count { get; set; }
public String case_volume { get; set; }
public String proc_id { get; set; }
public String first_doc_date { get; set; }
public String int_doc_date { get; set; }
/// <summary>
/// 內核時長
/// </summary>
public String Audit_day { get; set; }
/// <summary>
/// 委案日
/// </summary>
public String Charge_date { get; set; }
/// <summary>
/// 承辦人
/// </summary>
public String pic_UserCName { get; set; }
public String revise_curEmpName { get; set; }
public String ctrl_proc_zh_cn { get; set; }
public List<String> Reject_audit_time = new List<String>();
public List<String> Submit_audit_time = new List<String>();
}
}
}
\ No newline at end of file
......@@ -5,7 +5,9 @@
-->
<configuration>
<connectionStrings>
<!--報價規則-->
<add name="DefaultConnection" connectionString="Data Source=47.91.213.74,6002;Initial Catalog=IPEasy_test;Persist Security Info=True;User ID=ipeasyTest;Password=ipeasy.123" providerName="System.Data.SqlClient" />
<!--核稿歷史-->
<add name="eflow_cur" connectionString="Data Source=47.91.213.74,6002;Initial Catalog=IPEasy;Persist Security Info=True;User ID=account;Password=accounttp" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
......@@ -28,14 +30,14 @@
<modules>
<add name="HelloWorldModule" type="HelloWorldModule" />
</modules>
<httpProtocol>
<!--<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Content-Type,Accept" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>
</httpProtocol>-->
<staticContent>
<clientCache cacheControlCustom="public" />
</staticContent>
......
......@@ -156,7 +156,6 @@
</ItemGroup>
<ItemGroup>
<Content Include="App_Code\HelloWorldModule.cs" />
<Content Include="App_Code\CommonFunc.cs" />
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
......@@ -189,11 +188,14 @@
<Compile Include="Areas\HelpPage\SampleGeneration\SampleDirection.cs" />
<Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
<Compile Include="Controllers\Cur_hisController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\ValuesController.cs" />
<Compile Include="Controllers\FeeOfferConfigController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\CurHisModel.cs" />
<Compile Include="Models\CommonModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
......@@ -252,7 +254,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
......
......@@ -10,6 +10,14 @@
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile />
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
......
No preview for this file type
......@@ -5,7 +5,9 @@
-->
<configuration>
<connectionStrings>
<!--報價規則-->
<add name="DefaultConnection" connectionString="Data Source=47.91.213.74,6002;Initial Catalog=IPEasy_test;Persist Security Info=True;User ID=ipeasyTest;Password=ipeasy.123" providerName="System.Data.SqlClient" />
<!--核稿歷史-->
<add name="eflow_cur" connectionString="Data Source=47.91.213.74,6002;Initial Catalog=IPEasy;Persist Security Info=True;User ID=account;Password=accounttp" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
......
No preview for this file type
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment