Ejemplo n.º 1
0
        public HttpResponseMessage GetUserDetails(int id)
        {
            UserLoginVM _UserLoginVM = _userBLL.GetUserDetails(id);

            if (_UserLoginVM != null)
            {
                String _SuccessCode = "102";
                JSONSuccessResult(_UserLoginVM, _SuccessCode, _UserLoginVM.HeaderToken);
            }
            else
            {
                String _FailureCode = String.Empty;
                _Message        = "\"message\":\"User does not exists.\",";
                _strJSONContent = Common.FailureResponseRequest(_FailureCode, _Message);
            }
            return(Common.ResponseOutput(_strJSONContent));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get User Details BY ID
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        public Stream GetUserDetails(string userid)
        {
            UserLoginVM _UserLoginVM = _userBLL.GetUserDetails(Convert.ToInt32(userid));

            if (_UserLoginVM != null)
            {
                String _JSONData    = new JavaScriptSerializer().Serialize(_UserLoginVM);
                String _SuccessCode = "102";
                String _Message     = "";
                return(GenerateReturnJSONData(_UserLoginVM.HeaderToken, _JSONData, _SuccessCode, _Message));
            }
            else
            {
                String _FailureCode = "";
                String _Message     = "{\"message\":\"User does not exists.\",";
                return(FailureResponseRequest(_FailureCode, _Message));
            }
        }
Ejemplo n.º 3
0
        public HttpResponseMessage GetUserDetails(int id)
        {
            UserLoginVM _UserLoginVM = _userBLL.GetUserDetails(id);

            if (_UserLoginVM != null)
            {
                String _JSONData    = new JavaScriptSerializer().Serialize(_UserLoginVM);
                String _SuccessCode = "102";
                String _Message     = "";
                _strJSONContent = User_BLL.GenerateReturnJSONData(_UserLoginVM.HeaderToken, _JSONData, _SuccessCode, _Message);
            }
            else
            {
                String _FailureCode = "";
                String _Message     = "\"message\":\"User does not exists.\",";
                _success        = false;
                _strJSONContent = User_BLL.FailureResponseRequest(_FailureCode, _Message);
            }
            return(ResponseOutput());
        }