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
| analytics.identify (userData['email'], { | |
| email: userData['email'], | |
| firstName: userData['firstName'], | |
| lastName: userData['lastName'], // trailing comma breaks IE8 | |
| }); |
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 client = new StripeClient(SiteSettings.StripeApiKey); | |
| dynamic response = client.RetrieveCustomer(user.CustomerIdentifier); | |
| if (response.IsError) | |
| { | |
| this.FlashError((string)response.error.message); | |
| } | |
| else | |
| { | |
| // expand default_card |
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 Id, Name, CreatedDate, LastModifiedDate | |
| FROM ( | |
| SELECT Id, Name, CreatedDate, LastModifiedDate | |
| FROM OPENQUERY(DBAMP, 'select * from Account') | |
| WHERE Account_Profile__c IS NULL | |
| AND Account_Stage__c IS NULL | |
| AND Account_Tier__c IS NULL | |
| AND AccountNumber IS NULL | |
| AND Annual_Revenue_in_millions__c IS NULL | |
| AND AnnualRevenue IS NULL |
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
| using System; | |
| using System.ComponentModel; | |
| namespace XamarinStore | |
| { | |
| public enum ProductType | |
| { | |
| Shirt, | |
| Plushie | |
| } |
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 Who_FirstName, Who_LastName, ll.Email, (SUM(VSWinCount) + SUM(XSWinCount) + SUM(XSMacCount)) AS Activity | |
| FROM OPENQUERY(DBAMP, 'SELECT Who.FirstName, Who.LastName, WhoId, Subject FROM Task WHERE Subject LIKE ''Started Trial:%'' AND ActivityDate > 2013-08-07 ') AS tt | |
| INNER JOIN OPENQUERY(DBAMP, 'SELECT Id, Email FROM Lead') ll ON tt.WhoId = ll.Id | |
| INNER JOIN OPENQUERY(STOREREPLICA, 'SELECT * FROM StoreReplica.dbo.Nop_Customer_NoXML') cc ON ll.Email = cc.Email COLLATE Latin1_General_CI_AS | |
| INNER JOIN OPENQUERY(STOREREPLICA, 'SELECT * FROM StoreReplica.dbo.xam_Activity_OsIde_Counts WHERE VSWinCount > 0 OR XSWinCount > 0 OR XSMacCount > 0') aoic ON cc.CustomerId = aoic.CustomerId | |
| GROUP BY Who_FirstName, Who_LastName, ll.Email | |
| ORDER BY Activity DESC |
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 ISNULL(NULLIF(ca.Value, ''), cc.Email) AS 'Company', | |
| SUM([OrderTotal]) as Total, | |
| SUM([OrderTotal]-RefundedAmount) as AdjustedTotal | |
| FROM [dbo].[Nop_Order] oo | |
| INNER JOIN Nop_Customer cc on oo.CustomerID = cc.CustomerID | |
| LEFT OUTER JOIN Nop_CustomerAttribute ca on cc.CustomerId = ca.CustomerId and ca.[Key] = 'Company' | |
| WHERE RefundedAmount < OrderTotal | |
| AND OrderTotal > 0 | |
| GROUP BY ISNULL(NULLIF(ca.Value, ''), cc.Email) | |
| ORDER BY AdjustedTotal DESC |
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
| <script type="text/javascript" src="~/scripts/mt.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| // listen for scan finished event triggered from native code. | |
| Mt.App.addEventListener('scanComplete', function (data) { | |
| if (data && data.code) { | |
| if (confirm('Use the code ' + data.code + '?')) { | |
| $('#PromoCode').val(data.code); | |
| } | |
| } |
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
| @using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-signin" })) { | |
| <h3>Scan Your Promo Code</h3> | |
| <table class="form-group"> | |
| <tr> | |
| <td> | |
| @Html.TextBoxFor(mm => mm.PromoCode, new { placeholder = "Promo code", autofocus = "", @class = "form-control" }) | |
| </td> | |
| @if (Request.UserAgent.Contains("XamarinBarcodeSampleApp")) | |
| { |
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
| // get useragent | |
| UIWebView agentWebView = new UIWebView (); | |
| var userAgent = agentWebView.EvaluateJavascript ("navigator.userAgent"); | |
| agentWebView = null; | |
| userAgent += " XamarinBarcodeSampleApp"; | |
| // set default useragent | |
| NSDictionary dictionary = NSDictionary.FromObjectAndKey(NSObject.FromObject(userAgent), NSObject.FromObject("UserAgent")); | |
| NSUserDefaults.StandardUserDefaults.RegisterDefaults(dictionary); |
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 override bool FinishedLaunching (UIApplication app, NSDictionary options) | |
| { | |
| JsBridge.EnableJsBridge(); | |
| window = new UIWindow (UIScreen.MainScreen.Bounds); | |
| // get useragent | |
| UIWebView agentWebView = new UIWebView (); | |
| var userAgent = agentWebView.EvaluateJavascript ("navigator.userAgent"); | |
| agentWebView = null; |