Exemplo n.º 1
0
        /// <summary>
        /// Execute convert ouput.
        /// </summary>
        /// <param name="resultObject">DataModel</param>
        /// <returns>ResponseModel</returns>
        private InitResponseModel Convert(InitDataModel resultObject)
        {
            // Local variable declaration
            InitResponseModel response = null;
            OutputDetailsModel details = null;

            // Variable initialize
            response = new InitResponseModel();
            details = new OutputDetailsModel();

            // Get value
            details.CategoryDiv = DataHelper.ToString(resultObject.CategoryDiv);
            details.DeleteFlag = DataHelper.ToString(resultObject.DeleteFlag);

            var cbCategoryDiv = MCodeCom.ToComboItems(resultObject.ListCategoryDiv, details.CategoryDiv);
            details.ListCategoryDiv = cbCategoryDiv.ListItems;
            details.CategoryDiv = cbCategoryDiv.SeletedValue;
            var cbDeleteFlag = MCodeCom.ToComboItems(resultObject.ListDeleteFlag, details.DeleteFlag);
            details.ListDeleteFlag = cbDeleteFlag.ListItems;
            details.DeleteFlag = cbDeleteFlag.SeletedValue;

            // Set value
            response.Details = new List<OutputDetailsModel>() { details };

            // Return value
            return response;
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Check processing
 /// </summary>
 /// <param name="inputObject">DataModel</param>
 /// <returns>DataModel</returns>
 private void Check(InitDataModel inputObject)
 {
     // Check role
     if (!PageHelper.AuthRole(Logics.RL_CATEGORIES))
         throw new ExecuteException("E_MSG_00013");
 }
Exemplo n.º 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;
            MCodeCom mCodeCom = null;

            // Variable initialize
            getResult = new InitDataModel();
            mCodeCom = new MCodeCom();

            // Get data
            var listCategoryDiv = mCodeCom.GetListCode(Logics.GROUP_CATEGORY_DIV, null, false, false);
            var listDeleteFlag = mCodeCom.GetListCode(Logics.GROUP_DELETE_FLAG, null, false, false);

            // Set value
            getResult.ListCategoryDiv = listCategoryDiv;
            getResult.ListDeleteFlag = listDeleteFlag;

            // Return value
            return getResult;
        }