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
GLEntity | |
KeyGuid Guid | |
EntityID String | |
ConsolHeader | |
KeyGUID Guid | |
TableID string |
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
function AutoCompleteGetIdValue(elem) { | |
var testValue = $(elem).val(); | |
var id; | |
$(elem).data().autocomplete.widget().children(".ui-menu-item").each(function () { | |
var item = $(this).data("item.autocomplete") | |
if (item.value == testValue) { | |
alert(item.id); | |
id = item.id; | |
} | |
}); |
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
Regex1: | |
^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$ | |
RegEx2: | |
^\+(?:[0-9] ?){6,14}[0-9]$ | |
How do I combine them or say match this or that as a single regex? |
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
class PhoneNumberModelBinder : DefaultModelBinder | |
{ | |
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) | |
{ | |
return new PhoneNumber(bindingContext.ValueProvider.GetValue("PhoneNumber").AttemptedValue); | |
} | |
} |
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
// Give this class: | |
public class AmsiMenuItem | |
{ | |
public string MenuTitle { get; set; } | |
public string NavigationUri { get; set; } | |
public string IconPath { get; set; } | |
public string NodeProvider { get; set; } | |
public string NodeSource { 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
@helper OrganizationLabel(string label) { | |
bool isSimple = Amsi.Model.eFinancials.Policies.GetPolicyByToken<string>("SimplifiedCompanySetup") == "Y"; | |
string result; | |
isSimple = true; | |
if (!isSimple) { | |
result = label; | |
} | |
else |
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
HTTP/1.1 500 Internal Server Error | |
Cache-Control: no-cache | |
Pragma: no-cache | |
Content-Type: application/json; charset=utf-8 | |
Expires: -1 | |
Server: Microsoft-IIS/7.5 | |
X-AspNet-Version: 4.0.30319 | |
X-Powered-By: ASP.NET | |
Date: Tue, 24 Jul 2012 20:41:53 GMT | |
Content-Length: 2940 |
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 IEnumerable<string> Get() | |
{ | |
return new string[] { "value1", "value2" }; | |
} |
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
void Main() | |
{ | |
var states = new List<State>(); | |
states.Add(new State { abrv = "AL", description = "Alaska" }); | |
states.Add(new State { abrv = "TX", description = "Texas" }); | |
states.Add(new State { abrv = "GA", description = "Georgia"}); | |
AddressBooks.Where(ab => states.Any(s => ab.State == s.abrv)).Dump(); | |
} |
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
from j in Jobs | |
join j2 in | |
(from jas in JobAccessSecurities | |
where jas.UserKey == new Guid("bf5e9bb6-36b5-43b2-94a3-934bee108ade") | |
select jas) on j.ProjectManagerKey equals j2.EntityUserCodeValueKey | |
select j | |
How can I make this be a left outer join??? |