This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@TestResults XML = Null | |
CREATE TABLE #Test | |
{ | |
TestId INT | |
} | |
INSERT INTO #Test(TestId) | |
SELECT c.value ('@TestId[1]' , 'INT' ) AS TestId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function () | |
{ | |
$("a").tooltip({ | |
'selector' : '' , | |
'placement' : 'bottom' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Sorting A Table With jQuery UI</h1> | |
<a href='http://www.foliotek.com/devblog/make-table-rows-sortable-using-jquery-ui-sortable/'>Make table rows sortable with jQuery UI</a> | |
<table id="sort" class="grid" title="Kurt Vonnegut novels"> | |
<thead> | |
<tr><th class="index">No.</th><th>Year</th><th>Title</th><th>Grade</th></tr> | |
</thead> | |
<tbody> | |
<tr><td class="index">1</td><td>1969</td><td>Slaughterhouse-Five</td><td>A+</td></tr> | |
<tr><td class="index">2</td><td>1952</td><td>Player Piano</td><td>B</td></tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Download() | |
{ | |
// Get the file content as string | |
string fileContent = GetCSVFileContent(); | |
// Get the bytes for the dynamic string content | |
var byteArray = Encoding.ASCII.GetBytes(fileContent); | |
string fileName = "Download File in ASP.NET MVC with dynamic content.csv"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var db = new PmsContext()) | |
{ | |
var dbresult = new Models.PurchaseOrder(); | |
dbresult = db.PurchaseOrders | |
.Include("PurchaseOrderDetail") | |
.Include("PurchaseStatus") | |
.Include("RequestedEmployee") | |
// GrandChildren |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#PostalCitySelect').select2({ | |
initSelection: function(element, callback) { | |
var data = { id: $("#Supplier.PostalCityId").attr("value"), text: $("#Supplier_PostalCity_City").attr("value") }; | |
callback(data); | |
@* $.ajax('@Url.Action("SearchCityById", "Suppliers")', { | |
data: { | |
searchTerm: $("#Supplier_PostalCity_CityId").attr("value") | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ViewModel | |
public class test | |
{ | |
public IEnumerable<SelectListItem> thelist { get; set; } | |
public int theitemid { get; set; } | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public JsonResult SearchCity(string searchTerm) | |
{ | |
var city = _locationService.SearchCity(searchTerm); | |
var result = city.Select(a => new { id = a.Id, text = a.City }); | |
return Json(result, JsonRequestBehavior.AllowGet); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public JsonResult SearchCity(string searchTerm) | |
{ | |
var city = _locationService.SearchCity(searchTerm); | |
var result = city.Select(a => new { id = a.Id, text = a.City }); | |
return Json(result, JsonRequestBehavior.AllowGet); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<int> TagIds = new List<int>(tags.Split(',').Select(int.Parse)); |
NewerOlder