aggiunta gestione tipo di legno
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
{
|
||||
imgPath = $"images/LogoEgw{idxCount % 5:00}.png";
|
||||
idxCount++;
|
||||
<div class="col-3 py-1" @onclick="()=>editRec(door.DoorId)" style="cursor: pointer">
|
||||
<DoorSvgObj LineColor="#2D3047" LineWidth="8" ObjH="200" ObjW="650" ImagePath="@imgPath" ObjId="idxCount" TextData="@textDictSetup(door)"></DoorSvgObj>
|
||||
<div class="col-3 py-1">
|
||||
<DoorSvgObj LineColor="#2D3047" LineWidth="8" ObjH="200" ObjW="650" EC_ExeFunct="editRec" Message="@door.DoorId.ToString()" ImagePath="@imgPath" ObjId="idxCount" TextData="@textDictSetup(door)"></DoorSvgObj>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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<DoorModel> 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<List<DoorOpModel>> createDoorOps(string userId, List<ListValuesModel> listRecordEdge, List<ListValuesModel> listRecordSizing, List<ListValuesModel> listRecordSwing)
|
||||
{
|
||||
// conto le porte x questo ordine e uso x chiamata successiva...
|
||||
//var door4ord = await WDService.DoorGetByOrderId(idOrd);
|
||||
|
||||
List<DoorOpModel> listOp = new List<DoorOpModel>();
|
||||
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<string, Dictionary<string, List<string>>> itemsDictDef = new Dictionary<string, Dictionary<string, List<string>>>();
|
||||
Dictionary<string, Dictionary<string, string>> itemsDictAct = new Dictionary<string, Dictionary<string, string>>();
|
||||
Dictionary<string, List<string>> paramsDict = new Dictionary<string, List<string>>();
|
||||
Dictionary<string, string> actDict = new Dictionary<string, string>();
|
||||
List<string> listDefVal = new List<string>();
|
||||
List<string> listDefValCurrMach = new List<string>();
|
||||
List<string> listDefValOverMat = new List<string>();
|
||||
List<string> defaultParamsList = new List<string>();
|
||||
|
||||
#region Gestione sizing
|
||||
|
||||
if (listRecordSizing != null)
|
||||
{
|
||||
foreach (var item in listRecordSizing)
|
||||
{
|
||||
listDefVal = new List<string>() { 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<string>() { 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<int> 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<string>() { 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
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user