diff --git a/WebDoorCreator.UI/Components/DoorMan/DoorList.razor b/WebDoorCreator.UI/Components/DoorMan/DoorList.razor
index 4358fa1..b2b54c2 100644
--- a/WebDoorCreator.UI/Components/DoorMan/DoorList.razor
+++ b/WebDoorCreator.UI/Components/DoorMan/DoorList.razor
@@ -14,8 +14,8 @@
{
imgPath = $"images/LogoEgw{idxCount % 5:00}.png";
idxCount++;
-
editRec(door.DoorId)" style="cursor: pointer">
-
+
+
}
diff --git a/WebDoorCreator.UI/Components/DoorMan/DoorList.razor.cs b/WebDoorCreator.UI/Components/DoorMan/DoorList.razor.cs
index 264ecf5..950d1ed 100644
--- a/WebDoorCreator.UI/Components/DoorMan/DoorList.razor.cs
+++ b/WebDoorCreator.UI/Components/DoorMan/DoorList.razor.cs
@@ -60,10 +60,10 @@ namespace WebDoorCreator.UI.Components.DoorMan
await ReloadData();
}
- protected async void editRec(int doorId)
+ protected async Task editRec(string doorId)
{
await Task.Delay(1);
- NavManager.NavigateTo($"/DoorDefinition?idOrd={currOrderId}&idDoor={doorId}");
+ NavManager.NavigateTo($"/DoorDefinition?idOrd={currOrderId}&idDoor={int.Parse(doorId)}");
}
protected async Task getBackStatus()
diff --git a/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor.cs b/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor.cs
index d6547b6..7555d2f 100644
--- a/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor.cs
+++ b/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor.cs
@@ -33,6 +33,9 @@ namespace WebDoorCreator.UI.Components.SvgComp
[Parameter]
public string TextStyle { get; set; } = "font-size: 1.5em; fill: #000;";
+ [Parameter]
+ public string Message { get; set; } = "";
+
#endregion Public Properties
#region Protected Properties
@@ -61,7 +64,7 @@ namespace WebDoorCreator.UI.Components.SvgComp
protected void execFunc()
{
- EC_ExeFunct.InvokeAsync("");
+ EC_ExeFunct.InvokeAsync(Message);
}
protected override void OnParametersSet()
diff --git a/WebDoorCreator.UI/Data/WebDoorCreatorService.cs b/WebDoorCreator.UI/Data/WebDoorCreatorService.cs
index e75b54d..13627bf 100644
--- a/WebDoorCreator.UI/Data/WebDoorCreatorService.cs
+++ b/WebDoorCreator.UI/Data/WebDoorCreatorService.cs
@@ -176,6 +176,18 @@ namespace WebDoorCreator.UI.Data
IniFile fIniDef = new IniFile(DefaultFile[0]);
ListValuesTempModel listValObj = new ListValuesTempModel()
+ {
+ TableName = "WoodType",
+ FieldName = "DoorDef",
+ Value = "Wood Type",
+ Label = "Wood Type",
+ Ordinal = 1,
+ DefaultVal = "Maple, Oak, Pine, Birch, Walnut",
+ InputType = ""
+ };
+ listValues.Add(listValObj);
+
+ listValObj = new ListValuesTempModel()
{
TableName = "All",
FieldName = "OrderStep",
@@ -1614,248 +1626,6 @@ namespace WebDoorCreator.UI.Data
Log.Debug($"VocLemmaInsert in: {ts.TotalMilliseconds} ms");
return fatto;
}
-#if false
- protected string addDoor(List
door4ord, int idOrd, string currMeaUnit, string userId)
- {
- string answ = "";
- int numDoors = door4ord?.Count + 1 ?? 1;
- DateTime adesso = DateTime.Now;
- // creo una nuova porta...
- DoorModel newDoor = new DoorModel()
- {
- OrderId = idOrd,
- MeasureUnit = currMeaUnit,
- UserIdIns = userId,
- UserIdMod = userId,
- UserIdLock = userId,
- DateIns = adesso,
- DateMod = adesso,
- DateLockExpiry = adesso.AddHours(1),
- DoorDescript = $"ORD {idOrd} | Door {numDoors:00}",
- DoorExtCode = $"ORD {idOrd} | Ext Code --",
- Quantity = 1,
- UnitCost = 0,
- TypeId = 1
- };
- return answ;
- }
-#endif
-
-
-#if false
- protected async Task> createDoorOps(string userId, List listRecordEdge, List listRecordSizing, List listRecordSwing)
- {
- // conto le porte x questo ordine e uso x chiamata successiva...
- //var door4ord = await WDService.DoorGetByOrderId(idOrd);
-
- List listOp = new List();
- DateTime adesso = DateTime.Now;
- // aggiungo le lavorazioni standard...
- //var doorOpList = await WDService.DoorOpGetDefault();
- //var listRecordEdge = await WDService.ListValuesGetAll("Profiles", "DoorDef");
- //var listRecordSizing = await WDService.ListValuesGetAll("Size", "DoorDef");
- //var listRecordSwing = await WDService.ListValuesGetAll("Swing", "DoorDef");
- ListValuesModel? profCurrType = null;
- ListValuesModel? profCurrMach = null;
- ListValuesModel? profCurrOverMat = null;
- if (listRecordEdge != null)
- {
- profCurrType = listRecordEdge.Where(x => x.Value == "type").FirstOrDefault();
- profCurrMach = listRecordEdge.Where(x => x.Value == "machining").FirstOrDefault();
- profCurrOverMat = listRecordEdge.Where(x => x.Value == "overmaterial").FirstOrDefault();
- }
- Dictionary>> itemsDictDef = new Dictionary>>();
- Dictionary> itemsDictAct = new Dictionary>();
- Dictionary> paramsDict = new Dictionary>();
- Dictionary actDict = new Dictionary();
- List listDefVal = new List();
- List listDefValCurrMach = new List();
- List listDefValOverMat = new List();
- List defaultParamsList = new List();
-
- #region Gestione sizing
-
- if (listRecordSizing != null)
- {
- foreach (var item in listRecordSizing)
- {
- listDefVal = new List() { item.DefaultVal.Trim() };
- if (!actDict.ContainsKey(item.Value))
- {
- actDict.Add(item.Value, item.DefaultVal.Trim());
- paramsDict.Add(item.Value, listDefVal);
- }
- }
- itemsDictDef.Add("Size", paramsDict);
- itemsDictAct.Add("Size", actDict);
- //defaultParamsList.Add(listDefVal);
- }
- var jsonDef = JsonConvert.SerializeObject(itemsDictDef);
- var jsonAct = JsonConvert.SerializeObject(itemsDictAct);
-
- DoorOpModel doorOpToAdd = new DoorOpModel()
- {
- DateIns = adesso,
- DateMod = adesso,
- UserIdIns = userId,
- UserIdMod = userId,
- ObjectId = "Size",
- DoorId = doorId,
- JsoncConfigVal = jsonDef,
- JsoncActVal = jsonAct,
- userConfirm = userId,
- DtConfirm = adesso
- };
- listOp.Add(doorOpToAdd);
-
- #endregion Gestione sizing
-
- paramsDict.Clear();
- actDict.Clear();
- itemsDictDef.Clear();
- itemsDictAct.Clear();
- listDefVal.Clear();
- #region Gestione Swing
-
- if (listRecordSwing != null)
- {
- foreach (var item in listRecordSwing)
- {
- foreach (var param in item.DefaultVal.Split(","))
- {
- listDefVal.Add(param.Trim());
- if (!actDict.ContainsKey(item.Value))
- {
- actDict.Add(item.Value, item.DefaultVal.Trim().Split(",")[0]);
- paramsDict.Add(item.Value, listDefVal);
- }
- //itemsDict.Add(item.Value, paramsDict);
- //paramsDict.Clear();
-
- }
-
- //listDefVal = new List() { item.DefaultVal.Trim() };
-
- }
- itemsDictDef.Add("Swing", paramsDict);
- itemsDictAct.Add("Swing", actDict);
- //defaultParamsList.Add(listDefVal);
- }
- jsonDef = JsonConvert.SerializeObject(itemsDictDef);
- jsonAct = JsonConvert.SerializeObject(itemsDictAct);
-
- doorOpToAdd = new DoorOpModel()
- {
- DateIns = adesso,
- DateMod = adesso,
- UserIdIns = userId,
- UserIdMod = userId,
- ObjectId = "Swing",
- DoorId = doorId,
- JsoncConfigVal = jsonDef,
- JsoncActVal = jsonAct,
- userConfirm = userId,
- DtConfirm = adesso
- };
- listOp.Add(doorOpToAdd);
-
- #endregion Gestione Swing
-
- // salvo Door OP associate
- paramsDict.Clear();
- actDict.Clear();
- itemsDictDef.Clear();
- itemsDictAct.Clear();
-
- #region Gestione Profiles
-
- if (listRecordEdge != null)
- {
- listDefVal.Clear();
- if (profCurrType != null)
- {
- foreach (var param in profCurrType.DefaultVal.Split(","))
- {
- listDefVal.Add(param.Trim());
- if (!actDict.ContainsKey(profCurrType.Value))
- {
- actDict.Add(profCurrType.Value, param.Trim());
- paramsDict.Add(profCurrType.Value, listDefVal);
- //listDefVal.Clear();
- }
- //itemsDict.Add(item.Value, paramsDict);
- //paramsDict.Clear();
- }
- if (profCurrMach != null)
- {
- //listDefVal.Clear();
- foreach (var param in profCurrMach.DefaultVal.Split(","))
- {
- listDefValCurrMach.Add(param.Trim());
- if (!actDict.ContainsKey(profCurrMach.Value))
- {
- paramsDict.Add(profCurrMach.Value, listDefValCurrMach);
- actDict.Add(profCurrMach.Value, profCurrMach.DefaultVal.Trim().Split(",")[0]);
- //listDefVal.Clear();
- }
- //itemsDict.Add(item.Value, paramsDict);
- //paramsDict.Clear();
-
- }
- }
- if (profCurrOverMat != null)
- {
- //listDefVal.Clear();
- if (!paramsDict.ContainsKey(profCurrOverMat.Value))
- {
- listDefValOverMat.Add(profCurrOverMat.DefaultVal.Trim());
- paramsDict.Add(profCurrOverMat.Value, listDefValOverMat);
- actDict.Add(profCurrOverMat.Value, profCurrOverMat.DefaultVal.Trim());
- }
- }
- }
- foreach (var item in listRecordEdge.Where(x => x.Value != "type" && x.Value != "machining" && x.Value != "overmaterial"))
- {
- if (!itemsDictDef.ContainsKey(item.Value))
- {
- itemsDictDef.Add(item.Value, paramsDict);
- }
- if (!itemsDictAct.ContainsKey(item.Value))
- {
- itemsDictAct.Add(item.Value, actDict);
- }
- //defaultParamsList.Add(listDefVal);
- //defaultDict.Add(item.Label, listDefVal);
- }
- }
- //actDict.Add(HwToShow.TableName, actParamsList);
-
- jsonDef = JsonConvert.SerializeObject(itemsDictDef);
- jsonAct = JsonConvert.SerializeObject(itemsDictAct);
-
- doorOpToAdd = new DoorOpModel()
- {
- DateIns = adesso,
- DateMod = adesso,
- UserIdIns = userId,
- UserIdMod = userId,
- ObjectId = "Profiles",
- DoorId = doorId,
- JsoncConfigVal = jsonDef,
- JsoncActVal = jsonAct,
- userConfirm = userId,
- DtConfirm = adesso
- };
- listOp.Add(doorOpToAdd);
-
- #endregion Gestione Profiles
-
- // salvo Door OP associate
- await DoorOpInsert(doorId, listOp);
-
- return listOp;
- }
-#endif
public async Task createDoor(int idOrd, string userId, string currMeaUnit)
{
@@ -1890,6 +1660,7 @@ namespace WebDoorCreator.UI.Data
var listRecordEdge = await ListValuesGetAll("Profiles", "DoorDef");
var listRecordSizing = await ListValuesGetAll("Size", "DoorDef");
var listRecordSwing = await ListValuesGetAll("Swing", "DoorDef");
+ var listRecordWoodType = await ListValuesGetAll("WoodType", "DoorDef");
ListValuesModel? profCurrType = null;
ListValuesModel? profCurrMach = null;
ListValuesModel? profCurrOverMat = null;
@@ -1950,6 +1721,7 @@ namespace WebDoorCreator.UI.Data
itemsDictDef.Clear();
itemsDictAct.Clear();
listDefVal.Clear();
+
#region Gestione Swing
if (listRecordSwing != null)
@@ -1996,11 +1768,63 @@ namespace WebDoorCreator.UI.Data
#endregion Gestione Swing
- // salvo Door OP associate
paramsDict.Clear();
actDict.Clear();
itemsDictDef.Clear();
itemsDictAct.Clear();
+ listDefVal.Clear();
+
+ #region Gestione WoodType
+
+ if (listRecordWoodType != null)
+ {
+ foreach (var item in listRecordWoodType)
+ {
+ foreach (var param in item.DefaultVal.Split(","))
+ {
+ listDefVal.Add(param.Trim());
+ if (!actDict.ContainsKey(item.Value))
+ {
+ actDict.Add(item.Value, item.DefaultVal.Trim().Split(",")[0]);
+ paramsDict.Add(item.Value, listDefVal);
+ }
+ //itemsDict.Add(item.Value, paramsDict);
+ //paramsDict.Clear();
+
+ }
+
+ //listDefVal = new List() { item.DefaultVal.Trim() };
+
+ }
+ itemsDictDef.Add("WoodType", paramsDict);
+ itemsDictAct.Add("WoodType", actDict);
+ //defaultParamsList.Add(listDefVal);
+ }
+ jsonDef = JsonConvert.SerializeObject(itemsDictDef);
+ jsonAct = JsonConvert.SerializeObject(itemsDictAct);
+
+ doorOpToAdd = new DoorOpModel()
+ {
+ DateIns = adesso,
+ DateMod = adesso,
+ UserIdIns = userId,
+ UserIdMod = userId,
+ ObjectId = "WoodType",
+ DoorId = doorId,
+ JsoncConfigVal = jsonDef,
+ JsoncActVal = jsonAct,
+ userConfirm = userId,
+ DtConfirm = adesso
+ };
+ listOp.Add(doorOpToAdd);
+
+ #endregion Gestione WoodType
+
+ paramsDict.Clear();
+ actDict.Clear();
+ itemsDictDef.Clear();
+ itemsDictAct.Clear();
+ listDefVal.Clear();
#region Gestione Profiles
diff --git a/WebDoorCreator.UI/Pages/DoorDefinition.razor.cs b/WebDoorCreator.UI/Pages/DoorDefinition.razor.cs
index 5c76f11..a671834 100644
--- a/WebDoorCreator.UI/Pages/DoorDefinition.razor.cs
+++ b/WebDoorCreator.UI/Pages/DoorDefinition.razor.cs
@@ -103,7 +103,7 @@ namespace WebDoorCreator.UI.Pages
if (ListRecordDoorOp != null)
{
ListHwDoorOp = ListRecordDoorOp;
- ListBaseDoorOp = ListRecordDoorOp.Where(x => x.ObjectId == "Size" || x.ObjectId == "Profiles" || x.ObjectId == "Swing").ToList();
+ ListBaseDoorOp = ListRecordDoorOp.Where(x => x.ObjectId == "Size" || x.ObjectId == "Profiles" || x.ObjectId == "Swing" || x.ObjectId == "WoodType").ToList();
// calcolo gli hw togliendo DoorOpBase
foreach (var item in ListBaseDoorOp)
{