123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- using System;
- namespace Wayne.FDCPOSLibrary
- {
- public abstract class BasePOSRequest
- {
- }
- [System.SerializableAttribute()]
- public partial class ServiceRequest: BasePOSRequest
- {
- [System.Xml.Serialization.XmlIgnore()]
- private object userToken;
- public static int requestIDConter = 0;
- public static object requestIDConterLock = new object();
- private string requestTypeField;
- private string applicationSenderField = "";
- private string workstationIDField = "";
- private string requestIDField;
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string RequestType
- {
- get
- {
- return this.requestTypeField;
- }
- set
- {
- this.requestTypeField = value;
- }
- }
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string ApplicationSender
- {
- get
- {
- return this.applicationSenderField;
- }
- set
- {
- this.applicationSenderField = value;
- }
- }
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string WorkstationID
- {
- get
- {
- return this.workstationIDField;
- }
- set
- {
- this.workstationIDField = value;
- }
- }
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string RequestID
- {
- get
- {
- return this.requestIDField;
- }
- set
- {
- this.requestIDField = value;
- }
- }
- [System.Xml.Serialization.XmlIgnore()]
- public int RequestIDNumber
- {
- get
- {
- try
- {
- return Convert.ToInt32(this.requestIDField);
- }
- catch(Exception)
- {
- return 0;
- }
- }
- }
- public ServiceRequest()
- {
- lock (requestIDConterLock)
- {
- if (requestIDConter < System.Math.Pow(2, 32) - 1)
- requestIDConter++;
- else
- requestIDConter = 1;
- RequestID = requestIDConter.ToString();
- }
- }
- }
- }
|