Beispiel #1
0
        /// <summary>
        /// Execute processing.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>ResponseModel</returns>
        private LoginResponseModel Execute(LoginRequestModel request)
        {
            // Local variable declaration
            LoginResponseModel responseModel = null;
            InitDataModel inputObject = null;
            InitDataModel resultObject = new InitDataModel();
            // Variable initialize
            responseModel = new LoginResponseModel();

            // Execute convert input.
            inputObject = Convert(request);

            // Get infomation
            UserComDao userCom = new UserComDao();
            User result = userCom.GetSingle(inputObject.UserName, DataHelper.GetMd5Hash(inputObject.Password));

            if (result != null)
            {
                resultObject.StatusFlag = true;
                resultObject.UserName = result.Email;
                resultObject.UserCd = result.UserCd.ToString();
            }
            else
            {
                resultObject.StatusFlag = false;
                throw new ExecuteException("E_MSG_00008");

            }

            // Execute convert ouput.
            responseModel = Convert(resultObject);

            return responseModel;
        }
Beispiel #2
0
        /// <summary>
        /// Execute convert input.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>DataModel</returns>
        private InitDataModel Convert(LoginRequestModel request)
        {
            // Local variable declaration
            InitDataModel inputObject = null;

            // Variable initialize
            inputObject = new InitDataModel();

            // Convert data input
            DataHelper.ConvertInput(request, inputObject);

            // Return value
            return inputObject;
        }
Beispiel #3
0
 /// <summary>
 /// Login process.
 /// </summary>
 /// <param name="request">RequestModel</param>
 /// <returns>ResponseModel</returns>
 public LoginResponseModel Invoke(LoginRequestModel request)
 {
     var responseModel = Execute(request);
     return responseModel;
 }