예제 #1
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;
        }
예제 #2
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<OutputAcceptModel> listAccepts = null;
            MCodeCom mCodeCom = null;
            OutputAcceptModel accept = null;

            // Variable initialize
            responseModel = new InitResponseModel();
            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
            cbSlipStatus = MCodeCom.ToComboItems(resultObject.ListSlipStatus, null);
            responseModel.ListSlipStatus = cbSlipStatus.ListItems;
            responseModel.SlipStatus = cbSlipStatus.SeletedValue;
            responseModel.AcceptDateStart = DataHelper.ToString(Formats.DATE, resultObject.AcceptDateStart);
            responseModel.AcceptDateEnd = DataHelper.ToString(Formats.DATE, resultObject.AcceptDateEnd);
            responseModel.ListAccepts = listAccepts;

            // Return value
            return responseModel;
        }
예제 #3
0
 /// <summary>
 /// Check processing.
 /// </summary>
 /// <param name="inputObject">DataModel</param>
 private void Check(InitDataModel inputObject)
 {
     // Check role
     if (!PageHelper.AuthRole(Logics.RL_ACCEPTS))
         throw new ExecuteException("E_MSG_00013");
 }
예제 #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;
            AdminAcceptListDao adminAcceptListDao = null;

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

            // Get data
            var listSlipStatus = mCodeCom.GetListCode(Logics.GROUP_SLIP_STATUS, null, true, false);
            var acceptDateStart = DataHelper.GetFirstDayOfMonth();
            var acceptDateEnd = DataHelper.GetLastDayOfMonth();
            var listAccepts = adminAcceptListDao.GetListAccepts();

            // Set value
            getResult.ListSlipStatus = listSlipStatus;
            getResult.AcceptDateStart = acceptDateStart;
            getResult.AcceptDateEnd = acceptDateEnd;
            getResult.ListAccepts = listAccepts;

            // Return value
            return getResult;
        }