/// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetSessionEventReportRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetSessionEventReportRequest> CustomSetSessionEventReportRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_SetSessionEventReportRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("serviceSessionId", ServiceSessionId.ToString()),

                                   SessionEvent.ToXML(),

                                   ExecPartnerSessionId.HasValue
                              ? new XElement("execPartnerSessionId", ExecPartnerSessionId.ToString())
                              : null

                                   );


            return(CustomSetSessionEventReportRequestSerializer != null
                       ? CustomSetSessionEventReportRequestSerializer(this, XML)
                       : XML);
        }
Beispiel #2
0
        /// <summary>
        /// Return a JSON representation of this object.
        /// </summary>
        /// <param name="CustomOperatorEVSEDataSerializer">A delegate to serialize custom operator EVSE data JSON objects.</param>
        /// <param name="CustomEVSEDataRecordSerializer">A delegate to serialize custom EVSE data record JSON objects.</param>
        /// <param name="CustomAddressSerializer">A delegate to serialize custom address JSON objects.</param>
        /// <param name="CustomChargingFacilitySerializer">A delegate to serialize custom charging facility JSON objects.</param>
        /// <param name="CustomGeoCoordinatesSerializer">A delegate to serialize custom geo coordinates JSON objects.</param>
        /// <param name="CustomEnergySourceSerializer">A delegate to serialize custom time period JSON objects.</param>
        /// <param name="CustomEnvironmentalImpactSerializer">A delegate to serialize custom time period JSON objects.</param>
        /// <param name="CustomOpeningTimesSerializer">A delegate to serialize custom opening time JSON objects.</param>
        public JObject ToJSON(CustomJObjectSerializerDelegate <OperatorEVSEData> CustomOperatorEVSEDataSerializer = null,
                              CustomJObjectSerializerDelegate <EVSEDataRecord> CustomEVSEDataRecordSerializer     = null,
                              CustomJObjectSerializerDelegate <Address> CustomAddressSerializer = null,
                              CustomJObjectSerializerDelegate <ChargingFacility> CustomChargingFacilitySerializer       = null,
                              CustomJObjectSerializerDelegate <GeoCoordinates> CustomGeoCoordinatesSerializer           = null,
                              CustomJObjectSerializerDelegate <EnergySource> CustomEnergySourceSerializer               = null,
                              CustomJObjectSerializerDelegate <EnvironmentalImpact> CustomEnvironmentalImpactSerializer = null,
                              CustomJObjectSerializerDelegate <OpeningTime> CustomOpeningTimesSerializer = null)
        {
            var JSON = JSONObject.Create(

                new JProperty("EvseDataRecord", new JArray(EVSEDataRecords.Select(evseDataRecord => evseDataRecord.ToJSON(CustomEVSEDataRecordSerializer,
                                                                                                                          CustomAddressSerializer,
                                                                                                                          CustomChargingFacilitySerializer,
                                                                                                                          CustomGeoCoordinatesSerializer,
                                                                                                                          CustomEnergySourceSerializer,
                                                                                                                          CustomEnvironmentalImpactSerializer,
                                                                                                                          CustomOpeningTimesSerializer)))),
                new JProperty("OperatorID", OperatorId.ToString()),
                new JProperty("OperatorName", OperatorName),

                CustomData?.HasValues == true
                               ? new JProperty("CustomData", CustomData)
                               : null

                );

            return(CustomOperatorEVSEDataSerializer != null
                       ? CustomOperatorEVSEDataSerializer(this, JSON)
                       : JSON);
        }
