This file contains hidden or 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
<div id="addAddress"> | |
<h2>Add an Address</h2> | |
<form class="admin_form" id="addressform" method="post" action="/Admin/Customer/AddAddress"> | |
<input type="hidden" name="id" value="@cust.ID" data-default="@cust.ID" /> | |
<label for="first"> | |
First Name | |
<input id="first" name="first" type="text" value="@cust.fname" data-default="@cust.fname" placeholder="Customer First Name" required title="Enter a First name" /> | |
</label> | |
<label for="last"> | |
Last Name |
This file contains hidden or 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
clearForm = function (idstr) { | |
var fields = $(idstr).find("input:not([type=hidden]):not([type=submit]):not([type=reset])"); | |
$(fields).each(function (i, obj) { | |
if ($(obj).attr('type') == 'checkbox') { | |
$(obj).attr('checked', $(obj).data('default') == 'checked') | |
} else { | |
$(obj).attr('value', $(obj).data('default')); | |
} | |
}); | |
} |
This file contains hidden or 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
getTransforms = function (target) { | |
if (!isEmpty($(target).css('transform'))) { | |
return matrixToArray($(target).css('transform')) | |
} else if (!isEmpty($(target).css('-webkit-transform'))) { | |
return matrixToArray($(target).css('-webkit-transform')) | |
} else if (!isEmpty($(target).css('-moz-transform'))) { | |
return matrixToArray($(target).css('-moz-transform')) | |
} else if (!isEmpty($(target).css('msTransform'))) { | |
return matrixToArray($(target).css('msTransform')) | |
} else if (!isEmpty($(target).css('-o-transform'))) { |
This file contains hidden or 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 url = APIUrl + '/vehicle/' + year + '?key=' + APIKey + '&callback=loadMake'; | |
$.ajax(url, function (data) { | |
console.log(data); | |
}, 'jsonp') |
This file contains hidden or 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
vcdb_VehiclePart vp = new vcdb_VehiclePart(); | |
try { | |
vp = db.vcdb_VehicleParts.Where(x => x.VehicleID.Equals(vehicle.ID) && x.PartNumber.Equals(vpart.partID)).First(); | |
} catch { | |
vp = new vcdb_VehiclePart { | |
PartNumber = vpart.partID, | |
VehicleID = vehicle.ID | |
}; | |
db.vcdb_VehicleParts.InsertOnSubmit(vp); | |
db.SubmitChanges(); |
This file contains hidden or 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
if ($.browser.msie && ($.browser.version == '7.0' && navigator.userAgent.indexOf('Trident') != -1) || (document.documentMode != undefined && (Number($.browser.version) != Number(document.documentMode)))) { | |
alert("You're in compatibility mode"); | |
} |
This file contains hidden or 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
CREATE TABLE Blah ( | |
ID int IDENTITY(1,1) PRIMARY KEY NOT NULL, | |
foreign_id int NOT NULL FOREIGN KEY REFERENCES TableName (fieldname), | |
field1 varchar(255) NULL, | |
field2 money NULL, | |
field3 datetime NOT NULL DEFAULT GETDATE() | |
) | |
GO |
This file contains hidden or 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 string UpdateParts() { | |
CurtDevDataContext db2 = new CurtDevDataContext(); | |
List<PartChange2012> changes = new List<PartChange2012>(); | |
Dictionary<DateTime, List<PartChange2012>> results = new Dictionary<DateTime, List<PartChange2012>>(); | |
List<int> failedList = new List<int>(); | |
changes = db2.PartChange2012s.Where(x => x.partID < 13000).OrderBy(x => x.partID).ToList(); | |
failedList = processChanges(changes); | |
results.Add(DateTime.Now, changes); | |
while (failedList.Count > 0) { | |
changes = new List<PartChange2012>(); |
This file contains hidden or 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
private static FreightClassType getFreightClass(double density) { | |
if (density < 1) { | |
return FreightClassType.CLASS_500; | |
} else if (density >= 1 && density < 2) { | |
return FreightClassType.CLASS_400; | |
} else if (density >= 2 && density < 3) { | |
return FreightClassType.CLASS_300; | |
} else if (density >= 3 && density < 4) { | |
return FreightClassType.CLASS_250; | |
} else if (density >= 4 && density < 5) { |
This file contains hidden or 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
CREATE TABLE LandingPage ( | |
id int IDENTITY(1,1) PRIMARY KEY NOT NULL, | |
websiteID int NOT NULL FOREIGN KEY REFERENCES Website(ID), | |
startDate datetime NOT NULL, | |
endDate datetime NOT NULL, | |
url varchar(255) NOT NULL, | |
banner varchar(255) NULL, | |
pageContent text NULL, | |
buttonClasses varchar(255) NULL, | |
buttonText varchar(255) NULL, |