1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- using System;
- using System.Xml.Serialization;
- namespace Wayne.FDCPOSLibrary
- {
- [System.SerializableAttribute()]
- public partial class ServiceRequest
- {
- [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();
- }
- }
- }
- }
|