예제 #1
0
        /// <summary>
        /// Execute convert input.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>DataModel</returns>
        private InitDataModel Convert(InitRequestModel request)
        {
            // Local variable declaration
            InitDataModel inputObject = null;

            // Variable initialize
            inputObject = new InitDataModel();

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

            // Return value
            return inputObject;
        }
예제 #2
0
        /// <summary>
        /// Execute convert ouput.
        /// </summary>
        /// <param name="resultObject">DataModel</param>
        /// <returns>ResponseModel</returns>
        private InitResponseModel Convert(InitDataModel resultObject)
        {
            // Local variable declaration
            InitResponseModel responseModel = null;
            IList<OutputAcceptModel> listAccepts = null;
            OutputAcceptModel accept = null;
            MCodeCom mCodeCom = null;

            // Variable initialize
            responseModel = new InitResponseModel();
            listAccepts = new List<OutputAcceptModel>();
            mCodeCom = new MCodeCom();

            // Get value
            string slipStatusName = null;
            foreach (var obj in resultObject.ListAccepts)
            {
                accept = new OutputAcceptModel();

                accept.AcceptSlipNo = DataHelper.ToString(obj.AcceptSlipNo);
                accept.AcceptDate = DataHelper.ToString(Formats.DATE, obj.AcceptDate);
                accept.DeliveryName = DataHelper.ToString(obj.DeliveryName);
                accept.TotalAmount = DataHelper.ToString(Formats.CURRENCY, obj.TotalAmount);
                slipStatusName = mCodeCom.GetCodeName(Logics.GROUP_SLIP_STATUS, obj.SlipStatus);
                accept.SlipStatus = DataHelper.ToString(obj.SlipStatus);
                accept.SlipStatusName = DataHelper.ToString(slipStatusName);

                listAccepts.Add(accept);
            }

            // Set value
            responseModel.ListAccepts = listAccepts;
            responseModel.AcceptCount = DataHelper.ToString(Formats.NUMBER, listAccepts.Count);

            // Return value
            return responseModel;
        }
예제 #3
0
 /// <summary>
 /// Check processing.
 /// </summary>
 /// <param name="inputObject">DataModel</param>
 private void Check(InitDataModel inputObject)
 {
     if (!PageHelper.HasAuthenticated)
         throw new ExecuteException("E_MSG_00001", "Truy cập");
 }
예제 #4
0
        /// <summary>
        /// Get infomation
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private InitDataModel GetInfo(InitDataModel inputObject)
        {
            // Local variable declaration
            InitDataModel getResult = null;
            ClientAcceptsDao clientAcceptHistoryDao = null;

            // Variable initialize
            getResult = new InitDataModel();
            clientAcceptHistoryDao = new ClientAcceptsDao();

            // Get data
            var listAccepts = clientAcceptHistoryDao.GetListAccepts(PageHelper.UserName);

            // Set value
            getResult.ListAccepts = listAccepts;

            // Return value
            return getResult;
        }