目的: 將資料內容印至標籤印表機
處理說明 : 1>Browser前端無法取得本機的印表機清單, 也無法設定本機印表機的頁面長寬
2>將資料寫入 xls檔案, 傳送至本機前端, 由使用者自行選擇標籤印表機後,列印
--> 如何將前端store的 3筆資料,送至後端去處理,將這3筆資料填入樣板檔
3>將檔案寫入 pdf檔案網頁 , 由使用者按右鍵列印, 仍要選擇印表機
目的: 將資料內容印至標籤印表機
處理說明 : 1>Browser前端無法取得本機的印表機清單, 也無法設定本機印表機的頁面長寬
2>將資料寫入 xls檔案, 傳送至本機前端, 由使用者自行選擇標籤印表機後,列印
--> 如何將前端store的 3筆資料,送至後端去處理,將這3筆資料填入樣板檔
3>將檔案寫入 pdf檔案網頁 , 由使用者按右鍵列印, 仍要選擇印表機
https://www.cc.ntu.edu.tw/chinese/epaper/0015/20101220_1509.htm
目的: 如何在 Web程式,如何執行[標籤]的印表機列印
目的: 說明字串2Object 函式 , JSON.Parse 和 Ext.decode的差異
說明:
1>若為標準的JSON字串(含字串引號) , 則JSON.Parse 及 Ext.decode均可正常解碼成 Object
Ex: var Tmp_ObjAryStr = "{ "Key": "ABC" }"; //實際字串: "{ \"Key\": \"ABC\" }"
2>若為非標準的JSON字串(不含字串引號) ,
則Ext.decode可正常解碼成 Object
但JSON.Parse無法正常解碼成 Object
Ex: var Tmp_ObjAryStr2 = "{Key: 'ABC' }";
目的: 1>說明主機端傳回 string vs Http.StringContent vs HttpResponseMessage 的不同(主機端)
2>說明主機端傳回 string vs Http.StringContent vs HttpResponseMessage , 在前端接收的結果
摘要:
1> *.cs c# 主機端 *Controller:
1>>String Tmp_RtnStr; //一般的字串
var store1 = Ext.create('Ext.data.Store', {
id: 'store1',
pageSize: 10,
fields: par_Fields,
autoLoad: true,
proxy: {
type: 'ajax',
url: '../api/myAPI/SQLOPEN',
extraParams: np,
getMethod: function () { return 'POST'; },
async: false,
reader: { // reader: The Ext.data.reader.Reader to use to decode the server's response or data read from client.
type: 'json', //The JSON Reader is used by a Proxy to read a server response that is sent back in JSON format
root: 'T1', //The name of the property which contains the data items corresponding to the Model(s) for which this Reader is configured. For JSON reader it's a property name (or a dot-separated list of property names if the root is nested).
totalProperty: 'T1C[0].TOTAL' //Name of the property from which to retrieve the total number of records in the dataset.
//T1C必需有 TOTAL 欄位
}
}
}
})