コード例 #1
0
        public AppointmentChangeResponse AppointmentChange(AppointmentChangeRequest request)
        {
            AppointmentChangeResponse response = new AppointmentChangeResponse();

            try
            {
                //Request body-header object validation
                response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader);
                if (response.Errors != null)
                {
                    response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader();
                    return response;
                }
                response.Errors = GetErrorDataListFromRequest(request.AppointmentChange);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                    return response;
                }

                using (Appointment_Biz biz = new Appointment_Biz())
                {
                    response = biz.AppointmentChange(request);
                }
            }
            catch (Exception ex)
            {
                response.Errors = GetErrorDataListFromException(ex);
                WA.Standard.IF.Logger.Log.Log.RootLogger.ErrorFormat("AppointmentChangeResponse Error {0}: ", ex);
            }

            return response;
        }
コード例 #2
0
ファイル: Message_Biz.cs プロジェクト: waservice/HMCIS
        public MessageReceiveResponse MessageReceive(MessageReceiveRequest request)
        {
            MessageReceiveResponse response = new MessageReceiveResponse();

            if (WA.Standard.IF.Logger.Log.Log.RunningMode.Equals(WA.Standard.IF.Data.v2.Common.Common.RunningMode.Mapper))
            {
                #region For Mapper Process

                switch (request.MessageReceive.MessageType)
                {
                    case "Appointment":
                        WA.Standard.IF.Biz.v2.Common.Appointment_Biz biz = new Appointment_Biz();

                    //Get Appointment By AppointmentNo
                        break;
                    case "Employee": //Get Employee By EmployeeNo
                        break;
                    case "Job": //Get Job By JobNo
                        break;
                    case "RepairOrder"://Get RepairOrder By RepairOrderNo
                        break;
                    default:
                        break;
                }

                #endregion
            }
            else if (WA.Standard.IF.Logger.Log.Log.RunningMode.Equals(WA.Standard.IF.Data.v2.Common.Common.RunningMode.XMLDMS))
            {
                response.TransactionHeader = request.TransactionHeader;

                #region For XML Process
                response.ResultMessage = GetResultMessageData(ResponseCode.Success, ResponseMessage.Success);
                #endregion
            }
            else if (WA.Standard.IF.Logger.Log.Log.RunningMode.Equals(WA.Standard.IF.Data.v2.Common.Common.RunningMode.DBDMS))
            {
                #region For DB Process - Not Yet
                response.ResultMessage = GetResultMessageData(ResponseCode.Success, ResponseMessage.Success);
                #endregion
            }

            return response;
        }
コード例 #3
0
ファイル: Appointment.asmx.cs プロジェクト: waservice/HMCIS
        public AppointmentChangeResponse AppointmentChange(AppointmentChangeRequest request)
        {
            AppointmentChangeResponse response = new AppointmentChangeResponse();

            try
            {
                WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA AppointmentChangeRequest XML", request);

                //Request body-header object validation
                response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader);
                if (response.Errors != null)
                {
                    response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader();
                }
                response.Errors = GetErrorDataListFromRequest(request.AppointmentChange);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                }

                if (response.Errors == null)
                {
                    using (Appointment_Biz biz = new Appointment_Biz())
                    {
                        response = biz.AppointmentChange(request);
                    }

                    WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA AppointmentChangeResponse XML", response);
                }
            }
            catch (Exception ex)
            {
                response.Errors = GetErrorDataListFromException(ex);
                WA.Standard.IF.Logger.Log.Log.SaveErrorLog(null, "AppointmentChange", request, ex.Message, ex);
            }

            return response;
        }