RImozione old DataLayer

This commit is contained in:
Samuele Locatelli
2021-05-17 13:33:28 +02:00
parent a90a62cd7a
commit 48d5671e53
52 changed files with 0 additions and 2769 deletions
-12
View File
@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data
{
class Constants
{
}
}
@@ -1,85 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
using NLog;
using Microsoft.Extensions.Configuration;
namespace MP.Data.Controllers
{
public class MpStatsController : IDisposable
{
#region Private Fields
private static IConfiguration _configuration;
private static MoonPro_STATSContext dbCtx;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
public MpStatsController(IConfiguration configuration)
{
_configuration = configuration;
dbCtx = new MoonPro_STATSContext(configuration);
Log.Info("Avviata classe MpStatsController.MpStatsController");
}
#endregion Public Constructors
#region Public Methods
public void Dispose()
{
// Clear database context
dbCtx.Dispose();
}
/// <summary>
/// Annulla modifiche su una specifica entity (cancel update)
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool rollBackEntity(object item)
{
bool answ = false;
try
{
if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified)
{
dbCtx.Entry(item).Reload();
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
/// Elenco tabella scarti da filtro
/// </summary>
/// <param name="numRecord"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public List<DatabaseModels.ResScarti> ScartiGetAll(int numRecord, string searchVal = "")
{
List<DatabaseModels.ResScarti> dbResult = new List<DatabaseModels.ResScarti>();
dbResult = dbCtx
.DbSetScarti
.Where(x => x.KeyRichiesta.Contains(searchVal) || x.Descrizione.Contains(searchVal) || x.CodArticolo.Contains(searchVal) || string.IsNullOrEmpty(searchVal))
.OrderByDescending(x => x.DataOra)
.Take(numRecord)
.ToList();
return dbResult;
}
#endregion Public Methods
}
}
-13
View File
@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Aaul
{
public string Azione { get; set; }
public string Descrizione { get; set; }
}
}
-18
View File
@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Cal
{
public DateTime Giorno { get; set; }
public bool? DoDdb { get; set; }
public bool? DoTcr { get; set; }
public bool? DoUl { get; set; }
public bool? DoEcp { get; set; }
public bool? DoRs { get; set; }
public bool? DoOdl { get; set; }
}
}
-15
View File
@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Config
{
public string Chiave { get; set; }
public string Valore { get; set; }
public string ValoreStd { get; set; }
public string Note { get; set; }
}
}
-15
View File
@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Ddb
{
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public int IdxStato { get; set; }
public decimal DurataMinuti { get; set; }
}
}
-24
View File
@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Ddb1
{
public string IdxMacchina { get; set; }
public DateTime InizioStato { get; set; }
public DateTime? FineStato { get; set; }
public int IdxStato { get; set; }
public double? DurataMinuti { get; set; }
public string Value { get; set; }
public string CodArticolo { get; set; }
public double? TempoCicloBase { get; set; }
public int? PzPalletProd { get; set; }
public int? MatrOpr { get; set; }
public string Pallet { get; set; }
public string Descrizione { get; set; }
public string ClasseTempo { get; set; }
}
}
-30
View File
@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class DdbTurni
{
public DateTime DataRif { get; set; }
public string IdxMacchina { get; set; }
public string Turno { get; set; }
public int IdxStato { get; set; }
public string CodArticolo { get; set; }
public DateTime InizioStato { get; set; }
public DateTime FineStato { get; set; }
public string Pallet { get; set; }
public int? PzPalletProd { get; set; }
public decimal? TempoCicloBase { get; set; }
public string Descrizione { get; set; }
public string ClasseTempo { get; set; }
public DateTime? DataTurnoInizio { get; set; }
public DateTime? DataTurnoFine { get; set; }
public long? DurataStato { get; set; }
public DateTime InizioPeriodo { get; set; }
public DateTime? FinePeriodo { get; set; }
public long? DurataPeriodo { get; set; }
public int TotPzProd { get; set; }
}
}
-30
View File
@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class DdbTurniNew
{
public DateTime DataRif { get; set; }
public string IdxMacchina { get; set; }
public string Turno { get; set; }
public int IdxStato { get; set; }
public string CodArticolo { get; set; }
public DateTime InizioStato { get; set; }
public DateTime FineStato { get; set; }
public string Pallet { get; set; }
public int? PzPalletProd { get; set; }
public decimal? TempoCicloBase { get; set; }
public string Descrizione { get; set; }
public string ClasseTempo { get; set; }
public DateTime? DataTurnoInizio { get; set; }
public DateTime? DataTurnoFine { get; set; }
public long? DurataStato { get; set; }
public DateTime InizioPeriodo { get; set; }
public DateTime? FinePeriodo { get; set; }
public long? DurataPeriodo { get; set; }
public int TotPzProd { get; set; }
}
}
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class DdbTurniSummary
{
public string IdxMacchina { get; set; }
public DateTime DataRif { get; set; }
public string Turno { get; set; }
public string CodArticolo { get; set; }
public int IdxStato { get; set; }
public decimal TempoCicloBase { get; set; }
public DateTime? Inizio { get; set; }
public int PzPalletProd { get; set; }
public decimal? Durata { get; set; }
public int? PzProd { get; set; }
}
}
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class DdbTurniSummaryNew
{
public string IdxMacchina { get; set; }
public DateTime DataRif { get; set; }
public string Turno { get; set; }
public string CodArticolo { get; set; }
public int IdxStato { get; set; }
public decimal TempoCicloBase { get; set; }
public DateTime? Inizio { get; set; }
public int PzPalletProd { get; set; }
public decimal? Durata { get; set; }
public int? PzProd { get; set; }
}
}
-23
View File
@@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Ecp
{
public int IdxEcp { get; set; }
public DateTime DataOraConf { get; set; }
public string IdxMacchina { get; set; }
public string KeyRichiesta { get; set; }
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public int PezziConf { get; set; }
public int PezziScar { get; set; }
public int PezziDaRilav { get; set; }
public int MatrOpr { get; set; }
public string Cognome { get; set; }
public string Nome { get; set; }
}
}
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Ecp1
{
public DateTime DataOraConf { get; set; }
public string IdxMacchina { get; set; }
public int MatrApp { get; set; }
public DateTime DataFrom { get; set; }
public DateTime DataTo { get; set; }
public int PezziConf { get; set; }
public int PezziScar { get; set; }
public int PezziDaRilav { get; set; }
public string CommessaEsterna { get; set; }
public int TipoConf { get; set; }
}
}
-14
View File
@@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Kit
{
public string KeyKit { get; set; }
public string KeyExtOrd { get; set; }
public string CodArtParent { get; set; }
}
}
-26
View File
@@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Odl
{
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public string CodArticolo { get; set; }
public decimal Tcassegnato { get; set; }
public string IdxMacchina { get; set; }
public int NumPezzi { get; set; }
public int NumPezziEv { get; set; }
public int NumPezziSca { get; set; }
public int NumPezziRil { get; set; }
public DateTime? DataInizio { get; set; }
public DateTime? DataFine { get; set; }
public string KeyRichiestaParent { get; set; }
public string CodArticoloParent { get; set; }
public DateTime? DueDate { get; set; }
public int? PzPallet { get; set; }
}
}
-30
View File
@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Odl1
{
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public string IdxMacchina { get; set; }
public int NumPezzi { get; set; }
public decimal Tcassegnato { get; set; }
public DateTime? DataInizio { get; set; }
public DateTime? DataFine { get; set; }
public string Note { get; set; }
public bool NeedAppr { get; set; }
public string UserAppr { get; set; }
public DateTime? DataAppr { get; set; }
public decimal? TcrichAttr { get; set; }
public string KeyRichiesta { get; set; }
public int PzPallet { get; set; }
public bool Provvisorio { get; set; }
public int MatrOpr { get; set; }
public string CommessaAs400 { get; set; }
public int ToAs400 { get; set; }
public DateTime? DueDate { get; set; }
}
}
-23
View File
@@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class R
{
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public string Causale { get; set; }
public string Descrizione { get; set; }
public string Note { get; set; }
public int Qta { get; set; }
public string KeyRichiesta { get; set; }
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public int MatrOpr { get; set; }
public string Cognome { get; set; }
public string Nome { get; set; }
}
}
-22
View File
@@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class R1
{
public string IdxMacchina { get; set; }
public DateTime DataOra { get; set; }
public string Causale { get; set; }
public int Qta { get; set; }
public string Note { get; set; }
public string CodArticolo { get; set; }
public int MatrOpr { get; set; }
public DateTime? DataOraProdRec { get; set; }
public string Descrizione { get; set; }
public string KeyRichiesta { get; set; }
public int IdxOdl { get; set; }
}
}
-19
View File
@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Rc
{
public int IdxControllo { get; set; }
public DateTime DataOra { get; set; }
public string IdxMacchina { get; set; }
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public int MatrOpr { get; set; }
public bool EsitoOk { get; set; }
public string Note { get; set; }
}
}
@@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class ResControlli
{
#region Public Properties
public string CodArticolo { get; set; }
public DateTime DataOra { get; set; }
public bool EsitoOk { get; set; }
public int IdxControllo { get; set; }
public string IdxMacchina { get; set; }
public int IdxOdl { get; set; }
public int MatrOpr { get; set; }
public string Note { get; set; }
#endregion Public Properties
}
}
-26
View File
@@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class ResScarti
{
#region Public Properties
public string Causale { get; set; }
public string CodArticolo { get; set; }
public DateTime DataOra { get; set; }
public DateTime? DataOraProdRec { get; set; }
public string Descrizione { get; set; }
public string IdxMacchina { get; set; }
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public int MatrOpr { get; set; }
public string Note { get; set; }
public int Qta { get; set; }
#endregion Public Properties
}
}
-12
View File
@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Tally
{
public int N { get; set; }
}
}
-16
View File
@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class TcStat
{
public string CodArticolo { get; set; }
public string CodGruppo { get; set; }
public string IdxMacchina { get; set; }
public decimal TcStat1 { get; set; }
public int TcType { get; set; }
}
}
-19
View File
@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Tcr
{
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public string CodArticolo { get; set; }
public int PzProd { get; set; }
public decimal? Tcmedio { get; set; }
public decimal? Tcmin { get; set; }
public decimal? Tcmax { get; set; }
public decimal? Tc50p { get; set; }
}
}
-20
View File
@@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Tcr1
{
public string IdxMacchina { get; set; }
public string CodArticolo { get; set; }
public DateTime DataOraRif { get; set; }
public decimal Tcmedio { get; set; }
public int PzProd { get; set; }
public int IdxOdl { get; set; }
public decimal Tcassegnato { get; set; }
public string KeyRichiesta { get; set; }
public int PzPallet { get; set; }
}
}
-19
View File
@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class TcrDay
{
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public string CodArticolo { get; set; }
public int PzProd { get; set; }
public decimal? Tcmedio { get; set; }
public decimal? Tcmin { get; set; }
public decimal? Tcmax { get; set; }
public decimal? Tc50p { get; set; }
}
}
-19
View File
@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class TcrDayTest
{
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public string CodArticolo { get; set; }
public int PzProd { get; set; }
public decimal? Tcmedio { get; set; }
public decimal? Tcmin { get; set; }
public decimal? Tcmax { get; set; }
public decimal? Tc50p { get; set; }
}
}
-14
View File
@@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class TestJason
{
public DateTime Data { get; set; }
public byte[] Json { get; set; }
public int? Rows { get; set; }
}
}
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class Ul
{
public int IdxLog { get; set; }
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public int MatrOpr { get; set; }
public string Cognome { get; set; }
public string Nome { get; set; }
public string CodArticolo { get; set; }
public string Azione { get; set; }
public string Valore { get; set; }
public decimal Qta { get; set; }
}
}
@@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class UserActionLog
{
#region Public Properties
public string Azione { get; set; }
public string CodArticolo { get; set; }
public string Cognome { get; set; }
public DateTime DataOraRif { get; set; }
public int IdxLog { get; set; }
public string IdxMacchina { get; set; }
public int MatrOpr { get; set; }
public string Nome { get; set; }
public decimal Qta { get; set; }
public string Valore { get; set; }
#endregion Public Properties
}
}
-24
View File
@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VDdb
{
public string IdxMacchina { get; set; }
public DateTime InizioStato { get; set; }
public DateTime? FineStato { get; set; }
public int IdxStato { get; set; }
public double? DurataMinuti { get; set; }
public string Value { get; set; }
public string CodArticolo { get; set; }
public double? TempoCicloBase { get; set; }
public int? PzPalletProd { get; set; }
public int? MatrOpr { get; set; }
public string Pallet { get; set; }
public string Descrizione { get; set; }
public string ClasseTempo { get; set; }
}
}
-18
View File
@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VDdbLight
{
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public DateTime InizioStato { get; set; }
public string Stato { get; set; }
public double? DurataMinuti { get; set; }
public string CodArticolo { get; set; }
public string Operatore { get; set; }
}
}
@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VDdbLightOld
{
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public DateTime InizioStato { get; set; }
public string Stato { get; set; }
public double? DurataMinuti { get; set; }
public string CodArticolo { get; set; }
public string Operatore { get; set; }
}
}
-26
View File
@@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VDdbTurni
{
public string IdxMacchina { get; set; }
public DateTime DataRif { get; set; }
public string Turno { get; set; }
public string CodArticolo { get; set; }
public int IdxStato { get; set; }
public decimal TempoCicloBase { get; set; }
public int PzPalletProd { get; set; }
public decimal? Durata { get; set; }
public int? PzProd { get; set; }
public string ClasseTempo { get; set; }
public string DescClasseTempo { get; set; }
public string Semaforo { get; set; }
public string SemColore { get; set; }
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
}
}
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VEcp
{
public DateTime DataOraConf { get; set; }
public string IdxMacchina { get; set; }
public int MatrApp { get; set; }
public DateTime DataFrom { get; set; }
public DateTime DataTo { get; set; }
public int PezziConf { get; set; }
public int PezziScar { get; set; }
public int PezziDaRilav { get; set; }
public string CommessaEsterna { get; set; }
public int TipoConf { get; set; }
}
}
-25
View File
@@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VEcp1
{
public int IdxEcp { get; set; }
public DateTime DataOraConf { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public string KeyRichiesta { get; set; }
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public int PezziConf { get; set; }
public int PezziScar { get; set; }
public int PezziDaRilav { get; set; }
public int MatrOpr { get; set; }
public string Cognome { get; set; }
public string Nome { get; set; }
}
}
@@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VEcpExtended
{
public int IdxEcp { get; set; }
public DateTime DataOraConf { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public string KeyRichiesta { get; set; }
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public int PezziConf { get; set; }
public int PezziScar { get; set; }
public int PezziDaRilav { get; set; }
public int MatrOpr { get; set; }
public string Cognome { get; set; }
public string Nome { get; set; }
public decimal Tcassegnato { get; set; }
public DateTime DueDate { get; set; }
}
}
-14
View File
@@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VKit
{
public string KeyKit { get; set; }
public string KeyExtOrd { get; set; }
public string CodArtParent { get; set; }
}
}
-30
View File
@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VOdl
{
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public string IdxMacchina { get; set; }
public int NumPezzi { get; set; }
public decimal Tcassegnato { get; set; }
public DateTime? DataInizio { get; set; }
public DateTime? DataFine { get; set; }
public string Note { get; set; }
public bool NeedAppr { get; set; }
public string UserAppr { get; set; }
public DateTime? DataAppr { get; set; }
public decimal? TcrichAttr { get; set; }
public string KeyRichiesta { get; set; }
public int PzPallet { get; set; }
public bool Provvisorio { get; set; }
public int MatrOpr { get; set; }
public string CommessaAs400 { get; set; }
public int ToAs400 { get; set; }
public DateTime? DueDate { get; set; }
}
}
-28
View File
@@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VOdl1
{
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public string CodArticolo { get; set; }
public decimal Tcassegnato { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public int NumPezzi { get; set; }
public int NumPezziEv { get; set; }
public int NumPezziSca { get; set; }
public int NumPezziRil { get; set; }
public DateTime? DataInizio { get; set; }
public DateTime? DataFine { get; set; }
public string KeyRichiestaParent { get; set; }
public string CodArticoloParent { get; set; }
public DateTime? DueDate { get; set; }
public int? PzPallet { get; set; }
}
}
@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VPodlNonChiusi
{
public int IdxPromessa { get; set; }
public string KeyRichiesta { get; set; }
public string KeyBcode { get; set; }
public bool Attivabile { get; set; }
public int IdxOdl { get; set; }
public DateTime? DataInizio { get; set; }
public string CodArticolo { get; set; }
public string DescArticolo { get; set; }
public string CodGruppo { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string Nome { get; set; }
public int NumPezzi { get; set; }
public decimal Tcassegnato { get; set; }
public DateTime DueDate { get; set; }
public int Priorita { get; set; }
public int PzPallet { get; set; }
public decimal? TotMinProg { get; set; }
public decimal? TotOreProg { get; set; }
}
}
-23
View File
@@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VR1
{
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public string Causale { get; set; }
public string Descrizione { get; set; }
public string Note { get; set; }
public int Qta { get; set; }
public string KeyRichiesta { get; set; }
public int IdxOdl { get; set; }
public string CodArticolo { get; set; }
public int MatrOpr { get; set; }
public string Cognome { get; set; }
public string Nome { get; set; }
}
}
-18
View File
@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VTcStat
{
public string CodArticolo { get; set; }
public string CodGruppo { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public decimal TcStat { get; set; }
public int TcType { get; set; }
}
}
-20
View File
@@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VTcr
{
public string IdxMacchina { get; set; }
public string CodArticolo { get; set; }
public DateTime DataOraRif { get; set; }
public decimal Tcmedio { get; set; }
public int PzProd { get; set; }
public int IdxOdl { get; set; }
public decimal Tcassegnato { get; set; }
public string KeyRichiesta { get; set; }
public int PzPallet { get; set; }
}
}
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VTcr1
{
public DateTime DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public string CodArticolo { get; set; }
public int PzProd { get; set; }
public decimal? Tcmedio { get; set; }
public decimal? Tcmin { get; set; }
public decimal? Tcmax { get; set; }
public decimal? Tc50p { get; set; }
}
}
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VTcrDay
{
public DateTime? DataOraRif { get; set; }
public string IdxMacchina { get; set; }
public string CodMacchina { get; set; }
public string DescMacchina { get; set; }
public string CodArticolo { get; set; }
public int PzProd { get; set; }
public decimal? Tcmedio { get; set; }
public decimal? Tcmin { get; set; }
public decimal? Tcmax { get; set; }
public decimal? Tc50p { get; set; }
}
}
-15
View File
@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace MP.Data.DatabaseModels
{
public partial class VetoTc
{
public string IdxMacchina { get; set; }
public string CodArticolo { get; set; }
public bool? VetoTc1 { get; set; }
public decimal SogliaTc { get; set; }
}
}
-8
View File
@@ -1,8 +0,0 @@
using System;
namespace MP.Data
{
public class Enums
{
}
}
-65
View File
@@ -1,65 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>MP.Data</AssemblyName>
<RootNamespace>MP.Data</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Remove="DatabaseModels\Aaul.cs" />
<Compile Remove="DatabaseModels\Cal.cs" />
<Compile Remove="DatabaseModels\Config.cs" />
<Compile Remove="DatabaseModels\Ddb.cs" />
<Compile Remove="DatabaseModels\Ddb1.cs" />
<Compile Remove="DatabaseModels\DdbTurni.cs" />
<Compile Remove="DatabaseModels\DdbTurniNew.cs" />
<Compile Remove="DatabaseModels\DdbTurniSummary.cs" />
<Compile Remove="DatabaseModels\DdbTurniSummaryNew.cs" />
<Compile Remove="DatabaseModels\Ecp.cs" />
<Compile Remove="DatabaseModels\Ecp1.cs" />
<Compile Remove="DatabaseModels\Kit.cs" />
<Compile Remove="DatabaseModels\Odl.cs" />
<Compile Remove="DatabaseModels\Odl1.cs" />
<Compile Remove="DatabaseModels\R.cs" />
<Compile Remove="DatabaseModels\R1.cs" />
<Compile Remove="DatabaseModels\Rc.cs" />
<Compile Remove="DatabaseModels\Tally.cs" />
<Compile Remove="DatabaseModels\Tcr.cs" />
<Compile Remove="DatabaseModels\Tcr1.cs" />
<Compile Remove="DatabaseModels\TcrDay.cs" />
<Compile Remove="DatabaseModels\TcrDayTest.cs" />
<Compile Remove="DatabaseModels\TcStat.cs" />
<Compile Remove="DatabaseModels\TestJason.cs" />
<Compile Remove="DatabaseModels\Ul.cs" />
<Compile Remove="DatabaseModels\VDdb.cs" />
<Compile Remove="DatabaseModels\VDdbLight.cs" />
<Compile Remove="DatabaseModels\VDdbLightOld.cs" />
<Compile Remove="DatabaseModels\VDdbTurni.cs" />
<Compile Remove="DatabaseModels\VEcp.cs" />
<Compile Remove="DatabaseModels\VEcp1.cs" />
<Compile Remove="DatabaseModels\VEcpExtended.cs" />
<Compile Remove="DatabaseModels\VetoTc.cs" />
<Compile Remove="DatabaseModels\VKit.cs" />
<Compile Remove="DatabaseModels\VOdl.cs" />
<Compile Remove="DatabaseModels\VOdl1.cs" />
<Compile Remove="DatabaseModels\VPodlNonChiusi.cs" />
<Compile Remove="DatabaseModels\VR1.cs" />
<Compile Remove="DatabaseModels\VTcr.cs" />
<Compile Remove="DatabaseModels\VTcr1.cs" />
<Compile Remove="DatabaseModels\VTcrDay.cs" />
<Compile Remove="DatabaseModels\VTcStat.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog" Version="4.7.10" />
</ItemGroup>
</Project>
File diff suppressed because it is too large Load Diff
-23
View File
@@ -1,23 +0,0 @@
# Appunti gestione MP-STAT DB
Per la gestione dell'accesso al DB statistiche si opera con EFCore --> apop blazor server
## Scaffolding DB iniziale
Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels
## Scaffolding SOLO di tabelle/viste selezionate (con force update)
Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels -Tables v_RS, v_TC_Stat, v_TCR, v_TCR_Day, v_UL
## Approfondimenti
Qualche link di approfondimento:
- https://docs.microsoft.com/en-us/ef/core/
- https://docs.microsoft.com/en-us/ef/core/extensions/
- https://www.entityframeworktutorial.net/efcore/create-model-for-existing-database-in-ef-core.aspx
- https://entityframework.net/ef-code-first
-12
View File
@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data
{
public class StatsDbContext
{
}
}