示例#1
0
        public IHttpActionResult SaveBadgeForUser(int argLoggedInUser, [FromBody] SaveBadgeBE argSaveBadgeBE)
        {
            #region Declarations
            BadgeBLO l_BadgeBLO = new BadgeBLO();
            #endregion
            try
            {
                l_BadgeBLO.SaveBadgeForUser(argLoggedInUser, argSaveBadgeBE);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Ok());
        }
示例#2
0
        public IHttpActionResult GetBadges(int argLoggedInUser, string argBadgeType)
        {
            #region Declarations
            BadgeBLO          l_BadgeBLO          = new BadgeBLO();
            BadgeBECollection l_BadgeBECollection = new BadgeBECollection();
            #endregion
            try
            {
                l_BadgeBECollection = l_BadgeBLO.GetBadges(argLoggedInUser, argBadgeType);

                if (l_BadgeBECollection == null || l_BadgeBECollection.Count == 0)
                {
                    return(NotFound());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Ok(l_BadgeBECollection));
        }
示例#3
0
        public IHttpActionResult GetUsersByName(int argLoggedInUser, string argNamePrefix)
        {
            #region Declarations
            BadgeBLO l_BadgeBLO = new BadgeBLO();
            UserDetailsBECollection l_UserDetailsBECollection = new UserDetailsBECollection();
            #endregion
            try
            {
                l_UserDetailsBECollection = l_BadgeBLO.GetUsersByName(argLoggedInUser, argNamePrefix);

                if (l_UserDetailsBECollection == null || l_UserDetailsBECollection.Count == 0)
                {
                    return(NotFound());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Ok(l_UserDetailsBECollection));
        }