Commit ed334b7b authored by Hanen Deghais's avatar Hanen Deghais

ajout solution to git

parents
Pipeline #39790 failed with stages
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="OraConnection" connectionString="user id=nova;Password=oRP0zI6K4GU=;server=10.12.12.21;direct=True;sid=smart02;port=1521;persist security info=True;Pooling=True;Unicode=True" providerName="Devart.Data.OracleClient"/>
</connectionStrings>
<appSettings>
<add key="PAS" value="10"/>
<add key="Destination" value="C:\Users\hanen\Documents\test\"/>
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="OraConnection" connectionString="user id=nova;Password=oRP0zI6K4GU=;server=10.12.12.21;direct=True;sid=smart06;port=1521;persist security info=True;Pooling=True;Unicode=True" providerName="Devart.Data.OracleClient" />
</connectionStrings>
<appSettings>
<add key="CLES" value="PWhT331waIEz2xjhffpR9T4rYyAa:s9uh56y0NSnG5wg_23sqMHSTWfEa" />
<add key="PAS" value="10"/>
<add key="STA_PRJ" value="PROJECT"/>
</appSettings>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7F69CD6F-7C75-4EBB-B0B5-D41FEFE32E52}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CallApiPalexpo</RootNamespace>
<AssemblyName>CallApiPalexpo</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Devart.Data, Version=5.0.170.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Devart.Data.Linq, Version=2.0.9.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL" />
<Reference Include="Devart.Data.Oracle, Version=6.0.70.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Devart.Data.Oracle.Linq, Version=2.0.9.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Downloads\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Net">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web.Extensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ContextDataBase.cs" />
<Compile Include="CryptorEngine.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
using System.Configuration;
using System.IO;
public class CryptorEngine
{
public static string CryptConnexionString(string connection)
{
int iPos = connection.ToUpper().IndexOf("PASSWORD=");
int iFin = connection.IndexOf(";", iPos);
string sPwd = connection.Substring(iPos + 9, iFin - iPos - 9);
string sPwd2 = CryptorEngine.Decrypt(sPwd, true);
connection = connection.Replace("Password=" + sPwd, "Password=" + sPwd2);
return connection;
}
public static string Encrypt(string toEncrypt, bool useHashing)
{
byte[] keyArray;
byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);
System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
// Get the key from config file
//string key = (string)settingsReader.GetValue("SecurityKey", typeof(String));
string key = "Sdf253654FDFD";
//System.Windows.Forms.MessageBox.Show(key);
if (useHashing)
{
MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key));
hashmd5.Clear();
}
else
keyArray = UTF8Encoding.UTF8.GetBytes(key);
TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = keyArray;
tdes.Mode = CipherMode.ECB;
tdes.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tdes.CreateEncryptor();
byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
tdes.Clear();
return Convert.ToBase64String(resultArray, 0, resultArray.Length);
}
/// <summary>
/// DeCrypt a string using dual encryption method. Return a DeCrypted clear string
/// </summary>
/// <param name="cipherString">encrypted string</param>
/// <param name="useHashing">Did you use hashing to encrypt this data? pass true is yes</param>
/// <returns></returns>
public static string Decrypt(string cipherString, bool useHashing)
{
byte[] keyArray;
byte[] toEncryptArray = Convert.FromBase64String(cipherString);
System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
//Get your key from config file to open the lock!
string key = "Sdf253654FDFD";// (string)settingsReader.GetValue("SecurityKey", typeof(String));
if (useHashing)
{
MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key));
hashmd5.Clear();
}
else
keyArray = UTF8Encoding.UTF8.GetBytes(key);
TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = keyArray;
tdes.Mode = CipherMode.ECB;
tdes.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tdes.CreateDecryptor();
byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
tdes.Clear();
return UTF8Encoding.UTF8.GetString(resultArray);
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Web.Script.Serialization;
using Newtonsoft.Json;
using System.Configuration;
namespace CallApiPalexpo
{
class Program
{
static void Main(string[] args)
{
ContextDataBase dcPrj = new ContextDataBase(CryptorEngine.CryptConnexionString(ConfigurationManager.ConnectionStrings["OraConnection"].ConnectionString));
string sDate = dcPrj.ZINS.Where(cc => cc.ZINS_COD == "PALEXPO_WS").First().ZINS_PAR;
WebRequest request2 =
WebRequest.Create(@"https://api.palexpo.ch:8443/token");
string encodedUserCredentials =
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(ConfigurationManager.AppSettings["CLES"]));
request2.ContentType = @"application/json; charset=utf-8";
request2.Method = "POST";
request2.ContentType = "application/x-www-form-urlencoded";
var userData = "grant_type=password&username=novative&password=Novative123";
request2.Headers.Add("Authorization", "Basic " + encodedUserCredentials);
// request2.Headers.Add("Authorization", "Basic " + encodedUserCredentials);
StreamWriter requestWriter = new StreamWriter(request2.GetRequestStream());
requestWriter.Write(userData);
requestWriter.Close();
string sKey = "";
// var response = request2.GetResponse() as HttpWebResponse;
HttpWebResponse response2 = (HttpWebResponse)request2.GetResponse();
string jsonResponse2 = string.Empty;
using (StreamReader sr = new StreamReader(response2.GetResponseStream()))
{
jsonResponse2 = sr.ReadToEnd();
var jss = new JavaScriptSerializer();
Dictionary<string, string> sData = jss.Deserialize<Dictionary<string, string>>(jsonResponse2);
sKey=sData["access_token"].ToString();
// Console.WriteLine(jsonResponse2);
// Console.ReadLine();
}
WebRequest request = WebRequest.Create(@"https://api.palexpo.ch:8443/services/project/1.0.0/search?after_updatedate="+sDate);
// WebRequest request = WebRequest.Create(@"https://api.palexpo.ch/store/api/services/project/1.0.0/search?after_updatedate=01.01.2017");
request.Method = "GET";
// request.Headers.Add("api_key", "e9cf5706-2885-3a0e-aac1-6e37be774ad7");
// request.Headers["Authorization"] = "Basic" + Convert.ToBase64String(Encoding.Default.GetBytes("novative:Novative123"));
// client.DefaultRequestHeaders.Add("Authorization", "Bearer " + accessToken);
request.Headers["Authorization"] = "Bearer "+sKey;
request.ContentLength = 0;
request.ContentType = @"application/json; charset=utf-8";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
string jsonResponse = string.Empty;
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
jsonResponse = sr.ReadToEnd();
var jss = new JavaScriptSerializer();
// Dictionary<string, string> sData = jss.Deserialize<<string, string>>(jsonResponse);
// var jss2 = new JavaScriptSerializer();
// string sLstProduct = jsonResponse.Substring(0, jsonResponse.Length - 3).Replace("{\"ProjectList\":{", "");
Dictionary<string, object> sData2 = jss.Deserialize<Dictionary<string, object>>(jsonResponse);
var arrayprj = sData2["ProjectList"] as Dictionary<string, object>;
var lstprj= arrayprj["Project"] as System.Collections.ArrayList;
int iPas = int.Parse(ConfigurationManager.AppSettings["PAS"]);
string sSstaTst=ConfigurationManager.AppSettings["STA_PRJ"];
try
{
for (int idx = 0; idx < lstprj.Count; idx++)
{
var project = lstprj[idx] as Dictionary<string, object>;
string sCode = project["EventId"].ToString();
string sSstaLib = project["EventDescription"].ToString();
string sSStaVis = project["TimesheetFlag"].ToString();
int isStaVis = (sSStaVis == "Y") ? 0 : 1;
if (!string.IsNullOrEmpty(sSstaLib))
{
if (dcPrj.SSTAs.Where(cc => cc.SSTA_PAS == iPas && cc.SSTA_TST == sSstaTst
&& cc.SSTA_NUM == sCode).ToList().Count == 0)
{
dcPrj.SSTAs.InsertOnSubmit(new SSTA()
{
SSTA_NUM = sCode,
SSTA_TST = sSstaTst,
SSTA_LIB = sSstaLib,
SSTA_PAS = iPas,
SSTA_VIS = isStaVis
});
}
else
{
dcPrj.SSTAs.Where(cc => cc.SSTA_PAS == iPas && cc.SSTA_TST == sSstaTst
&& cc.SSTA_NUM == sCode).First().SSTA_VIS = isStaVis;
}
}
}
dcPrj.SubmitChanges();
dcPrj.ZINS.Where(cc => cc.ZINS_COD == "PALEXPO_WS").First().ZINS_PAR = string.Format("{0:yyyy-MM-dd}", DateTime.Now.Date.AddDays(-1));
dcPrj.SubmitChanges();
}
catch (Exception ex)
{
ContextDataBase dcPrj2 = new ContextDataBase(CryptorEngine.CryptConnexionString(ConfigurationManager.ConnectionStrings["OraConnection"].ConnectionString));
DateTime dtNow = DateTime.Now;
int iDat = int.Parse(String.Format("{0:yyyyMMdd}", dtNow));
int iHre = int.Parse(String.Format("{0:HHmmss}", dtNow));
try
{
dcPrj2.Zerrs.InsertOnSubmit(new Zerr()
{
ZerrPrg = "PALEXPO_WS",
ZerrMsg = (ex.Message.Length < 254) ? ex.Message : ex.Message.Substring(0, 254),
ZerrKey = (ex.InnerException.Message.Length < 254) ? ex.InnerException.Message : ex.InnerException.Message.Substring(0, 254),
ZerrDat = iDat,
ZerrHre = iHre,
ZerrIdu = "NOVAP",
ZerrPas = 0,
ZerrMat = 0,
ZerrNum = "",
});
dcPrj2.SubmitChanges();
//return "succées";
}
catch (Exception ex2)
{
string sMsg = ex2.Message;
// return sMsg;
}
}
// var jarray = JsonConvert.DeserializeObject<Product>(sLstProduct);
//Console.WriteLine(jsonResponse);
//Console.ReadLine();
}
}
}
public class Project
{
public string EventId;
public string StartDate;
public int OrganisationCode;
public string EventDescription;
public string TimesheetFlag;
public string UpdateStamp;
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CallApiPalexpo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CallApiPalexpo")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("45b5aabc-3d73-47a3-b3d1-d4570cc1e514")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7F69CD6F-7C75-4EBB-B0B5-D41FEFE32E52}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CallExportComptable</RootNamespace>
<AssemblyName>CallExportComptable</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Devart.Data, Version=5.0.170.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Devart.Data.Linq, Version=2.0.9.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL" />
<Reference Include="Devart.Data.Oracle, Version=6.0.70.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Devart.Data.Oracle.Linq, Version=2.0.9.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Downloads\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ContextDataBase.cs" />
<Compile Include="CryptorEngine.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CallExportComptable", "CallExportComptable.csproj", "{7F69CD6F-7C75-4EBB-B0B5-D41FEFE32E52}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7F69CD6F-7C75-4EBB-B0B5-D41FEFE32E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F69CD6F-7C75-4EBB-B0B5-D41FEFE32E52}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F69CD6F-7C75-4EBB-B0B5-D41FEFE32E52}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F69CD6F-7C75-4EBB-B0B5-D41FEFE32E52}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
using System.Configuration;
using System.IO;
public class CryptorEngine
{
public static string CryptConnexionString(string connection)
{
int iPos = connection.ToUpper().IndexOf("PASSWORD=");
int iFin = connection.IndexOf(";", iPos);
string sPwd = connection.Substring(iPos + 9, iFin - iPos - 9);
string sPwd2 = CryptorEngine.Decrypt(sPwd, true);
connection = connection.Replace("Password=" + sPwd, "Password=" + sPwd2);
return connection;
}
public static string Encrypt(string toEncrypt, bool useHashing)
{
byte[] keyArray;
byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);
System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
// Get the key from config file
//string key = (string)settingsReader.GetValue("SecurityKey", typeof(String));
string key = "Sdf253654FDFD";
//System.Windows.Forms.MessageBox.Show(key);
if (useHashing)
{
MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key));
hashmd5.Clear();
}
else
keyArray = UTF8Encoding.UTF8.GetBytes(key);
TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = keyArray;
tdes.Mode = CipherMode.ECB;
tdes.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tdes.CreateEncryptor();
byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
tdes.Clear();
return Convert.ToBase64String(resultArray, 0, resultArray.Length);
}
/// <summary>
/// DeCrypt a string using dual encryption method. Return a DeCrypted clear string
/// </summary>
/// <param name="cipherString">encrypted string</param>
/// <param name="useHashing">Did you use hashing to encrypt this data? pass true is yes</param>
/// <returns></returns>
public static string Decrypt(string cipherString, bool useHashing)
{
byte[] keyArray;
byte[] toEncryptArray = Convert.FromBase64String(cipherString);
System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
//Get your key from config file to open the lock!
string key = "Sdf253654FDFD";// (string)settingsReader.GetValue("SecurityKey", typeof(String));
if (useHashing)
{
MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key));
hashmd5.Clear();
}
else
keyArray = UTF8Encoding.UTF8.GetBytes(key);
TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = keyArray;
tdes.Mode = CipherMode.ECB;
tdes.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tdes.CreateDecryptor();
byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
tdes.Clear();
return UTF8Encoding.UTF8.GetString(resultArray);
}
}
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="OraConnection" connectionString="user id=nova;Password=oRP0zI6K4GU=;server=10.12.12.21;direct=True;sid=smart02;port=1521;persist security info=True;Pooling=True;Unicode=True" providerName="Devart.Data.OracleClient"/>
</connectionStrings>
<appSettings>
<add key="PAS" value="10"/>
<add key="Destination" value="C:\Users\hanen\Documents\test\"/>
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
create or replace PROCEDURE pr_create_export_ic (
idu_p VARCHAR2,
prg_p VARCHAR2,
dat_p NUMBER,
hre_p NUMBER,
pas_p NUMBER
) is
begin
declare
cursor c_lstp(cod_p varchar2) is
select * from slstp
where lstp_dat= dat_p
and lstp_hre=hre_p
and lstp_prg= prg_p
and lstp_idu= idu_p
and lstp_typ=cod_p
;
r_lstp c_lstp%rowtype;
cursor c_zjc2 is
SELECT ssta_lib,srul_lib,"ZJCP"."ZJCP_TST", "ZJCP"."ZJCP_STA", "ZJCP"."ZJCP_LET", "ZJCP"."ZJCP_NUM", "ZJCP"."ZJCP_CRE", "ZJCP"."ZJCP_DEB", sum("ZJCP"."ZJCP_RES") as MNT,
"ZJCP"."ZJCP_MON", "ZJCP"."ZJCP_MONLIB"
FROM "NOVA"."ZJCP" "ZJCP",srul,ssta
where srul_let(+)="ZJCP"."ZJCP_LET" and srul_num(+)="ZJCP"."ZJCP_NUM" and srul_pas(+)=pas_p and srul_lan(+)='F' and ssta_pas(+)= pas_p and ssta_tst(+)= "ZJCP"."ZJCP_TST" and ssta_num(+)= "ZJCP"."ZJCP_STA"
group by ssta_lib,srul_lib, zjcp_tst,zjcp_sta,zjcp_let,zjcp_num,zjcp_cre,zjcp_deb, "ZJCP"."ZJCP_MON", "ZJCP"."ZJCP_MONLIB"
ORDER BY "ZJCP"."ZJCP_MON", "ZJCP"."ZJCP_STA", "ZJCP"."ZJCP_LET", "ZJCP"."ZJCP_NUM", "ZJCP"."ZJCP_DEB", "ZJCP"."ZJCP_CRE"
;
r_zjc2 c_zjc2%rowtype;
p_sficher varchar2(255);
v_DATA1 varchar2(4000);
ligne number;
v_periode varchar2(2);
v_annee varchar2(4);
v_date date;
begin
-------
open c_lstp('PER_DE');
fetch c_lstp into r_lstp;
close c_lstp;
v_periode:=r_lstp.lstp_par;
open c_lstp('ANN_DE');
fetch c_lstp into r_lstp;
close c_lstp;
v_annee:=r_lstp.lstp_par;
v_date:= ADD_MONTHS(to_date(v_annee||lpad(v_periode,'2','0')||'01','yyyyMMdd'),1)-1;
-------entete
ligne:=1;
p_sficher:= 'Export_interface_comptable'||'_'|| dat_p ||'_'||hre_p ||'.xls'; -- Nom rapport
v_DATA1:='Rubrique'||';'|| 'Description'||';'|| 'Centre de charge'||';'||'Descritpion Centre de charge'||';'||'Compte Debit'||';'||'Compte Credit'||';'||'Montant'||';'||'Periode';
INSERT INTO sw_exp_lst (IDU,PRG,DAT,HRE,FICHIER,PAS,MAT,LIG,DATA)
VALUES(idu_p,prg_p,dat_p,hre_p,p_sficher,pas_p,0,ligne,v_DATA1);
ligne:=ligne+1;
------lignes
open c_zjc2;
loop
fetch c_zjc2 into r_zjc2;
exit when c_zjc2%notfound;
v_DATA1:=r_zjc2.zjcp_let||r_zjc2.zjcp_num||';'|| r_zjc2.srul_lib||';'|| r_zjc2.zjcp_sta||';'||r_zjc2.ssta_lib||';'||r_zjc2.zjcp_deb||';'||r_zjc2.zjcp_cre||';'||r_zjc2.MNT||';'||to_char(v_date,'dd.MM.yyyy');
INSERT INTO sw_exp_lst (IDU,PRG,DAT,HRE,FICHIER,PAS,MAT,LIG,DATA)
VALUES(idu_p,prg_p,dat_p,hre_p,p_sficher,pas_p,0,ligne,v_DATA1);
ligne:=ligne+1;
end loop;
close c_zjc2;
commit;
exception when others then
null;
end;
end ;
-- Start of DDL Script for Procedure NOVA.PR_CREATE_EXPORT_IC_ALL
-- Generated 16-mars-2022 8:15:03 from NOVA@smart02
CREATE OR REPLACE
PROCEDURE pr_create_export_ic_all (
idu_p VARCHAR2,
prg_p VARCHAR2,
dat_p NUMBER,
hre_p NUMBER,
pas_p NUMBER
) is
begin
declare
v_per number;
v_ann number;
inbr number;
begin
v_per :=to_char(ADD_MONTHS(sysdate,-1),'MM');
v_ann :=to_char(ADD_MONTHS(sysdate,-1),'yyyy');
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'PAS',pas_p,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'PER_DE',v_per,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'DATE_REF',to_char(sysdate,'yyyyMMdd'),NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'DAT_REF',to_char(sysdate,'yyyyMMdd'),NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'ParamDe0',to_char(sysdate,'yyyyMMdd'),NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'ANN_DE',v_ann,NULL,'JCPT',0,0,NULL);
/* INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'COMPTA_OK','0',NULL,'JCPT',0,0,NULL);
*/
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'SAUT_PAGE','0',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'JUSTIF_RUB','1',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'JUSTIF_CT','1',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'DAT_VAL',NULL,NULL,'JCPT',0,0,to_char(sysdate,'dd.mm.yyyy'));
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'MON',NULL,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'MAT_DE',1,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'MAT_A',999999999,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'TYP_PER','12',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'SELECT','0',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp (LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,LSTP_FLTS,LSTP_TXT,LSTP_LOC)
select idu_p,dat_p,hre_p,'SRED_LET',srub_let,srub_num,'JCPT',0,1,NULL,NULL from srub where srub_pas=pas_p and srub_let in ('B','E', 'G', 'I');
INSERT INTO scivs (sciv_idu,sciv_dat,sciv_hre,sciv_pas,sciv_mat, sciv_prg)
select distinct idu_p,dat_p,hre_p,SCIV_PAS,SCIV_MAT,'JCPT'
from sciv where
sciv_pas=pas_p and sciv_mil=1
;
PR_INSERT_PRINTJOBPARAM(pas_p, idu_p, prg_p,dat_p, hre_p, 'F');
pa_sb_compta.effacer( idu_p,0,0, prg_p);
pa_sb_compta.initialiseretpiloter(idu_p,'JCPT',dat_p,hre_p,pas_p);
pr_create_export_ic (idu_p,'JCPT',dat_p,hre_p,pas_p);
commit;
exception when others then null;
end ;
end;
/
-- End of DDL Script for Procedure NOVA.PR_CREATE_EXPORT_IC_ALL
-- Start of DDL Script for Procedure NOVA.PR_CREATE_EXPORT_IC
-- Generated 16-mars-2022 16:02:22 from NOVA@smart02
CREATE OR REPLACE
PROCEDURE pr_create_export_ic (
idu_p VARCHAR2,
prg_p VARCHAR2,
dat_p NUMBER,
hre_p NUMBER,
pas_p NUMBER
) is
begin
declare
cursor c_lstp(cod_p varchar2) is
select * from slstp
where lstp_dat= dat_p
and lstp_hre=hre_p
and lstp_prg= prg_p
and lstp_idu= idu_p
and lstp_typ=cod_p
;
r_lstp c_lstp%rowtype;
cursor c_zjc2 is
SELECT ssta_lib,srul_lib,"ZJCP"."ZJCP_TST", "ZJCP"."ZJCP_STA", "ZJCP"."ZJCP_LET", "ZJCP"."ZJCP_NUM", "ZJCP"."ZJCP_CRE", "ZJCP"."ZJCP_DEB", sum("ZJCP"."ZJCP_RES") as MNT,
"ZJCP"."ZJCP_MON", "ZJCP"."ZJCP_MONLIB"
FROM "NOVA"."ZJCP" "ZJCP",srul,ssta
where srul_let(+)="ZJCP"."ZJCP_LET" and srul_num(+)="ZJCP"."ZJCP_NUM" and srul_pas(+)=pas_p and srul_lan(+)='F' and ssta_pas(+)= pas_p and ssta_tst(+)= "ZJCP"."ZJCP_TST" and ssta_num(+)= "ZJCP"."ZJCP_STA"
group by ssta_lib,srul_lib, zjcp_tst,zjcp_sta,zjcp_let,zjcp_num,zjcp_cre,zjcp_deb, "ZJCP"."ZJCP_MON", "ZJCP"."ZJCP_MONLIB"
ORDER BY "ZJCP"."ZJCP_MON", "ZJCP"."ZJCP_STA", "ZJCP"."ZJCP_LET", "ZJCP"."ZJCP_NUM", "ZJCP"."ZJCP_DEB", "ZJCP"."ZJCP_CRE"
;
r_zjc2 c_zjc2%rowtype;
p_sficher varchar2(255);
v_DATA1 varchar2(4000);
ligne number;
v_periode varchar2(2);
v_annee varchar2(4);
v_date date;
begin
-------
open c_lstp('PER_DE');
fetch c_lstp into r_lstp;
close c_lstp;
v_periode:=r_lstp.lstp_par;
open c_lstp('ANN_DE');
fetch c_lstp into r_lstp;
close c_lstp;
v_annee:=r_lstp.lstp_par;
v_date:= ADD_MONTHS(to_date(v_annee||lpad(v_periode,'2','0')||'01','yyyyMMdd'),1)-1;
-------entete
ligne:=1;
p_sficher:= 'Export_interface_comptable'||'_'|| dat_p ||'_'||hre_p ||'.CSV'; -- Nom rapport
v_DATA1:='Rubrique'||';'|| 'Description'||';'|| 'Centre de charge'||';'||'Descritpion Centre de charge'||';'||'Compte Debit'||';'||'Compte Credit'||';'||'Montant'||';'||'Periode';
INSERT INTO sw_exp_lst (IDU,PRG,DAT,HRE,FICHIER,PAS,MAT,LIG,DATA)
VALUES(idu_p,prg_p,dat_p,hre_p,p_sficher,pas_p,0,ligne,v_DATA1);
ligne:=ligne+1;
------lignes
open c_zjc2;
loop
fetch c_zjc2 into r_zjc2;
exit when c_zjc2%notfound;
v_DATA1:=r_zjc2.zjcp_let||r_zjc2.zjcp_num||';'|| r_zjc2.srul_lib||';'|| r_zjc2.zjcp_sta||';'||r_zjc2.ssta_lib||';'||r_zjc2.zjcp_deb||';'||r_zjc2.zjcp_cre||';'||r_zjc2.MNT||';'||to_char(v_date,'MM.yyyy');
INSERT INTO sw_exp_lst (IDU,PRG,DAT,HRE,FICHIER,PAS,MAT,LIG,DATA)
VALUES(idu_p,prg_p,dat_p,hre_p,p_sficher,pas_p,0,ligne,v_DATA1);
ligne:=ligne+1;
end loop;
close c_zjc2;
commit;
exception when others then
null;
end;
end ;
/
-- End of DDL Script for Procedure NOVA.PR_CREATE_EXPORT_IC
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Web.Script.Serialization;
using Newtonsoft.Json;
using System.Configuration;
using System.Net.Http;
using System.Net.Http.Headers;
namespace CallApiPalexpo
{
class Program
{
static void Main(string[] args)
{
ContextDataBase dcPrj = new ContextDataBase(CryptorEngine.CryptConnexionString(ConfigurationManager.ConnectionStrings["OraConnection"].ConnectionString));
string sDate = dcPrj.ZINS.Where(cc => cc.ZINS_COD == "PALEXPO_WS").First().ZINS_PAR;
/*
using (var httpClient = new HttpClient())
{
using (var request = new HttpRequestMessage(new HttpMethod("POST"), "https://apis.palexpo.ch/api-token-auth/"))
{
request.Headers.TryAddWithoutValidation("accept", "application/json");
request.Headers.TryAddWithoutValidation("X-CSRFToken", "nCo5EKi4TTKCnUDpAeRTry5aYvgIds8UCUNaKa3zJeQM4zkrbFSKBV07tY6o2q6Y");
request.Content = new StringContent("{ \"password\": \"123456789\", \"username\": \"novative\"}");
request.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
var response = await httpClient.SendAsync(request);
}
}*/
WebRequest request2 =
WebRequest.Create(@"https://apis.palexpo.ch/api-token-auth/");
/* string encodedUserCredentials =
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(ConfigurationManager.AppSettings["CLES"]));*/
request2.ContentType = @"application/json; charset=utf-8";
request2.Method = "POST";
request2.ContentType = "application/json";
var userData =new StringContent("{ \"password\": \"VGRpKmgw0UhYfmQ\", \"username\": \"novative\"}");
request2.Headers.Add("X-CSRFToken","nCo5EKi4TTKCnUDpAeRTry5aYvgIds8UCUNaKa3zJeQM4zkrbFSKBV07tY6o2q6Y");
//request2.Headers.Add("accept", "application/json");
// request2.Headers.Add("Authorization", "Basic " + encodedUserCredentials);
StreamWriter requestWriter = new StreamWriter(request2.GetRequestStream());
requestWriter.Write(userData);
requestWriter.Close();
string sKey = "";
// var response = request2.GetResponse() as HttpWebResponse;
HttpWebResponse response2 = (HttpWebResponse)request2.GetResponse();
string jsonResponse2 = string.Empty;
using (StreamReader sr = new StreamReader(response2.GetResponseStream()))
{
jsonResponse2 = sr.ReadToEnd();
var jss = new JavaScriptSerializer();
Dictionary<string, string> sData = jss.Deserialize<Dictionary<string, string>>(jsonResponse2);
sKey = sData["access_token"].ToString();
// Console.WriteLine(jsonResponse2);
// Console.ReadLine();
}
WebRequest request = WebRequest.Create(@"https://apis.palexpo.ch/novasmart/" + sDate);
// WebRequest request = WebRequest.Create(@"https://api.palexpo.ch/store/api/services/project/1.0.0/search?after_updatedate=01.01.2017");
request.Method = "GET";
// request.Headers.Add("api_key", "e9cf5706-2885-3a0e-aac1-6e37be774ad7");
// request.Headers["Authorization"] = "Basic" + Convert.ToBase64String(Encoding.Default.GetBytes("novative:Novative123"));
// client.DefaultRequestHeaders.Add("Authorization", "Bearer " + accessToken);
request.Headers["Authorization"] = "Bearer " + sKey;
request.ContentLength = 0;
request.ContentType = @"application/json; charset=utf-8";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
string jsonResponse = string.Empty;
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
jsonResponse = sr.ReadToEnd();
var jss = new JavaScriptSerializer();
// Dictionary<string, string> sData = jss.Deserialize<<string, string>>(jsonResponse);
// var jss2 = new JavaScriptSerializer();
// string sLstProduct = jsonResponse.Substring(0, jsonResponse.Length - 3).Replace("{\"ProjectList\":{", "");
Dictionary<string, object> sData2 = jss.Deserialize<Dictionary<string, object>>(jsonResponse);
var arrayprj = sData2["ProjectList"] as Dictionary<string, object>;
var lstprj = arrayprj["Project"] as System.Collections.ArrayList;
int iPas = int.Parse(ConfigurationManager.AppSettings["PAS"]);
string sSstaTst = ConfigurationManager.AppSettings["STA_PRJ"];
try
{
for (int idx = 0; idx < lstprj.Count; idx++)
{
var project = lstprj[idx] as Dictionary<string, object>;
string sCode = project["EventId"].ToString();
string sSstaLib = project["EventDescription"].ToString();
string sSStaVis = project["TimesheetFlag"].ToString();
int isStaVis = (sSStaVis == "Y") ? 0 : 1;
if (!string.IsNullOrEmpty(sSstaLib))
{
if (dcPrj.SSTAs.Where(cc => cc.SSTA_PAS == iPas && cc.SSTA_TST == sSstaTst
&& cc.SSTA_NUM == sCode).ToList().Count == 0)
{
dcPrj.SSTAs.InsertOnSubmit(new SSTA()
{
SSTA_NUM = sCode,
SSTA_TST = sSstaTst,
SSTA_LIB = sSstaLib,
SSTA_PAS = iPas,
SSTA_VIS = isStaVis
});
}
else
{
dcPrj.SSTAs.Where(cc => cc.SSTA_PAS == iPas && cc.SSTA_TST == sSstaTst
&& cc.SSTA_NUM == sCode).First().SSTA_VIS = isStaVis;
}
}
}
dcPrj.SubmitChanges();
dcPrj.ZINS.Where(cc => cc.ZINS_COD == "PALEXPO_WS").First().ZINS_PAR = string.Format("{0:yyyy-MM-dd}", DateTime.Now.Date.AddDays(-1));
dcPrj.SubmitChanges();
}
catch (Exception ex)
{
ContextDataBase dcPrj2 = new ContextDataBase(CryptorEngine.CryptConnexionString(ConfigurationManager.ConnectionStrings["OraConnection"].ConnectionString));
DateTime dtNow = DateTime.Now;
int iDat = int.Parse(String.Format("{0:yyyyMMdd}", dtNow));
int iHre = int.Parse(String.Format("{0:HHmmss}", dtNow));
try
{
dcPrj2.Zerrs.InsertOnSubmit(new Zerr()
{
ZerrPrg = "PALEXPO_WS",
ZerrMsg = (ex.Message.Length < 254) ? ex.Message : ex.Message.Substring(0, 254),
ZerrKey = (ex.InnerException.Message.Length < 254) ? ex.InnerException.Message : ex.InnerException.Message.Substring(0, 254),
ZerrDat = iDat,
ZerrHre = iHre,
ZerrIdu = "NOVAP",
ZerrPas = 0,
ZerrMat = 0,
ZerrNum = "",
});
dcPrj2.SubmitChanges();
//return "succées";
}
catch (Exception ex2)
{
string sMsg = ex2.Message;
// return sMsg;
}
}
// var jarray = JsonConvert.DeserializeObject<Product>(sLstProduct);
//Console.WriteLine(jsonResponse);
//Console.ReadLine();
}
}
}
public class Project
{
public string EventId;
public string StartDate;
public int OrganisationCode;
public string EventDescription;
public string TimesheetFlag;
public string UpdateStamp;
}
}
This diff is collapsed.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CallApiPalexpo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CallApiPalexpo")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("45b5aabc-3d73-47a3-b3d1-d4570cc1e514")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
BODY
{
BACKGROUND-COLOR: white;
FONT-FAMILY: "Verdana", sans-serif;
FONT-SIZE: 100%;
MARGIN-LEFT: 0px;
MARGIN-TOP: 0px
}
P
{
FONT-FAMILY: "Verdana", sans-serif;
FONT-SIZE: 70%;
LINE-HEIGHT: 12pt;
MARGIN-BOTTOM: 0px;
MARGIN-LEFT: 10px;
MARGIN-TOP: 10px
}
.note
{
BACKGROUND-COLOR: #ffffff;
COLOR: #336699;
FONT-FAMILY: "Verdana", sans-serif;
FONT-SIZE: 100%;
MARGIN-BOTTOM: 0px;
MARGIN-LEFT: 0px;
MARGIN-TOP: 0px;
PADDING-RIGHT: 10px
}
.infotable
{
BACKGROUND-COLOR: #f0f0e0;
BORDER-BOTTOM: #ffffff 0px solid;
BORDER-COLLAPSE: collapse;
BORDER-LEFT: #ffffff 0px solid;
BORDER-RIGHT: #ffffff 0px solid;
BORDER-TOP: #ffffff 0px solid;
FONT-SIZE: 70%;
MARGIN-LEFT: 10px
}
.issuetable
{
BACKGROUND-COLOR: #ffffe8;
BORDER-COLLAPSE: collapse;
COLOR: #000000;
FONT-SIZE: 100%;
MARGIN-BOTTOM: 10px;
MARGIN-LEFT: 13px;
MARGIN-TOP: 0px
}
.issuetitle
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #dcdcdc 1px solid;
BORDER-TOP: #dcdcdc 1px;
COLOR: #003366;
FONT-WEIGHT: normal
}
.header
{
BACKGROUND-COLOR: #cecf9c;
BORDER-BOTTOM: #ffffff 1px solid;
BORDER-LEFT: #ffffff 1px solid;
BORDER-RIGHT: #ffffff 1px solid;
BORDER-TOP: #ffffff 1px solid;
COLOR: #000000;
FONT-WEIGHT: bold
}
.issuehdr
{
BACKGROUND-COLOR: #E0EBF5;
BORDER-BOTTOM: #dcdcdc 1px solid;
BORDER-TOP: #dcdcdc 1px solid;
COLOR: #000000;
FONT-WEIGHT: normal
}
.issuenone
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: 0px;
BORDER-LEFT: 0px;
BORDER-RIGHT: 0px;
BORDER-TOP: 0px;
COLOR: #000000;
FONT-WEIGHT: normal
}
.content
{
BACKGROUND-COLOR: #e7e7ce;
BORDER-BOTTOM: #ffffff 1px solid;
BORDER-LEFT: #ffffff 1px solid;
BORDER-RIGHT: #ffffff 1px solid;
BORDER-TOP: #ffffff 1px solid;
PADDING-LEFT: 3px
}
.issuecontent
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #dcdcdc 1px solid;
BORDER-TOP: #dcdcdc 1px solid;
PADDING-LEFT: 3px
}
A:link
{
COLOR: #cc6633;
TEXT-DECORATION: underline
}
A:visited
{
COLOR: #cc6633;
}
A:active
{
COLOR: #cc6633;
}
A:hover
{
COLOR: #cc3300;
TEXT-DECORATION: underline
}
H1
{
BACKGROUND-COLOR: #003366;
BORDER-BOTTOM: #336699 6px solid;
COLOR: #ffffff;
FONT-SIZE: 130%;
FONT-WEIGHT: normal;
MARGIN: 0em 0em 0em -20px;
PADDING-BOTTOM: 8px;
PADDING-LEFT: 30px;
PADDING-TOP: 16px
}
H2
{
COLOR: #000000;
FONT-SIZE: 80%;
FONT-WEIGHT: bold;
MARGIN-BOTTOM: 3px;
MARGIN-LEFT: 10px;
MARGIN-TOP: 20px;
PADDING-LEFT: 0px
}
H3
{
COLOR: #000000;
FONT-SIZE: 80%;
FONT-WEIGHT: bold;
MARGIN-BOTTOM: -5px;
MARGIN-LEFT: 10px;
MARGIN-TOP: 20px
}
H4
{
COLOR: #000000;
FONT-SIZE: 70%;
FONT-WEIGHT: bold;
MARGIN-BOTTOM: 0px;
MARGIN-TOP: 15px;
PADDING-BOTTOM: 0px
}
UL
{
COLOR: #000000;
FONT-SIZE: 70%;
LIST-STYLE: square;
MARGIN-BOTTOM: 0pt;
MARGIN-TOP: 0pt
}
OL
{
COLOR: #000000;
FONT-SIZE: 70%;
LIST-STYLE: square;
MARGIN-BOTTOM: 0pt;
MARGIN-TOP: 0pt
}
LI
{
LIST-STYLE: square;
MARGIN-LEFT: 0px
}
.expandable
{
CURSOR: hand
}
.expanded
{
color: black
}
.collapsed
{
DISPLAY: none
}
.foot
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #cecf9c 1px solid;
BORDER-TOP: #cecf9c 2px solid
}
.settings
{
MARGIN-LEFT: 25PX;
}
.help
{
TEXT-ALIGN: right;
margin-right: 10px;
}
This diff is collapsed.
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="OraConnection" connectionString="user id=nova;Password=oRP0zI6K4GU=;server=10.12.12.21;direct=True;sid=smart02;port=1521;persist security info=True;Pooling=True;Unicode=True" providerName="Devart.Data.OracleClient"/>
</connectionStrings>
<appSettings>
<add key="PAS" value="10"/>
<add key="Destination" value="C:\Users\hanen\Documents\test\"/>
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="OraConnection" connectionString="user id=nova;Password=oRP0zI6K4GU=;server=10.12.12.21;direct=True;sid=smart02;port=1521;persist security info=True;Pooling=True;Unicode=True" providerName="Devart.Data.OracleClient"/>
</connectionStrings>
<appSettings>
<add key="PAS" value="10"/>
<add key="Destination" value="C:\Users\hanen\Documents\test\"/>
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="OraConnection" connectionString="user id=nova;Password=oRP0zI6K4GU=;server=10.12.12.21;direct=True;sid=smart06;port=1521;persist security info=True;Pooling=True;Unicode=True" providerName="Devart.Data.OracleClient" />
</connectionStrings>
<appSettings>
<add key="CLES" value="PWhT331waIEz2xjhffpR9T4rYyAa:s9uh56y0NSnG5wg_23sqMHSTWfEa" />
<add key="PAS" value="10"/>
<add key="STA_PRJ" value="PROJECT"/>
</appSettings>
</configuration>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
503dc43f551899a0035ac26b8cf037f0d8c69841
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\obj\Debug\ResolveAssemblyReference.cache
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Debug\CallApiPalexpo.exe
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Debug\CallApiPalexpo.pdb
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Debug\Newtonsoft.Json.dll
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\obj\Debug\CallApiPalexpo.exe
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\obj\Debug\CallApiPalexpo.pdb
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Debug\CallApiPalexpo.exe.config
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\CallApiPalexpo.exe.config
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.exe
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.pdb
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\CallApiPalexpo.exe
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\CallApiPalexpo.pdb
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\Devart.Data.dll
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\Devart.Data.Oracle.dll
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\Devart.Data.Oracle.Linq.dll
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\Devart.Data.xml
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\bin\Debug\Devart.Data.Oracle.xml
C:\Users\Safa Bellalah\Downloads\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.csprojResolveAssemblyReference.cache
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.csproj.AssemblyReference.cache
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.csproj.CoreCompileInputs.cache
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.exe
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.pdb
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\CallApiPalexpo.exe.config
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallApiPalexpo.csprojResolveAssemblyReference.cache
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\CallExportComptable.exe.config
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\CallExportComptable.exe.config
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\CallExportComptable.exe
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\CallExportComptable.pdb
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\Devart.Data.dll
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\Devart.Data.Oracle.dll
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\Devart.Data.Oracle.Linq.dll
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\Devart.Data.xml
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\bin\Debug\Devart.Data.Oracle.xml
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallExportComptable.csprojResolveAssemblyReference.cache
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallExportComptable.exe
C:\Users\hanen\Documents\palexpo\CallApiPalexpo (4)\obj\Debug\CallExportComptable.pdb
C:\Users\hanen\Documents\fairmont\bin\Debug\CallExportComptable.exe.config
C:\Users\hanen\Documents\fairmont\obj\Debug\CallExportComptable.exe
C:\Users\hanen\Documents\fairmont\obj\Debug\CallExportComptable.pdb
C:\Users\hanen\Documents\fairmont\bin\Debug\CallExportComptable.exe
C:\Users\hanen\Documents\fairmont\bin\Debug\CallExportComptable.pdb
C:\Users\hanen\Documents\fairmont\bin\Debug\Devart.Data.dll
C:\Users\hanen\Documents\fairmont\bin\Debug\Devart.Data.Oracle.dll
C:\Users\hanen\Documents\fairmont\bin\Debug\Devart.Data.Oracle.Linq.dll
C:\Users\hanen\Documents\fairmont\bin\Debug\Devart.Data.xml
C:\Users\hanen\Documents\fairmont\bin\Debug\Devart.Data.Oracle.xml
C:\Users\hanen\Documents\fairmont\obj\Debug\CallExportComptable.csprojResolveAssemblyReference.cache
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\CallApiPalexpo.exe.config
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\CallApiPalexpo.exe
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\CallApiPalexpo.pdb
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\Newtonsoft.Json.dll
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\obj\Release\ResolveAssemblyReference.cache
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\obj\Release\CallApiPalexpo.exe
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\obj\Release\CallApiPalexpo.pdb
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\Devart.Data.dll
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\Devart.Data.Oracle.dll
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\Devart.Data.Oracle.Linq.dll
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\Devart.Data.Oracle.xml
C:\Users\DELL\Desktop\CallApiPalexpo\CallApiPalexpo\bin\Release\Devart.Data.xml
-- Start of DDL Script for Procedure NOVA.PR_CREATE_EXPORT_IC_ALL
-- Generated 16-mars-2022 8:15:03 from NOVA@smart02
CREATE OR REPLACE
PROCEDURE pr_create_export_ic_all (
idu_p VARCHAR2,
prg_p VARCHAR2,
dat_p NUMBER,
hre_p NUMBER,
pas_p NUMBER
) is
begin
declare
v_per number;
v_ann number;
inbr number;
begin
v_per :=to_char(ADD_MONTHS(sysdate,-1),'MM');
v_ann :=to_char(ADD_MONTHS(sysdate,-1),'yyyy');
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'PAS',pas_p,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'PER_DE',v_per,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'DATE_REF',to_char(sysdate,'yyyyMMdd'),NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'DAT_REF',to_char(sysdate,'yyyyMMdd'),NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'ParamDe0',to_char(sysdate,'yyyyMMdd'),NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'ANN_DE',v_ann,NULL,'JCPT',0,0,NULL);
/* INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'COMPTA_OK','0',NULL,'JCPT',0,0,NULL);
*/
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'SAUT_PAGE','0',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'JUSTIF_RUB','1',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'JUSTIF_CT','1',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'DAT_VAL',NULL,NULL,'JCPT',0,0,to_char(sysdate,'dd.mm.yyyy'));
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'MON',NULL,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'MAT_DE',1,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'MAT_A',999999999,NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'TYP_PER','12',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'SELECT','0',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp
(LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,
LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,
LSTP_FLTS,LSTP_TXT)
VALUES
(idu_p,dat_p,hre_p,'LANG_DOC','F',NULL,'JCPT',0,0,NULL);
INSERT INTO slstp (LSTP_IDU,LSTP_DAT,LSTP_HRE,LSTP_TYP,LSTP_PAR,LSTP_CAT_NUM,LSTP_PRG,LSTP_TMP,LSTP_FLTS,LSTP_TXT,LSTP_LOC)
select idu_p,dat_p,hre_p,'SRED_LET',srub_let,srub_num,'JCPT',0,1,NULL,NULL from srub where srub_pas=pas_p and srub_let in ('B','E', 'G', 'I');
INSERT INTO scivs (sciv_idu,sciv_dat,sciv_hre,sciv_pas,sciv_mat, sciv_prg)
select distinct idu_p,dat_p,hre_p,SCIV_PAS,SCIV_MAT,'JCPT'
from sciv where
sciv_pas=pas_p and sciv_mil=1
;
PR_INSERT_PRINTJOBPARAM(pas_p, idu_p, prg_p,dat_p, hre_p, 'F');
pa_sb_compta.effacer( idu_p,0,0, prg_p);
pa_sb_compta.initialiseretpiloter(idu_p,'JCPT',dat_p,hre_p,pas_p);
pr_create_export_ic (idu_p,'JCPT',dat_p,hre_p,pas_p);
commit;
exception when others then null;
end ;
end;
/
-- End of DDL Script for Procedure NOVA.PR_CREATE_EXPORT_IC_ALL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment