fix nome file per insert list value
This commit is contained in:
@@ -5,6 +5,7 @@ using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
using System.Diagnostics;
|
||||
using System.Security.AccessControl;
|
||||
using WebDoorCreator.Core;
|
||||
using WebDoorCreator.Data.Controllers;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
@@ -550,9 +551,22 @@ namespace WebDoorCreator.UI.Data
|
||||
foreach (string dir in dirs)
|
||||
{
|
||||
int ordin = 1;
|
||||
string compoCode = "";
|
||||
string[] templateDirectories = Directory.GetDirectories(dir);
|
||||
|
||||
string[] iniFiles = Directory.GetFiles(dir, "Config.ini");
|
||||
|
||||
|
||||
foreach (string templateDirectory in templateDirectories)
|
||||
{
|
||||
foreach (var file in iniFiles)
|
||||
{
|
||||
List<string> lines = File.ReadAllLines(file).ToList();
|
||||
IniFile fIni = new IniFile(file);
|
||||
|
||||
var compoName = fIni.ReadString("Compo", "Name", "COMPONAME");
|
||||
compoCode = compoName.Split("/")[1];
|
||||
}
|
||||
string[] templateFiles = Directory.GetFiles(templateDirectory);
|
||||
foreach (string templateFile in templateFiles)
|
||||
{
|
||||
@@ -561,7 +575,7 @@ namespace WebDoorCreator.UI.Data
|
||||
|
||||
ListValuesTempModel temp = new ListValuesTempModel()
|
||||
{
|
||||
TableName = $"{tName[tName.Length - 1]} {tName[tName.Length - 2]}",
|
||||
TableName = $"{tName[tName.Length - 1]}_{compoCode}".Replace(" ", "_"),
|
||||
FieldName = "Compo",
|
||||
value = Path.GetFileName(templateFile),
|
||||
label = Path.GetFileName(templateFile).Split(".")[0],
|
||||
|
||||
Reference in New Issue
Block a user