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(AcesNodes.Contains("BodyType") || AcesNodes.Contains("BodyNumDoors")) { | |
int BodyTypeID = configs.Where(x => x.ConfigAttributeType.AcesType.name.Equals("BodyType")).Select(x => x.vcdbID).FirstOrDefault() ?? 0; | |
int BodyNumDoorsID = configs.Where(x => x.ConfigAttributeType.AcesType.name.Equals("BodyNumDoors")).Select(x => x.vcdbID).FirstOrDefault() ?? 0; | |
predicate = predicate.And(p => p.VehicleToBodyStyleConfigs.Any(y => ((BodyTypeID > 0) ? y.BodyStyleConfig.BodyTypeID.Equals(BodyTypeID) : true) && ((BodyNumDoorsID > 0 ) ? y.BodyStyleConfig.BodyNumDoorsID.Equals(BodyNumDoorsID) : true))); | |
} | |
if(AcesNodes.Contains("WheelBase")) { | |
int WheelBaseID = configs.Where(x => x.ConfigAttributeType.AcesType.name.Equals("WheelBase")).Select(x => x.vcdbID).FirstOrDefault() ?? 0; | |
predicate = predicate.And(p => p.VehicleToWheelbases.Any(y => y.WheelbaseID.Equals(WheelBaseID))); | |
} | |
if (AcesNodes.Contains("DriveType")) { |
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
<!-- AddThis Button BEGIN --> | |
<div class="addthis_toolbox addthis_default_style addthis_32x32_style"> | |
<a class="addthis_button_email"></a> | |
<a class="addthis_button_facebook"></a> | |
<a class="addthis_button_twitter"></a> | |
<a class="addthis_button_google_plusone_share"></a> | |
<a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a> | |
</div> | |
<script> | |
function loadScript(url, callback) { |
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
select Y.year, M.make, MO.model, S.style, | |
(SELECT COUNT(*) | |
FROM VehiclePart VP | |
INNER JOIN Part P ON VP.partID = P.partID | |
WHERE VP.vehicleID = V.vehicleID AND P.classID = 11) AS tconnectors | |
from Vehicle V | |
INNER JOIN Year Y on V.yearID = Y.yearID | |
INNER JOIN Make M on V.makeID = M.makeID | |
INNER JOIN Model MO on V.modelID = MO.modelID | |
INNER JOIN Style S on V.styleID = S.styleID |
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
WITH BULLETSQRY(partID, text, BulletCount) as ( | |
SELECT | |
CB.partID, text, COUNT(*) AS BulletCount | |
FROM | |
Content C | |
INNER JOIN ContentBridge CB ON C.contentID = CB.contentID | |
WHERE cTypeID = 2 AND CB.partID = 11000 | |
GROUP BY | |
CB.partID, text | |
HAVING COUNT(*) > 1 |
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 SimplePricing Set(string key) { | |
Authenticate(key); | |
CurtDevDataContext db = new CurtDevDataContext(); | |
// Validate required fields | |
if (this.price == 0) { throw new Exception("Price failed to validate against null or zero."); } | |
if (this.partID == 0) { throw new Exception("Part Number failed to validate against null or zero."); } | |
if (this.isSale == 1) { | |
if (this.sale_start == null || this.sale_start < DateTime.Today.AddDays(-1)) { throw new Exception("If record is going to marked as sale, sale start is required and cannot be in the past."); } | |
if (this.sale_end == null || this.sale_end < DateTime.Now || this.sale_end <= this.sale_start) { throw new Exception("If record is going to marked as sale, sale end is required, cannot be in the past, and cannot be sooner or equal to the sale start."); } |
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 (settings.Get("FreeShippingBanner") != "") { | |
if (settings.Get("FreeShippingLink") != "") { | |
<a href="@settings.Get("FreeShippingLink")"><img src="@settings.Get("FreeShippingBanner")" alt="Free Shipping" /></a> | |
} else { | |
<img src="@settings.Get("FreeShippingBanner")" alt="Free Shipping" /> | |
} | |
} |
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 class="social_links"> | |
@if (!String.IsNullOrEmpty(settings.Get("FacebookPageURL"))) { | |
<a href="@settings.Get("FacebookPageURL")" title="@settings.Get("SiteName") on Facebook"> | |
<img src="/Content/img/footer/facebook_dark.png" alt="@settings.Get("SiteName") on Facebook" class="dark fb" /> | |
<img src="/Content/img/footer/facebook_active.png" alt="@settings.Get("SiteName") on Facebook" class="active fb" /> | |
</a> | |
} | |
@if (!String.IsNullOrEmpty(settings.Get("TwitterPageURL"))) { | |
<a href="@settings.Get("TwitterPageURL")" title="@settings.Get("SiteName") on Twitter"> | |
<img src="/Content/img/footer/twitter_dark.png" alt="@settings.Get("SiteName") on Twitter" class="dark tweet" /> |
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
func SaveLogs(logs []History) { | |
for i, _ := range logs { | |
go logs[i].Save() | |
} | |
} |
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
Jessicas-MacBook-Pro:SiteMonitor janiukjf$ cap deploy | |
* 2013-05-09 09:27:46 executing `deploy' | |
* 2013-05-09 09:27:46 executing `deploy:update' | |
** transaction: start | |
* 2013-05-09 09:27:46 executing `deploy:update_code' | |
updating the cached checkout on all servers | |
executing locally: "git ls-remote [email protected]:curt-labs/SiteMonitor.git HEAD" | |
command finished in 1736ms | |
* executing "if [ -d /home/deployer/SiteMonitor/shared/cached-copy ]; then cd /home/deployer/SiteMonitor/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 5b3f5da6b0772ffc0a93cae72d31cdbc18d43d7d && git clean -q -d -x -f; else git clone -q [email protected]:curt-labs/SiteMonitor.git /home/deployer/SiteMonitor/shared/cached-copy && cd /home/deployer/SiteMonitor/shared/cached-copy && git checkout -q -b deploy 5b3f5da6b0772ffc0a93cae72d31cdbc18d43d7d; fi" | |
servers: ["curt-api-server1.cloudapp.net", "curt-api-server2.cloudapp.net"] |
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
func Index(w http.ResponseWriter, r *http.Request) { | |
tmpl := plate.NewTemplate(w) | |
tmpl.ParseFile("templates/index.html", false) | |
err := tmpl.Display(w) | |
if err != nil { | |
log.Println(err) | |
} |
NewerOlder