Ejemplo n.º 1
0
        public GridJsonNetJObjectResult <Person> PersonWithRoleGridJsonData(NeptuneAreaEnum neptuneAreaEnum, int roleID)
        {
            var role                     = NeptuneArea.ToType(neptuneAreaEnum).GetRole(roleID);
            var gridSpec                 = new PersonWithRoleGridSpec();
            var peopleWithRole           = role.GetPeopleWithRole();
            var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <Person>(peopleWithRole, gridSpec);

            return(gridJsonNetJObjectResult);
        }
Ejemplo n.º 2
0
        public static NeptuneArea ToType(NeptuneAreaEnum enumValue)
        {
            switch (enumValue)
            {
            case NeptuneAreaEnum.Modeling:
                return(Modeling);

            case NeptuneAreaEnum.OCStormwaterTools:
                return(OCStormwaterTools);

            case NeptuneAreaEnum.Trash:
                return(Trash);

            default:
                throw new ArgumentException(string.Format("Unable to map Enum: {0}", enumValue));
            }
        }