示例#1
0
        /// <summary>
        /// Check processing.
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        private void Check(InitDataModel inputObject)
        {
            // Local variable declaration
            ClientAcceptDetailsDao clientAcceptDetailsDao = null;

            // Variable initialize
            clientAcceptDetailsDao = new ClientAcceptDetailsDao();

            // Check valid
            if (DataCheckHelper.IsNull(inputObject.AcceptSlipNo) && DataCheckHelper.IsNull(inputObject.ViewId))
                throw new ExecuteException("E_MSG_00004", "Mã hóa đơn");

            if (!clientAcceptDetailsDao.IsExistAccept(inputObject))
                throw new DataNotExistException(string.Format("Hóa đơn ({0})", inputObject.AcceptSlipNo + inputObject.ViewId));
        }
示例#2
0
        /// <summary>
        /// Get infomation
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private InitDataModel GetInfo(InitDataModel inputObject)
        {
            // Local variable declaration
            InitDataModel getResult = null;
            ClientAcceptDetailsDao clientAcceptDetailsDao = null;

            // Variable initialize
            getResult = new InitDataModel();
            clientAcceptDetailsDao = new ClientAcceptDetailsDao();

            // Get data
            var accept = clientAcceptDetailsDao.GetAccept(inputObject);

            // Set value
            getResult.Accept = accept;

            // Return value
            return getResult;
        }