var result = (...).FirstOrDefault();
if( result != null )
{
...
}
如果用下面的方法就簡單多了:
var defaultValue = default(List);
if( result != defaultValue )
{
...
}
$(document).ready(function() {
$("someTableSelector").find("tr:gt(0)").remove();
});
function uploadStart(file) {
try {
this.addFileParam(file.id, "pId", "2");
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setStatus("上傳中...");
progress.toggleCancel(true, this);
}
catch (ex) { }
return true;
}
[HttpPost]
public ActionResult PrintBarcode( List< Models.test > cmd)
{
...
}
class Test{
public long ProductId { get; set; }
public int Quantity { get; set; }
}
//檢查Ext副檔名
function CheckExtensionMusic() {
var type = /(.mp3|.MP3|.mP3|.Mp3)$/i;
if (!type.test($(".fileToUploadMusic").val())) {
$(".fileToUploadMusic").replaceWith("");
}
else {
}
}