This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Do SYSPRO login | |
/// </summary> | |
/// <param name="userName"></param> | |
/// <param name="password"></param> | |
/// <param name="company"></param> | |
/// <param name="companyPassword"></param> | |
/// <returns>XmlDocument</returns> | |
public static void DoLogin( | |
string userName, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Org.BouncyCastle.Crypto.Parameters; | |
using Org.BouncyCastle.OpenSsl; | |
using Org.BouncyCastle.Security; | |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
namespace WindowsFormsApplication5 | |
{ | |
public static class PemReaderB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Get table columns from db schema | |
/// </summary> | |
public void GetColumns() | |
{ | |
// New table column class | |
_tableColumnsArrayList = new List<TableColumns>(); | |
// Get db name from settings file | |
var database = Properties.Settings.Default.Database; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE PROCEDURE | |
GetFlowDetails (@KeyId varchar(50)) | |
AS | |
BEGIN | |
Select A.Name, B.Value, MaxInst From | |
(SELECT Name, MAX(ActivityInstanceId) As MaxInst FROM [dbo].[TrackingDetailVariables] | |
WHERE WorkflowName = 'RequisitionBOPosting' AND KeyId LIKE @KeyId + '%' | |
Group By Name) A JOIN | |
(SELECT Name, Value, ActivityInstanceId FROM [dbo].[TrackingDetailVariables] | |
WHERE WorkflowName = 'RequisitionBOPosting' AND KeyId LIKE @KeyId + '%') B ON B.Name = A.Name AND B.ActivityInstanceId = MaxInst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Function dbGetRecordset(sSql) | |
'Function dbPost(sPost) | |
'Function dbCloseConnection() | |
'Used to enter db details. Returns Conn | |
Conn = "Provider=SQLNCLI10;Server=.;Uid=sa;Pwd=xxx;Connect Timeout=120;DATABASE=" | |
Public cn, rs | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'boPost(BusinessObject, XMLParam, XMLDoc, KeyNode) | |
'Function boGetValues(sXmlOut, sNode) | |
'Function boLogBusinessObject(sType, sKey, sXMLParam, sXMLDoc, sXMLOut) | |
'Syspro WCF Service REST Address | |
Dim Wcf | |
Wcf = "http://localhost:20000/SysproWCFservice/REST/" | |
Public sBoError | |
Public sBoXmlOut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Get primary key columns for selected table | |
/// </summary> | |
private void GetKeyColumns() | |
{ | |
// New key column class | |
_tableKeyColumnsArrayList = new List<TableKeyColumns>(); | |
// Get db name from settings file | |
var database = Properties.Settings.Default.Database; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Get database tables to populate grid | |
/// </summary> | |
private void GetTables() | |
{ | |
// Get all SQL tables for the db defined in the settings file | |
var sql = "SELECT TABLE_NAME As Tables FROM " + Properties.Settings.Default.Database + ".INFORMATION_SCHEMA.TABLES with (nolock) WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAME ASC"; | |
try | |
{ | |
var dtDatatable = QueryDatabase(ConnectionString, sql).Tables[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Do SYSPRO login | |
/// </summary> | |
/// <param name="businessObjectName"></param> | |
/// <param name="xmlParameters"></param> | |
/// <param name="xmlIn"></param> | |
/// <returns>XmlDocument</returns> | |
public static void DoTransaction(string businessObjectName,string xmlParameters, string xmlIn) | |
{ | |
//the binding to use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// QueryDatabase method that allows stored procedure calls | |
/// </summary> | |
/// <param name="connectionName"></param> | |
/// <param name="storedProcedure"></param> | |
/// <param name="parameters"></param> | |
/// <returns></returns> | |
public DataSet QueryDatabase(string connectionName, string storedProcedure, | |
Dictionary<string, string> parameters) | |
{ |
OlderNewer