82 lines
3.0 KiB
C#
82 lines
3.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
|
|
namespace ClassLibraryWS
|
|
{
|
|
public class MonitoraggioMovimentazione_WS
|
|
{
|
|
|
|
private bancafideuram.nac.monitoraggiomovimentazione.MonitoraggioMovimentazione ws;
|
|
private bancafideuram.nac.monitoraggiomovimentazione.ChiaveCliente chiaveCliente;
|
|
private bancafideuram.nac.monitoraggiomovimentazione.InfoClient infoClient;
|
|
|
|
private const string NomeUtente = "M700001";
|
|
private const string Password = "M7000010";
|
|
private const string Proxy = "";
|
|
private const int NoRecordCodeError = 0;
|
|
|
|
|
|
|
|
public MonitoraggioMovimentazione_WS(bancafideuram.nac.monitoraggiomovimentazione.ChiaveCliente chiaveCliente, bancafideuram.nac.monitoraggiomovimentazione.InfoClient infoClient)
|
|
{
|
|
ws = new bancafideuram.nac.monitoraggiomovimentazione.MonitoraggioMovimentazione();
|
|
ws.Url = ConfigurationSettings.AppSettings["WSMONITORAGGIOMOVIMENTAZIONE"].ToString();
|
|
this.chiaveCliente = chiaveCliente;
|
|
this.infoClient = infoClient;
|
|
|
|
System.Net.NetworkCredential cred = new System.Net.NetworkCredential(NomeUtente, Password);
|
|
|
|
ws.PreAuthenticate = true;
|
|
ws.Credentials = cred;
|
|
|
|
}
|
|
|
|
public DataTable getVarPtfCliente(string StartDate, string EndDate)
|
|
{
|
|
DataTable dt = new DataTable("VarPtfStorico");
|
|
dt.Columns.Add("MERCATO", typeof(string));
|
|
dt.Columns.Add("DATARIFERIMENTO", typeof(DateTime));
|
|
dt.Columns.Add("VAR", typeof(double));
|
|
|
|
DataRow row = dt.NewRow();
|
|
|
|
string mercato = string.Empty;
|
|
|
|
if (chiaveCliente.codiceRete.ToUpper() == "F")
|
|
mercato = "Patrimonio Banca Fideuram";
|
|
else
|
|
mercato = "Patrimonio Sanpaolo Invest";
|
|
|
|
|
|
//ISPB >>>
|
|
//bancafideuram.nac.monitoraggiomovimentazione.VarPtfCliRes resp = ws.getVarPtfCli(chiaveCliente, StartDate, EndDate, infoClient);
|
|
//bancafideuram.nac.monitoraggiomovimentazione.VarPtfCli[] risposta = resp.tuttiVarPtfCli;
|
|
|
|
//foreach (bancafideuram.nac.monitoraggiomovimentazione.VarPtfCli varPtf in risposta)
|
|
//{
|
|
// if (varPtf.dtrife == null)
|
|
// break; //V Vedere se è il caso di lanciare un eccezione
|
|
// row["DATARIFERIMENTO"] = new DateTime(Convert.ToInt32(varPtf.dtrife.Substring(0, 4)),
|
|
// Convert.ToInt32(varPtf.dtrife.Substring(4, 2)),
|
|
// Convert.ToInt32(varPtf.dtrife.Substring(6, 2)));
|
|
// row["VAR"] = varPtf.varp;
|
|
|
|
// row["MERCATO"] = mercato;
|
|
|
|
|
|
// dt.Rows.Add(row);
|
|
|
|
// row = dt.NewRow();
|
|
//}
|
|
//ISPB <<<<
|
|
return dt;
|
|
}
|
|
|
|
|
|
}
|
|
}
|