Beispiel #3
0
        /// <summary>
        /// Compares two authorize start requests for equality.
        /// </summary>
        /// <param name="AuthorizeStart">An authorize start request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(AuthorizeStartRequest AuthorizeStart)
        {
            if (AuthorizeStart is null)
            {
                return(false);
            }

            return(OperatorId.Equals(AuthorizeStart.OperatorId) &&
                   Identification.Equals(AuthorizeStart.Identification) &&

                   ((!EVSEId.HasValue && !AuthorizeStart.EVSEId.HasValue) ||
                    (EVSEId.HasValue && AuthorizeStart.EVSEId.HasValue && EVSEId.Value.Equals(AuthorizeStart.EVSEId.Value))) &&

                   ((!PartnerProductId.HasValue && !AuthorizeStart.PartnerProductId.HasValue) ||
                    (PartnerProductId.HasValue && AuthorizeStart.PartnerProductId.HasValue && PartnerProductId.Value.Equals(AuthorizeStart.PartnerProductId.Value))) &&

                   ((!SessionId.HasValue && !AuthorizeStart.SessionId.HasValue) ||
                    (SessionId.HasValue && AuthorizeStart.SessionId.HasValue && SessionId.Value.Equals(AuthorizeStart.SessionId.Value))) &&

                   ((!CPOPartnerSessionId.HasValue && !AuthorizeStart.CPOPartnerSessionId.HasValue) ||
                    (CPOPartnerSessionId.HasValue && AuthorizeStart.CPOPartnerSessionId.HasValue && CPOPartnerSessionId.Value.Equals(AuthorizeStart.CPOPartnerSessionId.Value))) &&

                   ((!EMPPartnerSessionId.HasValue && !AuthorizeStart.EMPPartnerSessionId.HasValue) ||
                    (EMPPartnerSessionId.HasValue && AuthorizeStart.EMPPartnerSessionId.HasValue && EMPPartnerSessionId.Value.Equals(AuthorizeStart.EMPPartnerSessionId.Value))));
        }
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomAuthorizeStopRequestSerializer">A delegate to customize the serialization of AuthorizeStop requests.</param>
        /// <param name="CustomIdentificationSerializer">A delegate to serialize custom Identification XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <AuthorizeStopRequest> CustomAuthorizeStopRequestSerializer = null,
                              CustomXMLSerializerDelegate <Identification> CustomIdentificationSerializer             = null)

        {
            var XML = new XElement(OICPNS.Authorization + "eRoamingAuthorizeStop",

                                   new XElement(OICPNS.Authorization + "SessionID", SessionId.ToString()),

                                   CPOPartnerSessionId.HasValue
                                          ? new XElement(OICPNS.Authorization + "CPOPartnerSessionID", CPOPartnerSessionId.ToString())
                                          : null,

                                   EMPPartnerSessionId.HasValue
                                          ? new XElement(OICPNS.Authorization + "EMPPartnerSessionID", EMPPartnerSessionId.ToString())
                                          : null,

                                   new XElement(OICPNS.Authorization + "OperatorID", OperatorId.ToString()),

                                   EVSEId.HasValue
                                          ? new XElement(OICPNS.Authorization + "EvseID", EVSEId.ToString())
                                          : null,

                                   Identification.ToXML(CustomIdentificationSerializer: CustomIdentificationSerializer)

                                   );

            return(CustomAuthorizeStopRequestSerializer != null
                       ? CustomAuthorizeStopRequestSerializer(this, XML)
                       : XML);
        }
