コード例 #1
0
ファイル: InitLogic.cs プロジェクト: hieur8/web-mbec
        /// <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
            var user = resultObject.User;
            details.Password = DataHelper.ToString(Logics.PASSWORD_DEFAULT);
            details.Status = DataHelper.ToString(_status);
            details.UserCd = DataHelper.ToString(user.UserCd);
            details.Email = DataHelper.ToString(user.Email);
            details.FullName = DataHelper.ToString(user.FullName);
            details.Address = DataHelper.ToString(user.Address);
            details.CityCd = DataHelper.ToString(user.CityCd);
            details.Phone1 = DataHelper.ToString(user.Phone1);
            details.Phone2 = DataHelper.ToString(user.Phone2);
            details.DeleteFlag = DataHelper.ToString(user.DeleteFlag);
            if (user.UserGroups.Count > decimal.Zero)
                details.GroupCd = DataHelper.ToString(user.UserGroups[0].GroupCd);

            var cbCity = MCodeCom.ToComboItems(resultObject.ListCity, details.CityCd);
            details.ListCity = cbCity.ListItems;
            details.CityCd = cbCity.SeletedValue;
            var cbDeleteFlag = MCodeCom.ToComboItems(resultObject.ListDeleteFlag, details.DeleteFlag);
            details.ListDeleteFlag = cbDeleteFlag.ListItems;
            details.DeleteFlag = cbDeleteFlag.SeletedValue;
            var cbGroup = MCodeCom.ToComboItems(resultObject.ListGroup, details.GroupCd);
            details.ListGroup = cbGroup.ListItems;
            details.GroupCd = cbGroup.SeletedValue;

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

            // Return value
            return response;
        }
コード例 #2
0
ファイル: InitLogic.cs プロジェクト: hieur8/web-mbec
        /// <summary>
        /// Execute processing.
        /// </summary>
        /// <param name="request">RequestModel</param>
        /// <returns>ResponseModel</returns>
        private InitResponseModel Execute(InitRequestModel request)
        {
            // Local variable declaration
            InitResponseModel response = null;
            InitDataModel inputObject = null;
            InitDataModel resultObject = null;

            // Variable initialize
            response = new InitResponseModel();

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

            // Check processing
            Check(inputObject);

            // Get infomation
            resultObject = GetInfo(inputObject);

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

            return response;
        }