因在Azure上發布了測試版網頁,但不希望被外部使用者搜尋到或者是看到,因此加上登入的機制來限制瀏覽
2018年9月20日
2018年4月26日
(Sitecore) - Component Helper C# , React JS
In order to obtain data from fields, developer needs creates some backend function to reach the goal, this article record the components I create.
2016年12月29日
ASP.Net | Ajax 呼叫 WebMethod 同時使用 Authentication
系統首頁驗證表單使用Authentication,同時間我希望點下登入按鍵時透過Ajax呼叫cs檔中的Webmethod,沒想到這兩個互相有衝突,原因在於設定檔!
2015年3月5日
[軟體自動測試] - Stub, Mock in Unit Test
2015年3月2日
[C#] Interface 使用
在物件導向中Interface可用來做為一個介面,在介面上定義不同的方法,而他方便之處就是不同的方法可以有不同的實作,也就是它裡面可以因不同的需求和情況重新定義,寫了一個小範例練習。
2015年3月1日
[C#] 靜態function與非靜態function差異與使用方式
在專案中有時會在類別(Class)中加一個自訂一延伸類別(Extension class),在這類別中可能是大家共同會用到的檢核,或者是大家會用到的功能,對於要取用類別中的成員(Member),有兩個方法一個是[非靜態]以及[靜態]。
2015年2月5日
[C#] 動態取得Class裡的method及property
開發專案過程中有個需求是需要動態取Model裡的欄位,在這紀錄一下因為要先做另一個部分,這部分才能繼續作。
Type T = Typeof("Namespace.Class,專案名稱")
接著即可透過
T.Getmethod及T.Getproperty來獲得class裡頭的方法及屬性欄位
Type T = Typeof("Namespace.Class,專案名稱")
接著即可透過
T.Getmethod及T.Getproperty來獲得class裡頭的方法及屬性欄位
2015年1月22日
T-SQL - Parameter + Like語法
此功能是在打開頁面前先到資料表搜尋最大值,Select完後將資料丟進DataTable
該欄位為字串型態,寫法如下:
DbAgent sqlHelper = new DbAgent();
DbCommand sqlValue = sqlHelper.getDbCommand(m_ConfigDBName);
StringBuilder sqlstr = new StringBuilder();
SqlParameter par;
sqlValue.CommandText = @"SELECT MAX(CALL_NO) as MAXCALLNO
FROM NAM_NAME(nolock)
WHERE CALL_NO LIKE '%' + @CALL_NO +'%' ";
par = new SqlParameter("CALL_NO", SqlDbType.NVarChar);
par.Value = pYear;
sqlValue.Parameters.Add(par);
try
{
DataTable dt = sqlHelper.QueryToDataTable(sqlValue, pInfo);
return dt;
}
catch (Exception ex)
{
throw ex;
}
該欄位為字串型態,寫法如下:
DbAgent sqlHelper = new DbAgent();
DbCommand sqlValue = sqlHelper.getDbCommand(m_ConfigDBName);
StringBuilder sqlstr = new StringBuilder();
SqlParameter par;
sqlValue.CommandText = @"SELECT MAX(CALL_NO) as MAXCALLNO
FROM NAM_NAME(nolock)
WHERE CALL_NO LIKE '%' + @CALL_NO +'%' ";
par = new SqlParameter("CALL_NO", SqlDbType.NVarChar);
par.Value = pYear;
sqlValue.Parameters.Add(par);
try
{
DataTable dt = sqlHelper.QueryToDataTable(sqlValue, pInfo);
return dt;
}
catch (Exception ex)
{
throw ex;
}
訂閱:
文章 (Atom)
<Javascript> How to uncompressed GZIP at front-end using Javascript
It's been a while I haven't share my coding work. In this article I would like to share how to receive a Gzip file via stream, unzip...
-
要接收Amazon MWS Report的資料一定要先知道有哪些欄位,在這紀錄一下每個Report的欄位
-
為什麼是它作為今年度假地方呢?原因就在於找機票時從杜賽道夫飛機票很便宜,於是就訂了機票,但找旅館後才發現住在那不便宜..特別是距離海灘的遠近價格不同,但也因為這樣認識了一個歐洲人最常去的度假勝地。 在亞洲大家可能常去長灘島峇里島作為度假的選擇,在歐洲伊比札就會是一個這樣的選擇...