Beispiel #5
0
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomGetServiceAuthorisationRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <GetServiceAuthorisationRequest> CustomGetServiceAuthorisationRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_GetServiceAuthorisationRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("EVSEIdType", EVSEId.Format.AsText()),
                                   new XElement("EVSEId", EVSEId.ToString()),

                                   new XElement("userIdType", UserId.Format.AsText()),
                                   new XElement("userId", UserId.ToString()),

                                   new XElement("requestedServiceId", RequestedServiceId.ToString()),

                                   PartnerServiceSessionId.HasValue
                              ? new XElement("partnerServiceSessionId", PartnerServiceSessionId.Value.ToString())
                              : null

                                   );


            return(CustomGetServiceAuthorisationRequestSerializer != null
                       ? CustomGetServiceAuthorisationRequestSerializer(this, XML)
                       : XML);
        }
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetChargingStationAvailabilityStatusRequestSerializer">A delegate to serialize custom set ChargingStation availability status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetChargingStationAvailabilityStatusRequest> CustomSetChargingStationAvailabilityStatusRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.EVCIDynamic + "eMIP_ToIOP_SetChargingStationAvailabilityStatusRequest",

                                   TransactionId.HasValue
                              ? new XElement(eMIPNS.EVCIDynamic + "transactionId", TransactionId.ToString())
                              : null,

                                   new XElement(eMIPNS.EVCIDynamic + "partnerIdType", PartnerId.Format.ToString()),
                                   new XElement(eMIPNS.EVCIDynamic + "partnerId", PartnerId.ToString()),

                                   new XElement(eMIPNS.EVCIDynamic + "operatorIdType", OperatorId.Format.ToString()),
                                   new XElement(eMIPNS.EVCIDynamic + "operatorId", OperatorId.ToString()),

                                   new XElement(eMIPNS.EVCIDynamic + "ChargingStationIdType", ChargingStationId.Format.ToString()),
                                   new XElement(eMIPNS.EVCIDynamic + "ChargingStationId", ChargingStationId.ToString()),

                                   new XElement(eMIPNS.EVCIDynamic + "statusEventDate", StatusEventDate.ToIso8601(false)),
                                   new XElement(eMIPNS.EVCIDynamic + "availabilityStatus", AvailabilityStatus.AsNumber()),

                                   AvailabilityStatusUntil.HasValue
                              ? new XElement(eMIPNS.EVCIDynamic + "availabilityStatusUntil", AvailabilityStatusUntil.Value.ToIso8601(false))
                              : null,

                                   AvailabilityStatusComment.IsNeitherNullNorEmpty()
                              ? new XElement(eMIPNS.EVCIDynamic + "availabilityStatusComment", AvailabilityStatusComment)
                              : null

                                   );


            return(CustomSetChargingStationAvailabilityStatusRequestSerializer != null
                       ? CustomSetChargingStationAvailabilityStatusRequestSerializer(this, XML)
                       : XML);
        }
        /// <summary>
        /// Return a JSON-representation of this object.
        /// </summary>
        /// <param name="CustomAuthorizeStopRequestSerializer">A delegate to customize the serialization of AuthorizeStopRequest responses.</param>
        /// <param name="CustomIdentificationSerializer">A delegate to serialize custom Identification JSON objects.</param>
        public JObject ToJSON(CustomJObjectSerializerDelegate <AuthorizeStopRequest> CustomAuthorizeStopRequestSerializer = null,
                              CustomJObjectSerializerDelegate <Identification> CustomIdentificationSerializer             = null)
        {
            var JSON = JSONObject.Create(

                new JProperty("OperatorID", OperatorId.ToString()),
                new JProperty("SessionID", SessionId.ToString()),
                new JProperty("Identification", Identification.ToJSON(CustomIdentificationSerializer)),

                EVSEId.HasValue
                               ? new JProperty("EvseID", EVSEId.Value.ToString())
                               : null,

                CPOPartnerSessionId.HasValue
                               ? new JProperty("CPOPartnerSessionID", CPOPartnerSessionId.Value.ToString())
                               : null,

                EMPPartnerSessionId.HasValue
                               ? new JProperty("EMPPartnerSessionID", EMPPartnerSessionId.Value.ToString())
                               : null,

                CustomData != null
                               ? new JProperty("CustomData", CustomData)
                               : null

                );

            return(CustomAuthorizeStopRequestSerializer != null
                       ? CustomAuthorizeStopRequestSerializer(this, JSON)
                       : JSON);
        }
