Beispiel #1
0
        /// <summary>
        /// Execute convert ouput.
        /// </summary>
        /// <param name="resultObject">DataModel</param>
        /// <returns>ResponseModel</returns>
        private FilterResponseModel Convert(FilterDataModel resultObject)
        {
            // Local variable declaration
            FilterResponseModel responseModel = null;
            IList<OutputAcceptModel> listAccepts = null;
            MCodeCom mCodeCom = null;
            OutputAcceptModel accept = null;

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

            // Get value
            var slipStatusName = string.Empty;
            var paymentMethodsName = string.Empty;
            var deleteFlagName = string.Empty;
            var cbSlipStatus = new ComboModel();
            foreach (var obj in resultObject.ListAccepts)
            {
                accept = new OutputAcceptModel();
                accept.AcceptSlipNo = DataHelper.ToString(obj.AcceptSlipNo);
                accept.SlipStatus = DataHelper.ToString(obj.SlipStatus);
                slipStatusName = mCodeCom.GetCodeName(Logics.GROUP_SLIP_STATUS, accept.SlipStatus);
                accept.SlipStatusName = DataHelper.ToString(slipStatusName);
                accept.AcceptDate = DataHelper.ToString(Formats.DATE, obj.AcceptDate);
                accept.DeliveryDate = DataHelper.ToString(Formats.DATE, obj.DeliveryDate);
                accept.ClientCd = DataHelper.ToString(obj.ClientCd);
                accept.ClientName = DataHelper.ToString(obj.ClientName);
                accept.ClientAddress = DataHelper.ToString(obj.ClientAddress);
                accept.ClientTel = DataHelper.ToString(obj.ClientTel);
                accept.DeliveryCd = DataHelper.ToString(obj.DeliveryCd);
                accept.DeliveryName = DataHelper.ToString(obj.DeliveryName);
                accept.DeliveryAddress = DataHelper.ToString(obj.DeliveryAddress);
                accept.DeliveryTel = DataHelper.ToString(obj.DeliveryTel);
                accept.PaymentMethods = DataHelper.ToString(obj.PaymentMethods);
                paymentMethodsName = mCodeCom.GetCodeName(Logics.GROUP_PAYMENT_METHODS, accept.PaymentMethods);
                accept.PaymentMethodsName = DataHelper.ToString(paymentMethodsName);
                accept.GiftCd = DataHelper.ToString(obj.GiftCd);
                accept.ViewId = DataHelper.ToString(obj.ViewId);
                accept.Notes = DataHelper.ToString(obj.Notes);
                accept.UpdateUser = DataHelper.ToString(obj.UpdateUser);
                accept.UpdateDate = DataHelper.ToString(Formats.UPDATE_DATE, obj.UpdateDate);
                accept.DeleteFlag = DataHelper.ToString(obj.DeleteFlag);
                deleteFlagName = mCodeCom.GetCodeName(Logics.GROUP_DELETE_FLAG, accept.DeleteFlag);
                accept.DeleteFlagName = DataHelper.ToString(deleteFlagName);
                cbSlipStatus = MCodeCom.ToComboItems(resultObject.ListSlipStatus, accept.SlipStatus);
                accept.ListSlipStatus = cbSlipStatus.ListItems;
                accept.SlipStatus = cbSlipStatus.SeletedValue;
                listAccepts.Add(accept);
            }

            // Set value
            responseModel.ListAccepts = listAccepts;

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

            // Variable initialize
            responseModel = new FilterResponseModel();

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

            // Check infomation
            Check(inputObject);

            // Get infomation
            resultObject = GetInfo(inputObject);

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

            return responseModel;
        }