Merge branch 'release/AddDataLayerProj_01'

This commit is contained in:
Samuele Locatelli
2025-06-18 17:38:08 +02:00
21 changed files with 1507 additions and 63 deletions
+335
View File
@@ -0,0 +1,335 @@
#--------------------------------
# area generale
#--------------------------------
*.pdb
.vs/*
# ---> VisualStudio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# ---> C Sharp
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
+7
View File
@@ -0,0 +1,7 @@
namespace Lux.Core
{
public class Class1
{
}
}
+9
View File
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
+37
View File
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36203.30 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lux.Core", "Lux.Core.csproj", "{CCE87D58-1E6C-47B3-A28C-65BFCF5F1D0C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lux.Data", "..\Lux.Data\Lux.Data.csproj", "{9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "..\TestApp\TestApp.csproj", "{E94496AD-22BB-4443-9A81-11D19AFBE0A3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CCE87D58-1E6C-47B3-A28C-65BFCF5F1D0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCE87D58-1E6C-47B3-A28C-65BFCF5F1D0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCE87D58-1E6C-47B3-A28C-65BFCF5F1D0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCE87D58-1E6C-47B3-A28C-65BFCF5F1D0C}.Release|Any CPU.Build.0 = Release|Any CPU
{9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}.Release|Any CPU.Build.0 = Release|Any CPU
{E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {263E35AD-9F71-4286-B506-183163D91733}
EndGlobalSection
EndGlobal
+73
View File
@@ -0,0 +1,73 @@
using Lux.Data.DbModel;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lux.Data
{
public partial class AdminContext : DbContext
{
#region Private Fields
private IConfiguration _configuration;
#endregion Private Fields
#region Public Constructors
public AdminContext()
{
}
public AdminContext(IConfiguration configuration)
{
_configuration = configuration;
}
public AdminContext(DbContextOptions<AdminContext> options) : base(options)
{
}
#endregion Public Constructors
#region Public Properties
/// <summary>
/// User management
/// </summary>
public DbSet<UserPriv> UserList { get; set; }
#endregion Public Properties
#region Private Methods
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
#endregion Private Methods
#region Protected Methods
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
string connString = DbConfig.ADMIN_CONNECTION_STRING;
if (!optionsBuilder.IsConfigured)
{
var serverVersion = ServerVersion.AutoDetect(connString);
optionsBuilder.UseMySql(connString, serverVersion);
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<UserPriv>().HasKey(c => new { c.Host, c.User });
OnModelCreatingPartial(modelBuilder);
}
#endregion Protected Methods
}
}
+112
View File
@@ -0,0 +1,112 @@
using Lux.Data.DbModel;
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Lux.Data.Controllers
{
public class LuxController
{
// manca costruttore parametrico contoller...
#region Public Methods
public List<ArticoloModel> ArticoliGetAll()
{
List<ArticoloModel> dbResult = new List<ArticoloModel>();
//using (DataLayerContext dbCtx = new DataLayerContext(_configuration))
using (DataLayerContext dbCtx = new DataLayerContext())
{
try
{
dbResult = dbCtx
.DbSetArticolo
.ToList();
}
catch (Exception exc)
{
Log.Error($"Eccezione durante ArticoliGetAll{Environment.NewLine}{exc}");
}
}
return dbResult;
}
public List<ArticoloModel> ArticoliGetSearch(string term)
{
List<ArticoloModel> dbResult = new List<ArticoloModel>();
//using (DataLayerContext dbCtx = new DataLayerContext(_configuration))
using (DataLayerContext dbCtx = new DataLayerContext())
{
try
{
dbResult = dbCtx
.DbSetArticolo
.Where(x => x.Description.Contains(term))
.ToList();
}
catch (Exception exc)
{
Log.Error($"Eccezione durante ArticoliGetSearch{Environment.NewLine}{exc}");
}
}
return dbResult;
}
public bool ArticoliUpsert(ArticoloModel newRec)
{
bool answ = false;
//using (DataLayerContext dbCtx = new DataLayerContext(_configuration))
using (DataLayerContext dbCtx = new DataLayerContext())
{
try
{
var currRec = dbCtx
.DbSetArticolo
.Where(x => x.ArtID == newRec.ArtID)
.FirstOrDefault();
// se trovato --> aggiorno
if (currRec != null)
{
currRec.Description = newRec.Description;
currRec.CodFornitore = newRec.CodFornitore;
currRec.CodParl = newRec.CodParl;
currRec.CodArt = newRec.CodArt;
currRec.Cost = newRec.Cost;
currRec.Description = newRec.Description;
currRec.IsMake = newRec.IsMake;
currRec.IsService = newRec.IsService;
currRec.Margin = newRec.Margin;
dbCtx.Entry(currRec).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
}
// se mancasse --> aggiungo
else
{
dbCtx.DbSetArticolo.Add(newRec);
}
// salvo...
dbCtx.SaveChanges();
}
catch (Exception exc)
{
Log.Error($"Eccezione durante ArticoliGetSearch{Environment.NewLine}{exc}");
}
}
return answ; ;
}
#endregion Public Methods
#region Private Fields
private static IConfiguration _configuration;
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}
+63
View File
@@ -0,0 +1,63 @@
using Lux.Data.DbModel;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lux.Data
{
public partial class DataLayerContext: DbContext
{
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration;
public DataLayerContext()
{
}
public DataLayerContext(IConfiguration configuration)
{
_configuration = configuration;
}
public DataLayerContext(DbContextOptions<DataLayerContext> options) : base(options)
{
try
{
// se non ci fosse... crea o migra!
Database.Migrate();
}
catch (Exception exc)
{
Log.Error(exc, "Exception during context initialization 02");
}
}
public virtual DbSet<ArticoloModel> DbSetArticolo { get; set; }
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
// default
string connString = DbConfig.CONNECTION_STRING;
if (string.IsNullOrEmpty(connString))
{
connString = "Server=localhost;port=3306;database=Lux_000;uid=root;pwd=Egalware_24068!;sslmode=None;";
}
if (!optionsBuilder.IsConfigured)
{
var serverVersion = ServerVersion.AutoDetect(connString);
optionsBuilder.UseMySql(connString, serverVersion);
}
}
}
}
+92
View File
@@ -0,0 +1,92 @@
using Microsoft.EntityFrameworkCore;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lux.Data
{
public class DbAdmin : IDisposable
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
public DbAdmin()
{
}
#endregion Public Constructors
#region Public Methods
public static bool checkCreateUser(string username, string pwd)
{
bool answ = false;
using (AdminContext adbCtx = new AdminContext())
{
// ricerca utente...
var numUser = adbCtx
.UserList
.Where(x => x.User == username)
.ToList()
.Count;
if (numUser > 0)
{
answ = true;
}
if (!answ)
{
// creo utente
string sqlCommand = "FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlRaw(sqlCommand);
sqlCommand = $"CREATE USER '{username}'@'localhost' IDENTIFIED BY '{pwd}';";
adbCtx.Database.ExecuteSqlRaw(sqlCommand);
sqlCommand = $"GRANT ALL ON *.* TO '{username}'@'localhost';";
adbCtx.Database.ExecuteSqlRaw(sqlCommand);
sqlCommand = "FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlRaw(sqlCommand);
}
}
return answ;
}
#if false
public static async Task<bool> migrateDbIdentity()
{
bool answ = false;
using (UserIdentityDbContext dbCtx = new UserIdentityDbContext())
{
await dbCtx.Database.MigrateAsync();
answ = true;
}
return answ;
}
#endif
public static async Task<bool> migrateDbMain()
{
bool answ = false;
using (DataLayerContext dbCtx = new DataLayerContext())
{
await dbCtx.Database.MigrateAsync();
answ = true;
}
return answ;
}
public void Dispose()
{
}
#endregion Public Methods
}
}
+96
View File
@@ -0,0 +1,96 @@
using Microsoft.EntityFrameworkCore;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lux.Data
{
public class DbConfig
{
#region Public Fields
public static string DATABASE_NAME = "LUX";
public static int DATABASE_PROCESS_TIMEOUT = 5;
public static string DATABASE_PWD = "viadante16";
// Database config
public static string DATABASE_SERV = "127.0.0.1";
public static string DATABASE_USER = "Lux_User";
#endregion Public Fields
#region Public Properties
/// <summary>
/// DB Connection string per azioni amministrative
/// </summary>
public static string ADMIN_CONNECTION_STRING { get; set; } = "";
/// <summary>
/// DB Connection string
/// </summary>
public static string CONNECTION_STRING { get; set; } = "";
#endregion Public Properties
#region Public Methods
public static bool CheckUser(string nKey, string sKey)
{
// esecuzione script di install locale
return DbAdmin.checkCreateUser(DATABASE_USER, DATABASE_PWD);
}
#if false
public static bool ExecMigrationIdentity()
{
Log.Info($"ExecMigrationIdentity: Start");
// esecuzione migrazione
var migrateTask = Task.Run(async () => await DbAdmin.migrateDbIdentity());
migrateTask.Wait();
Log.Info($"ExecMigrationIdentity: Completed");
return migrateTask.Result;
}
#endif
public static bool ExecMigrationMain()
{
Log.Info($"ExecMigrationMain: Start");
// esecuzione migrazione
var migrateTask = Task.Run(async () => await DbAdmin.migrateDbMain());
migrateTask.Wait();
Log.Info($"ExecMigrationMain: Completed");
return migrateTask.Result;
}
public static void InitDb(string server, string nKey, string sKey)
{
DATABASE_SERV = server;
DATABASE_NAME = $"Lux_{nKey}";
DATABASE_USER = $"user_{nKey}";
DATABASE_PWD = $"pwd_{sKey}";
CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database={DATABASE_NAME};uid={DATABASE_USER};pwd={DATABASE_PWD};sslmode=None";
// stringa admin con utente root egalware...
ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=root;pwd=Egalware_24068!;sslmode=None";
}
public static ServerVersion MysqlServerVersion(string connString)
{
ServerVersion serverVersion = ServerVersion.AutoDetect(connString);
return serverVersion;
}
#endregion Public Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}
+66
View File
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lux.Data.DbModel
{
[Table("AnagArticoli")]
public class ArticoloModel
{
/// <summary>
/// ID dell'articolo
/// </summary>
[Key]
public int ArtID { get; set; }
/// <summary>
/// Definisce l'articolo come servizio vs concreto=materiale
/// </summary>
public bool IsService { get; set; } = false;
/// <summary>
/// Articolo di produzione (vs da acquisto)
/// </summary>
public bool IsMake { get; set; } = true;
/// <summary>
/// CodArticolo (opzionale) numerico
/// </summary>
public int CodArt { get; set; } = 0;
/// <summary>
/// CodArticolo (opzionale) string
/// </summary>
public string CodArtExt { get; set; } = "";
/// <summary>
/// Cod Parlante (opzionale) Articolo
/// </summary>
public string CodParl { get; set; } = "";
/// <summary>
/// Cod Fornitore (opzionale)
/// </summary>
public string CodFornitore { get; set; } = "";
/// <summary>
/// Descrizione
/// </summary>
public string Description { get; set; } = "";
/// <summary>
/// Costo (standard / senza listini)
/// </summary>
public double Cost { get; set; } = 0;
/// <summary>
/// Margine percentuale standard
/// </summary>
public double Margin { get; set; } = 0.1;
}
}
+26
View File
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lux.Data.DbModel
{
/// <summary>
/// Tabella dei USER di MySql
/// </summary>
[Table("user")]
public class UserPriv
{
#region Public Properties
[Column("Host", Order = 1)]
public string Host { get; set; } = "";
[Column("User", Order = 2)]
public string User { get; set; } = "";
#endregion Public Properties
}
}
+35
View File
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog" Version="5.5.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.3" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<Folder Include="Services\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lux.Core\Lux.Core.csproj" />
</ItemGroup>
</Project>
+65
View File
@@ -0,0 +1,65 @@
// <auto-generated />
using Lux.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Lux.Data.Migrations
{
[DbContext(typeof(DataLayerContext))]
[Migration("20250618143234_InitDb")]
partial class InitDb
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.17")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Lux.Data.DbModel.ArticoloModel", b =>
{
b.Property<int>("ArtID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ArtID"));
b.Property<int>("CodArt")
.HasColumnType("int");
b.Property<string>("CodArtExt")
.IsRequired()
.HasColumnType("longtext");
b.Property<decimal>("Cost")
.HasColumnType("decimal(65,30)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("IsMake")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsService")
.HasColumnType("tinyint(1)");
b.Property<double>("Margin")
.HasColumnType("double");
b.HasKey("ArtID");
b.ToTable("AnagArticoli");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,47 @@
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lux.Data.Migrations
{
/// <inheritdoc />
public partial class InitDb : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AnagArticoli",
columns: table => new
{
ArtID = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IsService = table.Column<bool>(type: "tinyint(1)", nullable: false),
IsMake = table.Column<bool>(type: "tinyint(1)", nullable: false),
CodArt = table.Column<int>(type: "int", nullable: false),
CodArtExt = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Cost = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
Margin = table.Column<double>(type: "double", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AnagArticoli", x => x.ArtID);
})
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AnagArticoli");
}
}
}
@@ -0,0 +1,73 @@
// <auto-generated />
using Lux.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Lux.Data.Migrations
{
[DbContext(typeof(DataLayerContext))]
[Migration("20250618143455_ModificaDefArticolo01")]
partial class ModificaDefArticolo01
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.17")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Lux.Data.DbModel.ArticoloModel", b =>
{
b.Property<int>("ArtID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ArtID"));
b.Property<int>("CodArt")
.HasColumnType("int");
b.Property<string>("CodArtExt")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("CodFornitore")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("CodParl")
.IsRequired()
.HasColumnType("longtext");
b.Property<double>("Cost")
.HasColumnType("double");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("IsMake")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsService")
.HasColumnType("tinyint(1)");
b.Property<double>("Margin")
.HasColumnType("double");
b.HasKey("ArtID");
b.ToTable("AnagArticoli");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,56 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lux.Data.Migrations
{
/// <inheritdoc />
public partial class ModificaDefArticolo01 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "Cost",
table: "AnagArticoli",
type: "double",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(65,30)");
migrationBuilder.AddColumn<string>(
name: "CodFornitore",
table: "AnagArticoli",
type: "longtext",
nullable: false)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "CodParl",
table: "AnagArticoli",
type: "longtext",
nullable: false)
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CodFornitore",
table: "AnagArticoli");
migrationBuilder.DropColumn(
name: "CodParl",
table: "AnagArticoli");
migrationBuilder.AlterColumn<decimal>(
name: "Cost",
table: "AnagArticoli",
type: "decimal(65,30)",
nullable: false,
oldClrType: typeof(double),
oldType: "double");
}
}
}
@@ -0,0 +1,70 @@
// <auto-generated />
using Lux.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Lux.Data.Migrations
{
[DbContext(typeof(DataLayerContext))]
partial class DataLayerContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.17")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Lux.Data.DbModel.ArticoloModel", b =>
{
b.Property<int>("ArtID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ArtID"));
b.Property<int>("CodArt")
.HasColumnType("int");
b.Property<string>("CodArtExt")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("CodFornitore")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("CodParl")
.IsRequired()
.HasColumnType("longtext");
b.Property<double>("Cost")
.HasColumnType("double");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("IsMake")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsService")
.HasColumnType("tinyint(1)");
b.Property<double>("Margin")
.HasColumnType("double");
b.HasKey("ArtID");
b.ToTable("AnagArticoli");
});
#pragma warning restore 612, 618
}
}
}
+76
View File
@@ -0,0 +1,76 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lux.Data
{
public static class ModelBuilderExtensions
{
/// <summary>
/// Estensione per seed iniziale dei dati nel DB
/// </summary>
/// <param name="modelBuilder"></param>
public static void Seed(this ModelBuilder modelBuilder)
{
#if false
// inizializzazione dei valori di default x USER
modelBuilder.Entity<UserModel>().HasData(
new UserModel { UserId = 1, AuthKey = "th1sIsTh3R1vrOfThNgt98", Livello = UserLevel.SuperAdmin, MaskPlantId = 0, MaskSupplierId = 0, MaskTranspId = 0, UserName = "samuele.locatelli", Email = "samuele@steamware.net", Firstname = "Samuele", Lastname = "Locatelli" },
new UserModel { UserId = 2, AuthKey = "th1sIsTh3R1vrOfThNgt91", Livello = UserLevel.SuperAdmin, MaskPlantId = 0, MaskSupplierId = 0, MaskTranspId = 0, UserName = "giancarlo.rottoli", Email = "giancarlo@steamware.net", Firstname = "Giancarlo", Lastname = "Rottoli" },
new UserModel { UserId = 3, AuthKey = "th1sIsTh3R1vrOfThNgt93", Livello = UserLevel.SuperAdmin, MaskPlantId = 0, MaskSupplierId = 0, MaskTranspId = 0, UserName = "steamw.admin", Email = "info@steamware.net", Firstname = "Steamware", Lastname = "Admin" },
new UserModel { UserId = 4, AuthKey = "th1sIsTh3R1vrOfThNgt97", Livello = UserLevel.Admin, MaskPlantId = 0, MaskSupplierId = 0, MaskTranspId = 0, UserName = "angelo.pizzaferri", Email = "a.pizzaferri@pizzaferripetroli.it", Firstname = "Angelo", Lastname = "Pizzaferri" },
new UserModel { UserId = 5, AuthKey = "th1sIsTh3R1vrOfThNgt99", Livello = UserLevel.Admin, MaskPlantId = 0, MaskSupplierId = 0, MaskTranspId = 0, UserName = "andrei.valeanu", Email = "andrei.valeanu@winnlab.it", Firstname = "Andrei", Lastname = "Valeanu" },
new UserModel { UserId = 6, AuthKey = "th1sIsTh3R1vrOfThNgt92", Livello = UserLevel.UserExt, MaskPlantId = 0, MaskSupplierId = 1, MaskTranspId = 0, UserName = "liquigas.user01", Email = "info@steamware.net", Firstname = "User", Lastname = "LIQUIGAS" },
new UserModel { UserId = 7, AuthKey = "th1sIsTh3R1vrOfThNgt94", Livello = UserLevel.UserExt, MaskPlantId = 0, MaskSupplierId = 2, MaskTranspId = 0, UserName = "vulkangas.user01", Email = "info@steamware.net", Firstname = "User", Lastname = "VULKANGAS" },
new UserModel { UserId = 8, AuthKey = "th1sIsTh3R1vrOfThNgt95", Livello = UserLevel.UserExt, MaskPlantId = 0, MaskSupplierId = 0, MaskTranspId = 1, UserName = "levorato.user01", Email = "info@steamware.net", Firstname = "User", Lastname = "LEVORATO" },
new UserModel { UserId = 9, AuthKey = "th1sIsTh3R1vrOfThNgt96", Livello = UserLevel.UserExt, MaskPlantId = 0, MaskSupplierId = 0, MaskTranspId = 2, UserName = "traffik.user01", Email = "info@steamware.net", Firstname = "User", Lastname = "TRAFFIK" },
new UserModel { UserId = 10, AuthKey = "th1sIsTh3R1vrOfThNgt96", Livello = UserLevel.User, MaskPlantId = 1, MaskSupplierId = 0, MaskTranspId = 0, UserName = "piz03.user01", Email = "info@steamware.net", Firstname = "Stazione", Lastname = "Collecchio" },
new UserModel { UserId = 11, AuthKey = "th1sIsTh3R1vrOfThNgt96", Livello = UserLevel.User, MaskPlantId = 2, MaskSupplierId = 0, MaskTranspId = 0, UserName = "piz04.user01", Email = "info@steamware.net", Firstname = "Stazione", Lastname = "Noceto" },
new UserModel { UserId = 12, AuthKey = "th1sIsTh3R1vrOfThNgt96", Livello = UserLevel.User, MaskPlantId = 3, MaskSupplierId = 0, MaskTranspId = 0, UserName = "piz05.user01", Email = "info@steamware.net", Firstname = "Stazione", Lastname = "Baganzola" },
new UserModel { UserId = 13, AuthKey = "th1sIsTh3R1vrOfThNgt96", Livello = UserLevel.User, MaskPlantId = 4, MaskSupplierId = 0, MaskTranspId = 0, UserName = "piz08.user01", Email = "info@steamware.net", Firstname = "Stazione", Lastname = "Pilastrello" }
);
#endif
//// inizializzazione dei valori di default x Plant
//modelBuilder.Entity<PlantDetailModel>().HasData(
// new PlantDetailModel { PlantId = 1, PlantCode = "PIZ03", PlantDesc = "Collecchio", LevelMax = 26000, LevelReorder = 15000, OrderQtyStd = 18000 },
// new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, LevelReorder = 15000, OrderQtyStd = 18000 },
// new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, LevelReorder = 15000, OrderQtyStd = 18000 },
// new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 26000, LevelReorder = 15000, OrderQtyStd = 18000 },
// new PlantDetailModel { PlantId = 5, PlantCode = "PIZ09", PlantDesc = "Guardamiglio", LevelMax = 26000, LevelReorder = 15000, OrderQtyStd = 18000 }
// // new PlantDetailModel { PlantId = 1, PlantCode = "PIZ03", PlantDesc = "Collecchio", LevelMax = 26000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
// //new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
// //new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
// //new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 26000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }
// );
//// inizializzazione dei valori di default x Fornitori
//modelBuilder.Entity<SupplierModel>().HasData(
// new SupplierModel { SupplierId = 1, SupplierCode = "LIQUIGAS", SupplierDesc = "Liquigas" },
// new SupplierModel { SupplierId = 2, SupplierCode = "VULKANGAS", SupplierDesc = "Vulkangas" }
// );
//// inizializzazione dei valori di default x Trasportatori
//modelBuilder.Entity<TransporterModel>().HasData(
// new TransporterModel { TransporterId = 1, TransporterCode = "LEVO", TransporterDesc = "Levorato" },
// new TransporterModel { TransporterId = 2, TransporterCode = "TRAF", TransporterDesc = "Traffik" }
// );
//// init consegne...
//modelBuilder.Entity<WeekPlanModel>().HasData(
// new WeekPlanModel { WeekPlanId = 1, DayNum = DayOfWeek.Monday, DeliveryHour = 20, Note = "18K", PlantId = 2, SupplierId = 1, TransporterId = 1 },
// new WeekPlanModel { WeekPlanId = 2, DayNum = DayOfWeek.Tuesday, DeliveryHour = 20, Note = "18K", PlantId = 2, SupplierId = 1, TransporterId = 1 },
// new WeekPlanModel { WeekPlanId = 3, DayNum = DayOfWeek.Wednesday, DeliveryHour = 20, Note = "18K", PlantId = 2, SupplierId = 1, TransporterId = 2 },
// new WeekPlanModel { WeekPlanId = 4, DayNum = DayOfWeek.Thursday, DeliveryHour = 15, Note = "9K", PlantId = 2, SupplierId = 1, TransporterId = 1 },
// new WeekPlanModel { WeekPlanId = 5, DayNum = DayOfWeek.Thursday, DeliveryHour = 20, Note = "18K", PlantId = 2, SupplierId = 1, TransporterId = 1 },
// new WeekPlanModel { WeekPlanId = 6, DayNum = DayOfWeek.Saturday, DeliveryHour = 20, Note = "18K", PlantId = 2, SupplierId = 1, TransporterId = 1 },
// new WeekPlanModel { WeekPlanId = 7, DayNum = DayOfWeek.Tuesday, DeliveryHour = 14, Note = "3K", PlantId = 3, SupplierId = 1, TransporterId = 1 },
// new WeekPlanModel { WeekPlanId = 8, DayNum = DayOfWeek.Tuesday, DeliveryHour = 15, Note = "15K", PlantId = 4, SupplierId = 1, TransporterId = 1 },
// new WeekPlanModel { WeekPlanId = 9, DayNum = DayOfWeek.Tuesday, DeliveryHour = 17, Note = "18K", PlantId = 1, SupplierId = 2, TransporterId = 2 }
// );
}
}
}
+121 -63
View File
@@ -1,93 +1,151 @@
# LUX
Progetto per la realizzazione del "MES dei Falegnami"; che deve gestire il flusso logistico almeno di
* produzione finestre e serramenti
* produzione porte ...
## To Do
- [ ] Completare la documentazione
- [ ] Setup repo agli sviluppatori
- [ ] Definizione struttura progetti
## Elementi della soluzione - Entità gestite
### Offerta
L'offerta è il primo documento che il cliente si trova a generare prima di realizzare un nuovo progetto.
Lofferta deve contenere riferimenti alle seguenti entità ARTICOLO:
* prodotti forniti (i serramenti)
* servizi forniti (installazione)
* accessori impliciti (certificazioni prodotto, )
* accessori opzionali
L'offerta è intestata ad una PERSONA (fisica o legale)
L'offerta avrà dei dati di testata (relativi alla persona di chi offre e di chi riceve) + dati di dettaglio di tutti gli ARTICOLI offerti + dei dati di reseconto in termini di
* tempi
* costi
indicati in modo analitico per ogni articolo (quantià * prezzo) + riassunti globalmente
L'offerta ha un termine di validità (STANDARD)
L'offerta è archiviata in un set informativo e può evolvere di stato o natura (offerta confermata vs ordine)
L'offerta di norma è generata dal cliente, ma può essere prodotta per suo conto da un AGENTE /mandatario/rivenditore, che è anche lui una persona con permessi speciali che può generare offerte per nome e conto.
Gli agenti costituiscono un criterio di ricerca e raggruppamento delle offerte per poter essere indivuate.
Gli agenti hanno un "listino" dato da
* prezzo a listino (aumentato...)
* prezzo standard proposto di vendita
* prezzo rock bottom minimo concesso
* costo effettivo aziendale (comprensivo di margini minimi, ricarichi, costi OH)
La valutazione degli agenti permette di classificarne l'efficienza in termini di% sulla differenza costo proposto/rockbottom e valutare se gestire la provvigione sulal abse di questo (step 2)
L'offerta ha uno stato
* aperta
* chiusa con ordine
* persa
Un offerta può essere modificata nel tempo.
Di un offerta teniamo sempre ultima versione + numero revisione (x tracciare numero modifiche ) + eventuale pdf dei documenti di ogni revisione (opzionale)
### PERSONA
La persona individua un soggetto fisico o giuridico destinatario di una operazione o un riferimento.
Avrà gli attributi per definire la sua natura in termini di ruoli ammessi tra
* cliente
* fornitore
in qudsto caso i dati fiscali di riferimento devono essere completi per la documentazione tecnico/economica e fiscale di goni offerta/commessa/ordine
Inoltre un tipo speciale di PERSONA è quello dell'utente applicativo distinto almeno dai seguenti ruoli
* utente interno standard
* agente
* responsabile/amministratore interno
## Getting started
### ARTICOLO
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Gli articoli possono essere distinti per
* fisico / servizio
* make / buy
* in caso di varianti fornitori articolo è 1 solo e gestiamo varianti fornitori come relazione esterna (con prezzo/quantità/tempi)
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
Gli articoli conterranno minimo i seguenti dati
* codice univoco interno
* descrizione
* codice fornitore (opzionale)
* codice parlante interno
* costo/prezzo (? listini esterni?)
* margine standard (per classe?)
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
Gli articoli saranno una classe di abse, estesa dalle tipologie specifiche con attributi (es dimensioni, tipologia, colore...) specifici opzionali
```
cd existing_repo
git remote add origin https://gitlab.steamware.net/etis/lux.git
git branch -M main
git push -uf origin main
```
### Composer
## Integrate with your tools
Il flusso di realizzazione di un offerta, dopo la fase di intestazione dell'offerta ad una persona, prevede di inserire 1-n articoli di diversa natura.
- [ ] [Set up project integrations](https://gitlab.steamware.net/etis/lux/-/settings/integrations)
Quelli in rivendita/servizi sono esplicità (quantità/costo)
## Collaborate with your team
Gli articoli più complessi e oggetto del progetto saranno inseriti con una procedura SPECIALE; che prevede di
* TIPO DI OFFERTA (x ora fissa a serramenti)
* selezionare 1-n attributi "generali" dell'offerta, ad esempio
* tipologia (legno, legno-alluminio, pvc)
* tipologia del vetro
* spessore del serramento
* ... tutti gli attributi sono bloccabili a livello di istanza o meno (x evitare sovrascritture da parte dell'offerta contenitore)
* selezione di un articolo DA TEMPLATE (da ragioanre se davvero articolo o un sotto oggetto)
* l'articolo da template è a tutti gli effetti una singola istanza (SALVATA) di un progetto di una finestra template con le informazioni necessarie e sufficienti a definirla completamente fino a tempi/costi
* questo articolo pò essere ricalcolato ogni giorno/settimana/... per essere valido come prima stima
* il tempalte può essere inserito con valori standard di impostazione e valori calcolati standard di prezzo/tempi x avere una prima stima dell'offerta
* l'elenco dei template è ovviametne estendibile da aprte dell'utente finale
* ogni istanza di finestra (comprensiva dei suoi dati di calcolo) deve essere salvata insieme ai vari file/json/set informativi di corredo, tracui
* json di progettazione
* json/xml di richiesta/risposta ferramenta
* json/csv di configurazione della BOM prevista dei vari componenti
* altri file o oggetti encessari alle fasi di offerta fornitore e/o calcolo effettivo in produzione
* l'insieme delle informazioni collezionate a livello di offerta sono poi oggetto di VALIDAZIONE in fase di conferma ordine prima della traduzione in termini di COMMESSA effettiva di lavoro.
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
## Test and Deploy
Use the built-in continuous integration in GitLab.
#### Template
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
Ogni template rappresenterà un intero serramento configurato.
Idealmente si parte SEMPRE da un template di fiestra definito.
I template di base (nell'ordine di una decina) saranno installati da noi con il sw, l'utente potrà modificarli e/o intergrare con nuovi.
***
Un template può essere salvata solo se valido (validato dal motore di calcolo).
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
### Engine
## Suggestions for a good README
CI saranno ALMENO 2 motori:
* engine completo che contiene il CAM e fa calcoli esatti
* eingine semplificato da browser (Threejs?)
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
questi 2 motori sono in grado di leggere entrambi il json di configurazione serramento (JWD = Json Windows Definition) e generare uno un modello completo e l'altro uno semplificato
## Name
Choose a self-explaining name for your project.
L'operatività di editing sarà fatta nel browser sul modello semplificato
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
Eventuali "equilibrismi" richiederanno valutazione/gestione con motore CAM.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
### BOM
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
### Cicli
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
#### Pezzo
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Version History
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
tabella versioni
+33
View File
@@ -0,0 +1,33 @@
// See https://aka.ms/new-console-template for more information
using Lux.Data.Controllers;
Console.WriteLine("--------------");
Console.WriteLine("Lux DB test");
Console.WriteLine("--------------");
LuxController lControl = new LuxController();
var listRec = lControl.ArticoliGetAll();
foreach (var item in listRec)
{
Console.WriteLine($"{item.ArtID} | {item.Description} | {item.Cost}");
}
Console.WriteLine("--------------");
string? search = "-";
while (!string.IsNullOrEmpty(search))
{
Console.WriteLine("inserire una ricerca, enter per chiudere");
search = Console.ReadLine();
listRec = lControl.ArticoliGetSearch($"{search}");
foreach (var item in listRec)
{
Console.WriteLine($"{item.ArtID} | {item.Description} | {item.Cost}");
}
}
Console.WriteLine("Premere un tasto per chiudere");
Console.ReadLine();
+15
View File
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Lux.Core\Lux.Core.csproj" />
<ProjectReference Include="..\Lux.Data\Lux.Data.csproj" />
</ItemGroup>
</Project>