Beispiel #8
0
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="OperatorEVSEDataXName">The OperatorEVSEData XML name to use.</param>
        /// <param name="CustomOperatorEVSEDataSerializer">A delegate to serialize custom OperatorEVSEData XML elements.</param>
        /// <param name="EVSEDataRecordXName">The EVSEDataRecord XML name to use.</param>
        /// <param name="IncludeEVSEDataRecordMetadata">Include EVSEDataRecord deltaType and lastUpdate meta data.</param>
        /// <param name="CustomEVSEDataRecordSerializer">A delegate to serialize custom EVSEDataRecord XML elements.</param>
        /// <param name="CustomAddressSerializer">A delegate to serialize custom Address XML elements.</param>
        /// <param name="CustomChargingFacilitySerializer">A delegate to serialize custom ChargingFacility XML elements.</param>
        public XElement ToXML(XName OperatorEVSEDataXName = null,
                              CustomXMLSerializerDelegate <OperatorEVSEData> CustomOperatorEVSEDataSerializer = null,
                              XName EVSEDataRecordXName             = null,
                              Boolean IncludeEVSEDataRecordMetadata = true,
                              CustomXMLSerializerDelegate <EVSEDataRecord> CustomEVSEDataRecordSerializer = null,
                              CustomXMLSerializerDelegate <Address> CustomAddressSerializer = null,
                              CustomXMLSerializerDelegate <ChargingFacility> CustomChargingFacilitySerializer = null)

        {
            var xml = new XElement(OperatorEVSEDataXName ?? OICPNS.EVSEData + "OperatorEvseData",

                                   new XElement(OICPNS.EVSEData + "OperatorID", OperatorId.ToString()),

                                   OperatorName.IsNotNullOrEmpty()
                               ? new XElement(OICPNS.EVSEData + "OperatorName", OperatorName)
                               : null,

                                   EVSEDataRecords.Any()
                               ? EVSEDataRecords.SafeSelect(evsedatarecord => evsedatarecord.ToXML(EVSEDataRecordXName,
                                                                                                   IncludeEVSEDataRecordMetadata,
                                                                                                   CustomEVSEDataRecordSerializer,
                                                                                                   CustomAddressSerializer,
                                                                                                   CustomChargingFacilitySerializer))
                               : null

                                   );

            return(CustomOperatorEVSEDataSerializer != null
                       ? CustomOperatorEVSEDataSerializer(this, xml)
                       : xml);
        }
Beispiel #9
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(OperatorId.GetHashCode() * 13 ^
                       Identification.GetHashCode() * 11 ^

                       (EVSEId != null
                            ? EVSEId.GetHashCode() * 9
                            : 0) ^

                       (PartnerProductId != null
                            ? PartnerProductId.GetHashCode() * 7
                            : 0) ^

                       (SessionId != null
                            ? SessionId.GetHashCode() * 5
                            : 0) ^

                       (CPOPartnerSessionId != null
                            ? CPOPartnerSessionId.GetHashCode() * 3
                            : 0) ^

                       (EMPPartnerSessionId != null
                            ? EMPPartnerSessionId.GetHashCode()
                            : 0));
            }
        }
Beispiel #10
0
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetChargeDetailRecordRequestSerializer">A delegate to serialize custom SetChargeDetailRecord request XML elements.</param>
        /// <param name="CustomChargeDetailRecordSerializer">A delegate to serialize custom ChargeDetailRecord XML elements.</param>
        /// <param name="CustomMeterReportSerializer">A delegate to serialize custom MeterReport XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetChargeDetailRecordRequest> CustomSetChargeDetailRecordRequestSerializer = null,
                              CustomXMLSerializerDelegate <ChargeDetailRecord> CustomChargeDetailRecordSerializer = null,
                              CustomXMLSerializerDelegate <MeterReport> CustomMeterReportSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_SetChargeDetailRecordRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   ChargeDetailRecord.ToXML(CustomChargeDetailRecordSerializer: CustomChargeDetailRecordSerializer,
                                                            CustomMeterReportSerializer:        CustomMeterReportSerializer)

                                   );


            return(CustomSetChargeDetailRecordRequestSerializer != null
                       ? CustomSetChargeDetailRecordRequestSerializer(this, XML)
                       : XML);
        }
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetEVSEBusyStatusRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetEVSEBusyStatusRequest> CustomSetEVSEBusyStatusRequestSerializer = null)
        {
            var XML = new XElement(eMIPNS.EVCIDynamic + "eMIP_ToIOP_SetEVSEBusyStatusRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("EVSEIdType", EVSEId.Format.AsText()),
                                   new XElement("EVSEId", EVSEId.ToString()),

                                   new XElement("statusEventDate", StatusEventDate.ToIso8601(false).Replace("Z", "")),
                                   new XElement("busyStatus", BusyStatus.AsNumber()),

                                   BusyStatusUntil.HasValue
                              ? new XElement("busyStatusUntil", BusyStatusUntil.Value.ToIso8601(false).Replace("Z", ""))
                              : null,

                                   BusyStatusComment.IsNeitherNullNorEmpty()
                              ? new XElement("busyStatusComment", BusyStatusComment)
                              : null

                                   );


            return(CustomSetEVSEBusyStatusRequestSerializer != null
                       ? CustomSetEVSEBusyStatusRequestSerializer(this, XML)
                       : XML);
        }
        public void _setLogInfo()
        {
            EncryptDecrypt ENC = new EncryptDecrypt();

            Response.Cookies.Add(new HttpCookie("ELOG_PAR1", ENC.Encrypt(OperatorId.ToString(), true)));
            Response.Cookies.Add(new HttpCookie("ELOG_PAR2", ENC.Encrypt(LocalIPAddress().ToString(), true)));
            Response.Cookies.Add(new HttpCookie("ELOG_PAR3", ENC.Encrypt(StationId.ToString(), true)));
        }
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="OperatorEVSEStatus">An object to compare with.</param>
        public Int32 CompareTo(OperatorEVSEStatus OperatorEVSEStatus)
        {
            if ((Object)OperatorEVSEStatus == null)
            {
                throw new ArgumentNullException(nameof(OperatorEVSEStatus), "The given OperatorEVSEStatus must not be null!");
            }

            return(OperatorId.CompareTo(OperatorEVSEStatus.OperatorId));
        }
