Skip to content

Instantly share code, notes, and snippets.

LIST[117]: Problem Definition (268435573)
| |_Show: Level 1 (268435590)
| | |_Element: Please Specify (268435960)
| | | |_Show: Level 2 (268435591)
| | | | |_Element: Please Specify (268435961)
| | | | | |_Show: Level 3 (268435592)
| | | | | | |_Element: Please Specify (268435962)
| | |_Element: PBX/Key System (268436007)
| | | |_Show: Level 2 (268435601)
| | | | |_Element: Hardware (268436011)
public class Queue : DomainEntity
{
private readonly IList<User> _members = new List<User>();
private readonly IList<User> _supervisors = new List<User>();
public IEnumerable<User> GetMembers()
{
return _members.AsEnumerable();
}
public class DovetailHtmlConventions : HtmlConventionRegistry
{
public DovetailHtmlConventions()
{
validationAttributes();
numbers();
dates();
Profile("edit", x =>
{
// This is an example of one of the types of objects
// that'll get put into the "items" property of the
// GridResultsViewModel DTO above
// Each "item" is a row. That is, each EntityDTO is a
// row in the grid
// the "cells" property is what gets bound to the
// cells in each row
public class BinCountDTO
{
public string BinName { get; set; }
public int ItemCount { get; set; }
}
public class ConsoleDTO
{
@chadmyers
chadmyers / ObjectConverterStuff.cs
Created January 20, 2011 16:39
Demonstrates how we do some of the object conversion stuff in Dovetail using FubuMVC
// In a StructureMap registry somewhere (for us, it's in CoreRegistry.cs)
For<IObjectConverter>().Use<DovetailObjectConverter>();
// In another file, we set up some of our conversions and conversion families
public class DovetailObjectConverter : ServiceEnabledObjectConverter
{
public DovetailObjectConverter(IServiceLocator locator)
: base(locator)
{
public class EntityModelBinder : IModelBinder
{
private static readonly TypeConverter _converter = TypeDescriptor.GetConverter(typeof (Guid));
public bool Matches(Type type)
{
return type.CanBeCastTo<DomainEntity>();
}
@chadmyers
chadmyers / us_debt_as_household.txt
Created February 17, 2011 21:43
If the US Government were the average American household, what would our financial situation look like?
This is an example given to us from Duquesne University Economics Professor Antony Davies:
QUOTE:
If the Federal government were scaled down to the size of the average US household, here’s what its finances would look like:
* The Federal government would earn $50,000 a year in tax revenue (the same as the average US household).
* It would be $325,000 in debt.
@chadmyers
chadmyers / SMBug.cs
Created June 28, 2011 21:47 — forked from jmarnold/SMBug.cs
SM Bug
using System;
using System.Diagnostics;
using System.Linq;
using StructureMap;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
@chadmyers
chadmyers / gist:1243574
Created September 26, 2011 22:19
Installing services
setlocal
SET INSTANCE_NAME=HRRuss
CD c:\dovetailcrm\%INSTANCE_NAME%
pushd services\DovetailCRM.EmailEngine.Service
DovetailCRM.EmailEngine.Service.exe /install