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 class REQ | |
{ | |
[Key] | |
public int Id { get; set; } | |
[DisplayName("REQ Number:"), Required] | |
public string REQNumber { get; set; } | |
[DisplayName("Date:"), Required] |
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
/ | |
// define our function with the callback argument | |
function some_function(arg1, arg2, callback) { | |
// this generates a random number between | |
// arg1 and arg2 | |
var my_number = Math.ceil(Math.random() * | |
(arg1 - arg2) + arg2); | |
// then we're done, so we'll call the callback and | |
// pass our result | |
callback(my_number); |
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
SET QUOTED_IDENTIFIER ON | |
GO | |
SET ANSI_NULLS ON | |
GO | |
use master | |
if exists (select * from sysobjects where id = object_id(N'dbo.usp_Repair_Orphan_Users_All_DBS') and OBJECTPROPERTY(id, N'IsProcedure') = 1) | |
drop PROC dbo.usp_Repair_Orphan_Users_All_DBS | |
go | |
Create PROC dbo.usp_Repair_Orphan_Users_All_DBS |
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
sp_change_users_login 'report' | |
sp_change_users_login 'auto_fix', #name# -- Name of Ophanend User |
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
var myContainer = $('.centercontainer') | |
myContainer.on('click' ,'.myclass' , function(e){ | |
e.preventDefault(); | |
// Do your Stuff Here for on click. | |
}); |
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
BundleTable.Bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap*")); | |
BundleTable.Bundles.Add(new StyleBundle("~/Content/bootstrap").Include("~/Content/bootstrap.css", "~/Content/bootstrap-responsive.css")); | |
BundleTable.Bundles.Add(new ScriptBundle("~/js").Include( | |
"~/Scripts/jquery-{version}.js", | |
"~/Scripts/jquery-migrate-{version}.js", | |
"~/Scripts/bootstrap.js", | |
"~/Scripts/jquery.validate.js", | |
"~/Scripts/jquery.validate.unobtrusive.js", | |
"~/Scripts/jquery.validate.unobtrusive-custom-for-bootstrap.js" | |
)); |
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
<system.web> | |
... | |
<authentication mode="Windows"/> | |
... | |
</system.web> | |
From : | |
http://msdn.microsoft.com/en-us/library/ff647405.aspx |
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
// Make sure you use DTO and not EF Poco | |
// Else you will get error | |
public List<Models.PostalCode> SearchCity(string searchTerm) | |
{ | |
try | |
{ | |
using (var db = new PmsContext()) | |
{ | |
var pa = db.PostalCodes.Distinct().Where(x => x.town.Contains(searchTerm)).ToList(); |
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
{ | |
try | |
{ | |
using (var db = new PmsContext()) | |
{ | |
var pa = db.PostalCodes.Distinct().Where(x => x.town.Contains(searchTerm)).ToList(); | |
SqlParameter categoryParam = new SqlParameter("@searchTerm", searchTerm); | |
var cities = db.Database.SqlQuery<List<Models.PostalCode>>("SearchCity @searchTerm", categoryParam).ToList(); |
OlderNewer