Beispiel #14
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="OperatorEVSEData">An object to compare with.</param>
        public Int32 CompareTo(OperatorEVSEData OperatorEVSEData)
        {
            if ((Object)OperatorEVSEData == null)
            {
                throw new ArgumentNullException(nameof(OperatorEVSEData), "The given operator EVSE data must not be null!");
            }

            return(OperatorId.CompareTo(OperatorEVSEData.OperatorId));
        }
Beispiel #15
0
 public override void Encode()
 {
     encodeBuf.Clear();
     encodeBuf.AddRange(AddString(CmdSendTime, 14));
     encodeBuf.AddRange(AddString(CmdCode, 4));
     encodeBuf.AddRange(AddString(BoxModuleCode, 2));
     encodeBuf.AddRange(AddString(OperatorId.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(ValidEndTime.PadLeft(16, '0'), 16));
 }
Beispiel #16
0
        /// <summary>
        /// Return a JSON representation of this object.
        /// </summary>
        public JObject ToJSON()

        => JSONObject.Create(
            new JProperty("operatorId", OperatorId.ToString()),
            new JProperty("operatorName", OperatorName),
            new JProperty("chargingPools", JSONArray.Create(
                              ChargingPools.Select(chargingPool => chargingPool.ToJSON()))
                          )
            );
Beispiel #17
0
        /// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="CustomSetServiceAuthorisationRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param>
        /// <param name="CustomMeterReportSerializer">A delegate to serialize custom MeterReport XML elements.</param>
        public XElement ToXML(CustomXMLSerializerDelegate <SetServiceAuthorisationRequest> CustomSetServiceAuthorisationRequestSerializer = null,
                              CustomXMLSerializerDelegate <MeterReport> CustomMeterReportSerializer = null)
        {
            var XML = new XElement(eMIPNS.Authorisation + "eMIP_ToIOP_SetServiceAuthorisationRequest",

                                   TransactionId.HasValue
                              ? new XElement("transactionId", TransactionId.ToString())
                              : null,

                                   new XElement("partnerIdType", PartnerId.Format.AsText()),
                                   new XElement("partnerId", PartnerId.ToString()),

                                   new XElement("operatorIdType", OperatorId.Format.AsText()),
                                   new XElement("operatorId", OperatorId.ToString()),

                                   new XElement("EVSEIdType", EVSEId.Format.AsText()),
                                   new XElement("EVSEId", EVSEId.ToString()),

                                   new XElement("userIdType", UserId.Format.AsText()),
                                   new XElement("userId", UserId.ToString()),

                                   new XElement("requestedServiceId", RequestedServiceId.ToString()),
                                   new XElement("authorisationValue", AuthorisationValue.ToString()),
                                   new XElement("intermediateCDRRequested", IntermediateCDRRequested ? "1" : "0"),

                                   PartnerServiceSessionId.HasValue
                              ? new XElement("serviceSessionId", PartnerServiceSessionId.ToString())
                              : null,

                                   UserContractIdAlias.HasValue
                              ? new XElement("userContractIdAlias", UserContractIdAlias.ToString())
                              : null,

                                   MeterLimits.SafeAny()
                              ? new XElement("meterLimitList", MeterLimits.Select(meterreport => meterreport.ToXML(CustomMeterReportSerializer: CustomMeterReportSerializer)))
                              : null,

                                   Parameter.IsNotNullOrEmpty()
                              ? new XElement("parameter", Parameter)
                              : null,

                                   BookingId.HasValue
                              ? new XElement("bookingId", BookingId.ToString())
                              : null,

                                   SalePartnerBookingId.HasValue
                              ? new XElement("salePartnerBookingId", SalePartnerBookingId.ToString())
                              : null

                                   );


            return(CustomSetServiceAuthorisationRequestSerializer != null
                       ? CustomSetServiceAuthorisationRequestSerializer(this, XML)
                       : XML);
        }
Beispiel #18
0
        /// <summary>
        /// Compares two charging connector identifications for equality.
        /// </summary>
        /// <param name="ChargingConnectorId">A charging connector identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargingConnector_Id ChargingConnectorId)
        {
            if ((Object)ChargingConnectorId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(ChargingConnectorId.OperatorId) &&
                   MinSuffix.ToLower().Equals(ChargingConnectorId.MinSuffix.ToLower()));
        }
Beispiel #19
0
        /// <summary>
        /// Compares two EVSE identifications for equality.
        /// </summary>
        /// <param name="EVSEGroupId">An EVSE group identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(EVSEGroup_Id EVSEGroupId)
        {
            if ((Object)EVSEGroupId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(EVSEGroupId.OperatorId) &&
                   Suffix.Equals(EVSEGroupId.Suffix));
        }
Beispiel #20
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (OperatorId != null ? OperatorId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ReplicaId;
         hashCode = (hashCode * 397) ^ SeqNumber.GetHashCode();
         return(hashCode);
     }
 }
        /// <summary>
        /// Compares two parking reservation identifications for equality.
        /// </summary>
        /// <param name="ReservationId">An parking reservation identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ParkingReservation_Id ReservationId)
        {
            if ((Object)ReservationId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(ReservationId.OperatorId) &&
                   Suffix.Equals(ReservationId.Suffix));
        }
