Ejemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            var userTeamId = context.Request.Params["UserTeamId"];
            if (userTeamId == null)
            {
                //send error
                SendException(context, new BadRequestException("GetUserTeam called without UserTeamId"));
            }
            Guid userTeamGuid;
            if (!Guid.TryParse(userTeamId, out userTeamGuid))
            {
                //send error
                SendException(context, new BadRequestException("GetUserTeam called without valid UserTeamId"));
            }

            var userTeamManagement = new UserTeamManagement(Global.ConnectionString, Global.SessionProperties);
            var userTeam = userTeamManagement.GetTeam(userTeamGuid);

            var userTeamDto = new UserTeamDTO();

            userTeamDto.Id = userTeam.GUID.ToString();
            userTeamDto.Name = userTeam.Name;
            userTeamDto.Description = userTeam.Presentation;

            //are we in a transfer period?
            var transferPeriod = new CommonDataFetches(Global.ConnectionString, Global.SessionProperties);

            JsonResponse(context, userTeamDto);
        }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            var userTeamId = context.Request.Params["UserTeamId"];

            if (userTeamId == null)
            {
                //send error
                SendException(context, new BadRequestException("GetUserTeam called without UserTeamId"));
            }
            Guid userTeamGuid;

            if (!Guid.TryParse(userTeamId, out userTeamGuid))
            {
                //send error
                SendException(context, new BadRequestException("GetUserTeam called without valid UserTeamId"));
            }


            var userTeamManagement = new UserTeamManagement(Global.ConnectionString, Global.SessionProperties);
            var userTeam           = userTeamManagement.GetTeam(userTeamGuid);

            var userTeamDto = new UserTeamDTO();

            userTeamDto.Id          = userTeam.GUID.ToString();
            userTeamDto.Name        = userTeam.Name;
            userTeamDto.Description = userTeam.Presentation;

            //are we in a transfer period?
            var transferPeriod = new CommonDataFetches(Global.ConnectionString, Global.SessionProperties);



            JsonResponse(context, userTeamDto);
        }