Example #1
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<OutputGroupRoleModel> listGroupRoles = null;
            OutputGroupRoleModel groupRole = null;

            // Variable initialize
            responseModel = new InitResponseModel();
            listGroupRoles = new List<OutputGroupRoleModel>();

            // Get value
            var cbDeleteFlag = new ComboModel();
            foreach (var obj in resultObject.ListGroupRoles)
            {
                groupRole = new OutputGroupRoleModel();
                groupRole.GroupCd = DataHelper.ToString(obj.GroupCd);
                groupRole.GroupName = DataHelper.ToString(obj.Group.GroupName);
                groupRole.RoleCd = DataHelper.ToString(obj.RoleCd);
                groupRole.RoleName = DataHelper.ToString(obj.Role.RoleName);
                groupRole.DeleteFlag = DataHelper.ToString(obj.DeleteFlag);
                groupRole.UpdateDate = DataHelper.ToString(Formats.UPDATE_DATE, obj.UpdateDate);

                cbDeleteFlag = MCodeCom.ToComboItems(resultObject.ListDeleteFlag, groupRole.DeleteFlag);
                groupRole.ListDeleteFlag = cbDeleteFlag.ListItems;
                groupRole.DeleteFlag = cbDeleteFlag.SeletedValue;

                listGroupRoles.Add(groupRole);
            }

            // Set value
            responseModel.GroupCd = resultObject.GroupCd;
            responseModel.ListGroupRoles = listGroupRoles;

            // Return value
            return responseModel;
        }
Example #2
0
        /// <summary>
        /// Execute processing.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>ResponseModel</returns>
        private InitResponseModel Execute(InitRequestModel request)
        {
            // Local variable declaration
            InitResponseModel responseModel = null;
            InitDataModel inputObject = null;
            InitDataModel resultObject = null;

            // Variable initialize
            responseModel = new InitResponseModel();

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

            // Check infomation
            Check(inputObject);

            // Get infomation
            resultObject = GetInfo(inputObject);

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

            // Return value
            return responseModel;
        }