Beispiel #22
0
        /// <summary>
        /// Compares two EVSEOperator_Ids for equality.
        /// </summary>
        /// <param name="EVSEOperatorId">A EVSEOperator_Id to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ParkingOperator_Id EVSEOperatorId)
        {
            if ((Object)EVSEOperatorId == null)
            {
                return(false);
            }

            return(CountryCode.Equals(EVSEOperatorId.CountryCode) &&
                   OperatorId.Equals(EVSEOperatorId.OperatorId));
        }
Beispiel #23
0
        public override void Encode()
        {
            encodeBuf.Clear();

            encodeBuf.AddRange(AddString(DeviceId, 8));
            encodeBuf.AddRange(AddString(OperateTime, 14));
            encodeBuf.AddRange(AddString(OperatorId.PadLeft(6, ' '), 6));
            encodeBuf.AddRange(AddString(ShiftId.PadLeft(10, '0'), 10));
            encodeBuf.AddRange(AddString(ShiftEvent, 1));
        }
Beispiel #24
0
        /// <summary>
        /// Compares two charging station identifications for equality.
        /// </summary>
        /// <param name="ChargingStationId">A charging station identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargingStation_Id ChargingStationId)
        {
            if ((Object)ChargingStationId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(ChargingStationId.OperatorId) &&
                   Suffix.Equals(ChargingStationId.Suffix));
        }
Beispiel #25
0
        /// <summary>
        /// Compares two EVSE identifications for equality.
        /// </summary>
        /// <param name="EVSEId">An EVSE identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(EVSE_Id EVSEId)
        {
            if ((Object)EVSEId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(EVSEId.OperatorId) &&
                   MinSuffix.ToLower().Equals(EVSEId.MinSuffix.ToLower()));
        }
