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 static class FormatHelper | |
{ | |
#region Numeric Formats | |
public static string DisplayIntegerFormat = "#0."; | |
public static string EditIntegerFormat = "0:#0."; | |
public static string DisplayIntegerDXFormat = "d"; | |
public static string EditIntegerDXFormat = "d"; | |
public static string DisplayDecimalFormat = "#0.00"; | |
public static string EditDecimalFormat = "0:#0.00##"; |
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 class ExpressionBuilder | |
{ | |
// Define some of our default filtering options | |
private static MethodInfo containsMethod = typeof(string).GetMethod("Contains", new[] { typeof(string) }); | |
private static MethodInfo startsWithMethod = typeof(string).GetMethod("StartsWith", new[] { typeof(string) }); | |
private static MethodInfo endsWithMethod = typeof(string).GetMethod("EndsWith", new[] { typeof(string) }); | |
public static Expression<Func<T, bool>> GetExpression<T>(List<GridHelper.Filter> filters) | |
{ | |
// No filters passed in #KickIT |
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 class Sport | |
{ | |
public string Name {get; set;} | |
public string League {get; set;} | |
} | |
public class Person | |
{ | |
public string Name {get; set;} | |
public Sport Sport {get; set;} |
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
#region Process Data (sort, group, filter, etc) | |
public static EnumerableQuery GroupBy(this IOrderedQueryable source, string property) | |
{ | |
return ApplyGroup(source, property, "GroupBy"); | |
} | |
public static IOrderedQueryable OrderBy(this IQueryable source, string property) | |
{ | |
return ApplyOrder(source, property, "OrderBy"); | |
} |
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 abstract class ConfigurationElementCollection<TKey, TElement> | |
: ConfigurationElementCollection, | |
IList<TElement>, IDictionary<TKey, TElement> | |
where TElement : ConfigurationElement, new() | |
{ | |
protected override ConfigurationElement CreateNewElement() | |
{ | |
return new TElement(); | |
} |
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
// Declaracion del modulo de configuracion | |
angular | |
.module( 'dashboard.config', [] ) | |
.constant( 'base_url' , 'http://www.domain.com/api' ) | |
.constant( 'default_page', 'home' ) | |
.constant( 'db_pages', [ | |
{ | |
name: 'statisticsOverview', | |
label: 'Dashboard', | |
icon: 'dashboard' |
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 Cert : (bat) | |
------------------------------------ | |
echo off | |
set SERVER_NAME=localhost | |
echo --------------------------------------------------------------------- | |
echo cleaning up the certificates from previous run | |
certmgr.exe -del -r CurrentUser -s TrustedPeople -c -n %SERVER_NAME% | |
certmgr.exe -del -r LocalMachine -s My -c -n %SERVER_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
public class Contract | |
{ | |
public string Code {get; set;} | |
} | |
public class Charge | |
{ | |
public string Name {get; set;} | |
public decimal Total {get; set;} | |
} |
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 class PasswordHelper | |
{ | |
public static Byte[] GerenateSalt() | |
{ | |
byte[] saltBytes = new byte[128]; | |
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); | |
rng.GetNonZeroBytes(saltBytes); | |
return saltBytes; | |
} |
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.Reflection; | |
using System.IO; | |
using System; | |
using System.Runtime.InteropServices; | |
namespace PMS_UI.Infrastructure.Applications | |
{ | |
/// <summary> | |
/// This class provides information about the running application. |