IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Summary description for Service1 More...
Classes | |
class | InsertPaketData |
Class that is used to pass data to the InsertPaketXml() method that is launched in a parallel thread. Thread is launched just because for SQLXML the thread must be STA, and thread launched by WS is not of this kind. More... | |
Public Member Functions | |
Service () | |
Konstruktor. More... | |
bool | GetAppSettingFlag (string flagname) |
void | ReportError (Exception ex) |
string | PosljiPaket_Base (string paketXml) |
string | PosljiPaket (string paketXml) |
Metoda je namenjena pošiljanju Xml paketa podatkov za fakturiranje. Z argumentom paketTipId povemo ali gre za ovrednoten ali neovrednoten paket podatkov. Podatek o viru (virId) je del sheme po kateri mora biti zgrajen paketXml; velja namreč pravilo, da lahko v enem paketu pošljemo podatke iz več virov (npr. UPO1 in UPO2), ki pa morajo biti vsi ovrednoteni ali neovrednoteni. More... | |
string | PosljiPaketZip (byte[] paketZip) |
Metoda je namenjena pošiljanju Xml paketa podatkov za fakturiranjev komprimirani obliki. Z argumentom paketTipId povemo ali gre za ovrednoten ali neovrednoten paket podatkov. Podatek o viru (virId) je del sheme, po kateri mora biti zgrajen paketXml; velja namreč pravilo, da lahko v enem paketu pošljemo podatke iz več virov (npr. UPO1 in UPO2), ki pa morajo biti vsi ovrednoteni ali neovrednoteni. More... | |
int | StevilkaSeje () |
Vrne številko seje. Zaenkrat se metoda uporablja za testiranje, ali je WS sploh postavljen (vrniti mora št.>=0). More... | |
string | PaketStatus (decimal paketid) |
Metoda vrne Xml (kot string) s podatki o statusu paketa. More... | |
byte[] | PaketShema () |
Metoda vrne byte[] serializiranega file-a (type FileInfo) PaketShema.xsd. More... | |
byte[] | PaketStatusShema () |
Metoda vrne byte[] serializiranega file-a (type FileInfo) PaketStatusShema.xsd. More... | |
DataSet | PaketTipZalogaVrednosti () |
Metoda vrne zalogo vrednosti za tipe paketa. More... | |
DataSet | PaketStatusZalogaVrednosti () |
DataSet | PodrocjaZalogaVrednosti () |
Static Public Member Functions | |
static byte[] | CompressBytes (byte[] Original) |
static byte[] | UncompressBytes (byte[] zippedArray) |
static byte[] | UncompressBytes (byte[] zippedArray, int BufferSize) |
Properties | |
bool | DebugMode [get, set] |
bool | RemoteMode [get, set] |
Events | |
ExceptionEventDelegate | exEvent |
Private Member Functions | |
string | DecompressToString (byte[] paketZip, string ResultFilename) |
void | onExEvent (ExceptionEventArgs args) |
This triggers the exEvent. The point is that the eventhandler is called in the basic web service thread (in the thread where the event is initialized!). IMPORTANT: The event handler THROWS AN EXCEPTION (which happens in the basic thread, therefore execution of that thread is broken). If onExEvent() method is called in a parallel thread that was launched form the basic one then the event handler will be executed at approximately the same time as Join() is called for the parallel thread. More... | |
void | Service_exEvent (object sender, ExceptionEventArgs e) |
void | ReadSettings () |
void | Connect () |
void | Disconnect () |
int | CountStzapisov_EfaGlava (int PaketId) |
Returns number of entries in EfaGlava with a specified PaketId. More... | |
int | CountStzapisov_EfaGlava (int PaketId, System.Data.SqlClient.SqlTransaction transaction) |
Returns number of entries in EfaGlava with a specified PaketId. More... | |
void | SetPaketStatusZavrnjen (int PaketId) |
Sets status More... | |
void | SetPaketStatus (int PaketId, int StatusId) |
Sets status of packet with a given PaketId to StatusId. More... | |
int | InsertIntoEfaPaket (int podrocjeId, byte paketTipId, DateTime paketDatum, int stZapisov, decimal vsotaDokumentDatum, decimal vsotaCenaNeto, int paketStatusId) |
void | UpdateGlavaPostavke (decimal paketId) |
void | SaveXmlToDisk (string paketXml, decimal paketId, string FileName) |
void | InsertPaketXml (object arg) |
string | GetPaketStatusXml (decimal paketId, string ErrorFileName) |
string | GetPaketStatusXml (decimal paketId, string ErrorFileName, string ErrorString) |
Returns an XML document containing status of the given Packet. ErrorFileName should only be specified when the packet is inserted. More... | |
void | SetPaketStatus (decimal paketId, int paketStatusId) |
Updates the field PaketStatusId for a given entry of the EfaPaket table, with the specified value. More... | |
void | InsertIntoEfaPaketPovratnica (decimal paketId, string paketStatusXml, string exMessage, string exStackTrace) |
Insert a new entry for the given packet into the table EfaPaketPovratnica. More... | |
void | InsertIntoEfaPaketPovratnica (decimal paketId, string paketStatusXml) |
string | GetXmlFileName (decimal paketId) |
string | GetXmlErrorFileName (decimal paketId) |
string | GetPaketSchemaPathName () |
string | GetPaketStatusSchemaPathName () |
string | GetPathName () |
string | GetSQLServerTempFilePath () |
string | GetCnnString () |
string | GetCnnStringBulk () |
void | InitializeComponent () |
Static Private Member Functions | |
static void | IsertErrorInfoStatusXml (XmlDocument status, string filename) |
Adds to the XML document a node with a list of errors, which is extracted from a file created by the SqlXml tool (if the file exists). More... | |
static string | IsertErrorMessageStatusXml (string status, string errorstring) |
Adds to the XML document a node with the error message. This is intended for errors that occur during insertion of XML document into the database. XML document is specified as a string argument, and a string containing an updated document is returned./// More... | |
static void | IsertErrorMessageStatusXml (XmlDocument status, string errorstring) |
Adds to the XML document a node with the error message. This is intended for errors that occur during insertion of XML document into the database. More... | |
Private Attributes | |
bool | flag_debug =false |
bool | queried_debug = false |
bool | flag_remote = false |
bool | queried_remote = false |
string | cnnString |
string | cnnStringBulk |
string | _paketSchemaPathName |
string | _paketStatusSchemaPathName |
string | _pathName |
string | _SQLServerTempFilePath |
System.Data.SqlClient.SqlConnection | cnn = new System.Data.SqlClient.SqlConnection() |
System.Data.SqlClient.SqlTransaction | trans = null |
int | paketId = -1 |
string | result = "<Napaka/>" |
string | ErrorFileName = null |
Static Private Attributes | |
static int | _stevilkaSeje =0 |
static string | selectPaketStatusZalogaVrednosti = "SELECT * FROM EfaPaketStatus" |
static string | selectPaketTipZalogaVrednosti = "SELECT * FROM EfaPaketTip" |
static string | selectPodrocjaZalogaVrednosti = "SELECT * FROM EfaPodrocjaView" |
static readonly object | syncObject = new object() |
Summary description for Service1
|
inline |
Konstruktor.
References EFA_WS.ExceptionEventDelegate(), EFA_WS.Service.exEvent, EFA_WS.Service.ReadSettings(), and EFA_WS.Service.Service_exEvent().
|
inline |
|
inline |
References EFA_WS.Service.DebugMode.
Referenced by EFA_WS.Service.DecompressToString(), EFA_WS.Service.GetPaketStatusXml(), EFA_WS.Service.InsertIntoEfaPaket(), EFA_WS.Service.InsertIntoEfaPaketPovratnica(), EFA_WS.Service.InsertPaketXml(), EFA_WS.Service.PaketShema(), EFA_WS.Service.PaketStatusShema(), EFA_WS.Service.PaketStatusZalogaVrednosti(), EFA_WS.Service.PaketTipZalogaVrednosti(), EFA_WS.Service.PodrocjaZalogaVrednosti(), EFA_WS.Service.PosljiPaket_Base(), EFA_WS.Service.PosljiPaketZip(), EFA_WS.Service.SaveXmlToDisk(), EFA_WS.Service.Service_exEvent(), EFA_WS.Service.SetPaketStatus(), and EFA_WS.Service.UpdateGlavaPostavke().
|
inline |
References EFA_WS.Service.cnn, EFA_WS.Service.Connect(), EFA_WS.Service.Disconnect(), EFA_WS.Service.GetPaketStatusXml(), EFA_WS.Service.GetXmlFileName(), EFA_WS.Service.InsertIntoEfaPaket(), EFA_WS.Service.InsertIntoEfaPaketPovratnica(), EFA_WS.Service.InsertPaketXml(), EFA_WS.Service.IsertErrorMessageStatusXml(), EFA_WS.Service.InsertPaketData.PaketFileName, EFA_WS.Service.InsertPaketData.PaketId, EFA_WS.Service.paketId, EFA_WS.Service.ReportError(), EFA_WS.Service.result, EFA_WS.Service.SaveXmlToDisk(), EFA_WS.Service.SetPaketStatusZavrnjen(), EFA_WS.Service.syncObject, EFA_WS.Service.trans, and EFA_WS.Service.UpdateGlavaPostavke().
Referenced by EFA_WS.Service.PosljiPaket(), and EFA_WS.Service.PosljiPaketZip().
|
inline |
Metoda je namenjena pošiljanju Xml paketa podatkov za fakturiranje. Z argumentom paketTipId povemo ali gre za ovrednoten ali neovrednoten paket podatkov. Podatek o viru (virId) je del sheme po kateri mora biti zgrajen paketXml; velja namreč pravilo, da lahko v enem paketu pošljemo podatke iz več virov (npr. UPO1 in UPO2), ki pa morajo biti vsi ovrednoteni ali neovrednoteni.
paketXml |
References EFA_WS.Service.PosljiPaket_Base().
|
inlinestatic |
|
inlinestatic |
Referenced by EFA_WS.Service.DecompressToString(), and EFA_WS.Service.PosljiPaketZip().
|
inlinestatic |
|
inlineprivate |
References EFA_WS.Service.ReportError(), and EFA_WS.Service.UncompressBytes().
Referenced by EFA_WS.Service.PosljiPaketZip().
|
inline |
Metoda je namenjena pošiljanju Xml paketa podatkov za fakturiranjev komprimirani obliki. Z argumentom paketTipId povemo ali gre za ovrednoten ali neovrednoten paket podatkov. Podatek o viru (virId) je del sheme, po kateri mora biti zgrajen paketXml; velja namreč pravilo, da lahko v enem paketu pošljemo podatke iz več virov (npr. UPO1 in UPO2), ki pa morajo biti vsi ovrednoteni ali neovrednoteni.
paketXml |
References EFA_WS.Service.DebugMode, EFA_WS.Service.DecompressToString(), EFA_WS.Service.PosljiPaket_Base(), EFA_WS.Service.ReportError(), and EFA_WS.Service.UncompressBytes().
|
inline |
Vrne številko seje. Zaenkrat se metoda uporablja za testiranje, ali je WS sploh postavljen (vrniti mora št.>=0).
References EFA_WS.Service._stevilkaSeje.
|
inline |
Metoda vrne Xml (kot string) s podatki o statusu paketa.
paketId | Id paketa, ki smo ga dobili ob pošiljanju paketa. |
References EFA_WS.Service.GetPaketStatusXml(), and EFA_WS.Service.result.
|
inline |
Metoda vrne byte[] serializiranega file-a (type FileInfo) PaketShema.xsd.
References EFA_WS.Service._paketSchemaPathName, and EFA_WS.Service.ReportError().
|
inline |
Metoda vrne byte[] serializiranega file-a (type FileInfo) PaketStatusShema.xsd.
References EFA_WS.Service._paketStatusSchemaPathName, and EFA_WS.Service.ReportError().
|
inline |
Metoda vrne zalogo vrednosti za tipe paketa.
References EFA_WS.Service.cnnString, EFA_WS.Service.ReportError(), EFA_WS.Service.result, and EFA_WS.Service.selectPaketTipZalogaVrednosti.
|
inline |
References EFA_WS.Service.cnnString, EFA_WS.Service.ReportError(), EFA_WS.Service.result, and EFA_WS.Service.selectPaketStatusZalogaVrednosti.
|
inline |
References EFA_WS.Service.cnnString, EFA_WS.Service.ReportError(), EFA_WS.Service.result, and EFA_WS.Service.selectPodrocjaZalogaVrednosti.
|
inlineprivate |
This triggers the exEvent. The point is that the eventhandler is called in the basic web service thread (in the thread where the event is initialized!). IMPORTANT: The event handler THROWS AN EXCEPTION (which happens in the basic thread, therefore execution of that thread is broken). If onExEvent() method is called in a parallel thread that was launched form the basic one then the event handler will be executed at approximately the same time as Join() is called for the parallel thread.
args |
References EFA_WS.Service.exEvent.
Referenced by EFA_WS.Service.GetPaketStatusXml(), EFA_WS.Service.InsertIntoEfaPaketPovratnica(), EFA_WS.Service.InsertPaketXml(), EFA_WS.Service.SaveXmlToDisk(), EFA_WS.Service.SetPaketStatus(), and EFA_WS.Service.UpdateGlavaPostavke().
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
References EFA_WS.Service.cnn, and EFA_WS.Service.cnnString.
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
inlineprivate |
References EFA_WS.Service.cnn.
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
inlineprivate |
Returns number of entries in EfaGlava with a specified PaketId.
PaketId | PaketId whose corresponding entries in EfaGlava are counted. |
|
inlineprivate |
Returns number of entries in EfaGlava with a specified PaketId.
PaketId | PaketId whose corresponding entries in EfaGlava are counted. |
References EFA_WS.Service.cnn.
|
inlineprivate |
Sets status
PaketId |
References EFA_WS.Service.SetPaketStatus().
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
inlineprivate |
Sets status of packet with a given PaketId to StatusId.
PaketId | Id of entry in EfaPaket. |
StatusId | Value to which PaketStatusId is set. |
References EFA_WS.Service.cnn.
Referenced by EFA_WS.Service.Service_exEvent(), and EFA_WS.Service.SetPaketStatusZavrnjen().
|
inlineprivate |
References EFA_WS.Service.cnn, EFA_WS.Service.ReportError(), and EFA_WS.Service.trans.
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
inlineprivate |
|
inlineprivate |
References EFA_WS.ExceptionEventArgs.Ex, EFA_WS.Service.onExEvent(), and EFA_WS.Service.ReportError().
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
inlineprivate |
References EFA_WS.Service._pathName, EFA_WS.Service._SQLServerTempFilePath, EFA_WS.Service.cnnStringBulk, EFA_WS.ExceptionEventArgs.Ex, EFA_WS.Service.GetXmlErrorFileName(), EFA_WS.Service.onExEvent(), EFA_WS.Service.InsertPaketData.PaketFileName, EFA_WS.Service.InsertPaketData.PaketId, EFA_WS.Service.RemoteMode, and EFA_WS.Service.ReportError().
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
inlinestaticprivate |
Adds to the XML document a node with a list of errors, which is extracted from a file created by the SqlXml tool (if the file exists).
status | XML document that is updated with error information. |
filename | Name of the file that contains information on errors. |
Referenced by EFA_WS.Service.GetPaketStatusXml().
|
inlinestaticprivate |
Adds to the XML document a node with the error message. This is intended for errors that occur during insertion of XML document into the database. XML document is specified as a string argument, and a string containing an updated document is returned.///
status | String containing the original XML document representing the packet status. |
errorstring | Error message to be inserted in the XML document. |
Referenced by EFA_WS.Service.GetPaketStatusXml(), and EFA_WS.Service.PosljiPaket_Base().
|
inlinestaticprivate |
Adds to the XML document a node with the error message. This is intended for errors that occur during insertion of XML document into the database.
status | XML document that is updated with error information. |
errorstring | String containing error messages. |
|
inlineprivate |
|
inlineprivate |
Returns an XML document containing status of the given Packet. ErrorFileName should only be specified when the packet is inserted.
paketId | Id of the packet whose information is returned as XML string. |
ErrorFileName | Eventual error file that was created by SqlXML, or null if no error file is provided. This parameter can only be passed immediately after inserting the packet into the database, when the error file still exists. If ErrorFile is specified then the method inserts information form the file to the returned XML string. |
References EFA_WS.Service._paketStatusSchemaPathName, EFA_WS.ExceptionEventArgs.Ex, EFA_WS.Service.IsertErrorInfoStatusXml(), EFA_WS.Service.IsertErrorMessageStatusXml(), EFA_WS.Service.onExEvent(), and EFA_WS.Service.ReportError().
|
inlineprivate |
Updates the field PaketStatusId for a given entry of the EfaPaket table, with the specified value.
paketId | ID of the packet for which the entry must be updatet. |
paketStatusId | The value of the PaketStatusId field that should be set for the given entry. |
References EFA_WS.Service.cnn, EFA_WS.ExceptionEventArgs.Ex, EFA_WS.Service.onExEvent(), EFA_WS.Service.paketId, and EFA_WS.Service.ReportError().
|
inlineprivate |
Insert a new entry for the given packet into the table EfaPaketPovratnica.
paketId | ID of the packet for which data is inserted. |
paketStatusXml | XML document describing the status of the packet that was sent to the web service. |
exMessage | Eventual exception's message. |
exStackTrace | Eventual exception's stack trace. |
References EFA_WS.Service.cnn, EFA_WS.ExceptionEventArgs.Ex, EFA_WS.Service.onExEvent(), EFA_WS.Service.paketId, and EFA_WS.Service.ReportError().
Referenced by EFA_WS.Service.InsertIntoEfaPaketPovratnica(), EFA_WS.Service.PosljiPaket_Base(), and EFA_WS.Service.Service_exEvent().
|
inlineprivate |
References EFA_WS.Service.InsertIntoEfaPaketPovratnica().
|
inlineprivate |
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
inlineprivate |
Referenced by EFA_WS.Service.InsertPaketXml().
|
inlineprivate |
Referenced by EFA_WS.Service.ReadSettings().
|
inlineprivate |
Referenced by EFA_WS.Service.ReadSettings().
|
inlineprivate |
Referenced by EFA_WS.Service.ReadSettings().
|
inlineprivate |
Referenced by EFA_WS.Service.ReadSettings().
|
inlineprivate |
References EFA_WS.Service.cnnString.
Referenced by EFA_WS.Service.ReadSettings().
|
inlineprivate |
References EFA_WS.Service.cnnString.
Referenced by EFA_WS.Service.ReadSettings().
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
Referenced by EFA_WS.Service.StevilkaSeje().
|
private |
|
private |
Referenced by EFA_WS.Service.InsertPaketXml().
|
private |
Referenced by EFA_WS.Service.PaketShema().
|
private |
Referenced by EFA_WS.Service.GetPaketStatusXml(), and EFA_WS.Service.PaketStatusShema().
|
private |
Referenced by EFA_WS.Service.InsertPaketXml().
|
private |
Referenced by EFA_WS.Service.InsertPaketXml().
|
staticprivate |
Referenced by EFA_WS.Service.PaketStatusZalogaVrednosti().
|
staticprivate |
Referenced by EFA_WS.Service.PaketTipZalogaVrednosti().
|
staticprivate |
Referenced by EFA_WS.Service.PodrocjaZalogaVrednosti().
|
staticprivate |
Referenced by EFA_WS.Service.PosljiPaket_Base().
|
private |
Referenced by EFA_WS.Service.Connect(), EFA_WS.Service.CountStzapisov_EfaGlava(), EFA_WS.Service.Disconnect(), EFA_WS.Service.InsertIntoEfaPaket(), EFA_WS.Service.InsertIntoEfaPaketPovratnica(), EFA_WS.Service.PosljiPaket_Base(), EFA_WS.Service.SetPaketStatus(), and EFA_WS.Service.UpdateGlavaPostavke().
|
private |
|
private |
|
private |
|
private |
|
getset |
Referenced by EFA_WS.Service.PosljiPaketZip(), and EFA_WS.Service.ReportError().
|
getset |
Referenced by EFA_WS.Service.InsertPaketXml().
|
private |
Referenced by EFA_WS.Service.onExEvent(), and EFA_WS.Service.Service().