Beispiel #26
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return((TransactionId.HasValue
                            ? TransactionId.GetHashCode() * 7
                            : 0) ^

                       PartnerId.GetHashCode() * 5 ^
                       OperatorId.GetHashCode() * 3 ^
                       ChargeDetailRecord.GetHashCode());
            }
        }
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(OperatorId.GetHashCode() * 13 ^
                       SessionId.GetHashCode() * 11 ^
                       Identification.GetHashCode() * 7 ^

                       (EVSEId?.GetHashCode() ?? 0) * 5 ^
                       (CPOPartnerSessionId?.GetHashCode() ?? 0) * 3 ^
                       (EMPPartnerSessionId?.GetHashCode() ?? 0));
            }
        }
        /// <summary>
        /// 挂号正式结算
        /// </summary>
        /// <param name="Patient"></param>
        /// <param name="budgetInfo"></param>
        /// <returns></returns>
        public override bool Register(RegPatient Patient, ChargeInfo budgetInfo)
        {
            try
            {
                //更新病人门诊号
                BindEntity <Model.MZ_PatList> .CreateInstanceDAL(oleDb).Update(Tables.mz_patlist.PATLISTID + "=" + Patient.PatListID,
                                                                               Tables.mz_patlist.VISITNO + "='" + Patient.VisitNo + "'");

                OPDBillKind invoiceType = OPDBillKind.门诊挂号发票;
                if (Convert.ToInt32(OPDParamter.Parameters["012"]) == 1)
                {
                    invoiceType = OPDBillKind.门诊收费发票;
                }

                string perfChar  = "";
                string invoiceNo = InvoiceManager.GetBillNumber(invoiceType, OperatorId, false, out perfChar);

                Model.MZ_PresMaster mz_presmaster = BindEntity <Model.MZ_PresMaster> .CreateInstanceDAL(oleDb).GetModel(budgetInfo.PrescriptionID);

                mz_presmaster.Record_Flag = 0;        //改为正常状态
                mz_presmaster.Charge_Flag = 1;        //置为收费状态
                mz_presmaster.TicketNum   = invoiceNo;
                mz_presmaster.TicketCode  = perfChar; //前缀
                mz_presmaster.ChargeCode  = OperatorId.ToString( );
                BindEntity <Model.MZ_PresMaster> .CreateInstanceDAL(oleDb).Update(mz_presmaster);

                Model.MZ_CostMaster mz_costmaster = BindEntity <Model.MZ_CostMaster> .CreateInstanceDAL(oleDb).GetModel(budgetInfo.ChargeID);

                mz_costmaster.Record_Flag = 0;
                mz_costmaster.ChargeCode  = OperatorId.ToString( );
                mz_costmaster.ChargeName  = OperatorName;
                mz_costmaster.TicketNum   = invoiceNo;
                mz_costmaster.TicketCode  = perfChar;//发票前缀
                mz_costmaster.Favor_Fee   = budgetInfo.FavorFee;
                mz_costmaster.Money_Fee   = budgetInfo.CashFee;
                mz_costmaster.Pos_Fee     = budgetInfo.PosFee;
                mz_costmaster.Self_Fee    = budgetInfo.SelfFee;
                mz_costmaster.Village_Fee = budgetInfo.VillageFee;
                BindEntity <Model.MZ_CostMaster> .CreateInstanceDAL(oleDb).Update(mz_costmaster);

                return(true);
            }
            catch (OperatorException operr)
            {
                throw operr;
            }
            catch (Exception err)
            {
                throw err;
            }
        }
Beispiel #29
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetChargeDetailRecordRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetChargeDetailRecordRequest SetChargeDetailRecordRequest)
        {
            if ((Object)SetChargeDetailRecordRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetChargeDetailRecordRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetChargeDetailRecordRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetChargeDetailRecordRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetChargeDetailRecordRequest.PartnerId) &&
                   OperatorId.Equals(SetChargeDetailRecordRequest.OperatorId) &&
                   ChargeDetailRecord.Equals(SetChargeDetailRecordRequest.ChargeDetailRecord));
        }
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(EVSEStatusRecords.GetHashCode() * 17 ^
                       OperatorId.GetHashCode() * 11 ^

                       (OperatorName != null
                            ? OperatorName.GetHashCode() * 5
                            : 0) ^

                       Action.GetHashCode());
            }
        }