232 lines
11 KiB
C#
232 lines
11 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// Codice generato da un modello.
|
|
//
|
|
// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione.
|
|
// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace MedAP_data
|
|
{
|
|
using System;
|
|
using System.Data.Entity;
|
|
using System.Data.Entity.Infrastructure;
|
|
using System.Data.Entity.Core.Objects;
|
|
using System.Linq;
|
|
|
|
public partial class MAPEntities : DbContext
|
|
{
|
|
public MAPEntities()
|
|
: base("name=MAPEntities")
|
|
{
|
|
}
|
|
|
|
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
|
{
|
|
throw new UnintentionalCodeFirstException();
|
|
}
|
|
|
|
public virtual DbSet<Documenti> Documenti { get; set; }
|
|
public virtual DbSet<DocTemplate> DocTemplate { get; set; }
|
|
public virtual DbSet<RowTemplate> RowTemplate { get; set; }
|
|
public virtual DbSet<RigheDoc> RigheDoc { get; set; }
|
|
public virtual DbSet<Clienti> Clienti { get; set; }
|
|
|
|
public virtual int stp_docRows_deleteQuery(Nullable<int> original_id)
|
|
{
|
|
var original_idParameter = original_id.HasValue ?
|
|
new ObjectParameter("Original_id", original_id) :
|
|
new ObjectParameter("Original_id", typeof(int));
|
|
|
|
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_docRows_deleteQuery", original_idParameter);
|
|
}
|
|
|
|
public virtual int stp_docRows_updateQuery(Nullable<int> original_id, string descrizione, string um, Nullable<decimal> prezzoUm, Nullable<float> qta, Nullable<float> sconto, Nullable<int> c_iva)
|
|
{
|
|
var original_idParameter = original_id.HasValue ?
|
|
new ObjectParameter("Original_id", original_id) :
|
|
new ObjectParameter("Original_id", typeof(int));
|
|
|
|
var descrizioneParameter = descrizione != null ?
|
|
new ObjectParameter("Descrizione", descrizione) :
|
|
new ObjectParameter("Descrizione", typeof(string));
|
|
|
|
var umParameter = um != null ?
|
|
new ObjectParameter("um", um) :
|
|
new ObjectParameter("um", typeof(string));
|
|
|
|
var prezzoUmParameter = prezzoUm.HasValue ?
|
|
new ObjectParameter("prezzoUm", prezzoUm) :
|
|
new ObjectParameter("prezzoUm", typeof(decimal));
|
|
|
|
var qtaParameter = qta.HasValue ?
|
|
new ObjectParameter("qta", qta) :
|
|
new ObjectParameter("qta", typeof(float));
|
|
|
|
var scontoParameter = sconto.HasValue ?
|
|
new ObjectParameter("sconto", sconto) :
|
|
new ObjectParameter("sconto", typeof(float));
|
|
|
|
var c_ivaParameter = c_iva.HasValue ?
|
|
new ObjectParameter("c_iva", c_iva) :
|
|
new ObjectParameter("c_iva", typeof(int));
|
|
|
|
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_docRows_updateQuery", original_idParameter, descrizioneParameter, umParameter, prezzoUmParameter, qtaParameter, scontoParameter, c_ivaParameter);
|
|
}
|
|
|
|
public virtual ObjectResult<RigheDoc> stp_docRows_getByIdxDoc(Nullable<int> idxDoc)
|
|
{
|
|
var idxDocParameter = idxDoc.HasValue ?
|
|
new ObjectParameter("idxDoc", idxDoc) :
|
|
new ObjectParameter("idxDoc", typeof(int));
|
|
|
|
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<RigheDoc>("stp_docRows_getByIdxDoc", idxDocParameter);
|
|
}
|
|
|
|
public virtual ObjectResult<RigheDoc> stp_docRows_getByIdxDoc(Nullable<int> idxDoc, MergeOption mergeOption)
|
|
{
|
|
var idxDocParameter = idxDoc.HasValue ?
|
|
new ObjectParameter("idxDoc", idxDoc) :
|
|
new ObjectParameter("idxDoc", typeof(int));
|
|
|
|
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<RigheDoc>("stp_docRows_getByIdxDoc", mergeOption, idxDocParameter);
|
|
}
|
|
|
|
public virtual int stp_clienti_delete(Nullable<int> original_idxCli)
|
|
{
|
|
var original_idxCliParameter = original_idxCli.HasValue ?
|
|
new ObjectParameter("Original_idxCli", original_idxCli) :
|
|
new ObjectParameter("Original_idxCli", typeof(int));
|
|
|
|
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_clienti_delete", original_idxCliParameter);
|
|
}
|
|
|
|
public virtual int stp_clienti_insert(string ragSoc, string sesso, string pOBirth, Nullable<System.DateTime> dOBirth, string p_iva, string c_Fisc, string via, string localita, string cap, string provincia, string pagamento, string note, string idxGruppo)
|
|
{
|
|
var ragSocParameter = ragSoc != null ?
|
|
new ObjectParameter("RagSoc", ragSoc) :
|
|
new ObjectParameter("RagSoc", typeof(string));
|
|
|
|
var sessoParameter = sesso != null ?
|
|
new ObjectParameter("Sesso", sesso) :
|
|
new ObjectParameter("Sesso", typeof(string));
|
|
|
|
var pOBirthParameter = pOBirth != null ?
|
|
new ObjectParameter("POBirth", pOBirth) :
|
|
new ObjectParameter("POBirth", typeof(string));
|
|
|
|
var dOBirthParameter = dOBirth.HasValue ?
|
|
new ObjectParameter("DOBirth", dOBirth) :
|
|
new ObjectParameter("DOBirth", typeof(System.DateTime));
|
|
|
|
var p_ivaParameter = p_iva != null ?
|
|
new ObjectParameter("P_iva", p_iva) :
|
|
new ObjectParameter("P_iva", typeof(string));
|
|
|
|
var c_FiscParameter = c_Fisc != null ?
|
|
new ObjectParameter("C_Fisc", c_Fisc) :
|
|
new ObjectParameter("C_Fisc", typeof(string));
|
|
|
|
var viaParameter = via != null ?
|
|
new ObjectParameter("Via", via) :
|
|
new ObjectParameter("Via", typeof(string));
|
|
|
|
var localitaParameter = localita != null ?
|
|
new ObjectParameter("Localita", localita) :
|
|
new ObjectParameter("Localita", typeof(string));
|
|
|
|
var capParameter = cap != null ?
|
|
new ObjectParameter("Cap", cap) :
|
|
new ObjectParameter("Cap", typeof(string));
|
|
|
|
var provinciaParameter = provincia != null ?
|
|
new ObjectParameter("Provincia", provincia) :
|
|
new ObjectParameter("Provincia", typeof(string));
|
|
|
|
var pagamentoParameter = pagamento != null ?
|
|
new ObjectParameter("Pagamento", pagamento) :
|
|
new ObjectParameter("Pagamento", typeof(string));
|
|
|
|
var noteParameter = note != null ?
|
|
new ObjectParameter("Note", note) :
|
|
new ObjectParameter("Note", typeof(string));
|
|
|
|
var idxGruppoParameter = idxGruppo != null ?
|
|
new ObjectParameter("idxGruppo", idxGruppo) :
|
|
new ObjectParameter("idxGruppo", typeof(string));
|
|
|
|
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_clienti_insert", ragSocParameter, sessoParameter, pOBirthParameter, dOBirthParameter, p_ivaParameter, c_FiscParameter, viaParameter, localitaParameter, capParameter, provinciaParameter, pagamentoParameter, noteParameter, idxGruppoParameter);
|
|
}
|
|
|
|
public virtual int stp_clienti_update(Nullable<int> original_idxCli, string ragSoc, string sesso, string pOBirth, Nullable<System.DateTime> dOBirth, string p_iva, string c_Fisc, string via, string localita, string cap, string provincia, string pagamento, string email, string tel, string note, string idxGruppo)
|
|
{
|
|
var original_idxCliParameter = original_idxCli.HasValue ?
|
|
new ObjectParameter("Original_idxCli", original_idxCli) :
|
|
new ObjectParameter("Original_idxCli", typeof(int));
|
|
|
|
var ragSocParameter = ragSoc != null ?
|
|
new ObjectParameter("RagSoc", ragSoc) :
|
|
new ObjectParameter("RagSoc", typeof(string));
|
|
|
|
var sessoParameter = sesso != null ?
|
|
new ObjectParameter("Sesso", sesso) :
|
|
new ObjectParameter("Sesso", typeof(string));
|
|
|
|
var pOBirthParameter = pOBirth != null ?
|
|
new ObjectParameter("POBirth", pOBirth) :
|
|
new ObjectParameter("POBirth", typeof(string));
|
|
|
|
var dOBirthParameter = dOBirth.HasValue ?
|
|
new ObjectParameter("DOBirth", dOBirth) :
|
|
new ObjectParameter("DOBirth", typeof(System.DateTime));
|
|
|
|
var p_ivaParameter = p_iva != null ?
|
|
new ObjectParameter("P_iva", p_iva) :
|
|
new ObjectParameter("P_iva", typeof(string));
|
|
|
|
var c_FiscParameter = c_Fisc != null ?
|
|
new ObjectParameter("C_Fisc", c_Fisc) :
|
|
new ObjectParameter("C_Fisc", typeof(string));
|
|
|
|
var viaParameter = via != null ?
|
|
new ObjectParameter("Via", via) :
|
|
new ObjectParameter("Via", typeof(string));
|
|
|
|
var localitaParameter = localita != null ?
|
|
new ObjectParameter("Localita", localita) :
|
|
new ObjectParameter("Localita", typeof(string));
|
|
|
|
var capParameter = cap != null ?
|
|
new ObjectParameter("Cap", cap) :
|
|
new ObjectParameter("Cap", typeof(string));
|
|
|
|
var provinciaParameter = provincia != null ?
|
|
new ObjectParameter("Provincia", provincia) :
|
|
new ObjectParameter("Provincia", typeof(string));
|
|
|
|
var pagamentoParameter = pagamento != null ?
|
|
new ObjectParameter("Pagamento", pagamento) :
|
|
new ObjectParameter("Pagamento", typeof(string));
|
|
|
|
var emailParameter = email != null ?
|
|
new ObjectParameter("email", email) :
|
|
new ObjectParameter("email", typeof(string));
|
|
|
|
var telParameter = tel != null ?
|
|
new ObjectParameter("tel", tel) :
|
|
new ObjectParameter("tel", typeof(string));
|
|
|
|
var noteParameter = note != null ?
|
|
new ObjectParameter("Note", note) :
|
|
new ObjectParameter("Note", typeof(string));
|
|
|
|
var idxGruppoParameter = idxGruppo != null ?
|
|
new ObjectParameter("idxGruppo", idxGruppo) :
|
|
new ObjectParameter("idxGruppo", typeof(string));
|
|
|
|
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_clienti_update", original_idxCliParameter, ragSocParameter, sessoParameter, pOBirthParameter, dOBirthParameter, p_ivaParameter, c_FiscParameter, viaParameter, localitaParameter, capParameter, provinciaParameter, pagamentoParameter, emailParameter, telParameter, noteParameter, idxGruppoParameter);
|
|
}
|
|
}
|
|
}
|