fix salvataggio con reinit obj

This commit is contained in:
Samuele Locatelli
2023-04-17 15:37:33 +02:00
parent 67549e8bb3
commit 4ed79e89f7
3 changed files with 11 additions and 4 deletions
+8 -2
View File
@@ -12,7 +12,7 @@ namespace WebDoorCreator.Data.DTO
[Serializable]
public class DDFDto
{
public DDFDto()
public DDFDto()
{ }
public bool produce { get; set; } = false;
@@ -24,7 +24,7 @@ namespace WebDoorCreator.Data.DTO
public DateTime date { get; set; } = DateTime.Now;
public string piece { get; set; } = "DO_1";
public Sizing sizing { get; set; } = new Sizing();
public Opening swing { get; set; } = new Opening();
public string secure { get; set; } = "UP";
@@ -58,6 +58,12 @@ namespace WebDoorCreator.Data.DTO
try
{
var rawdata = GetYaml();
// elimino eventuale vecchio file...
if (File.Exists(filePath))
{
File.Delete(filePath);
}
// scrivo!
File.WriteAllText(filePath, rawdata);
answ = true;
}
@@ -69,6 +69,7 @@ namespace WebDoorCreator.UI.Components.Buttons
var listOp = await WDCService.DoorOpGetByDoorId(DoorId);
if (listOp != null)
{
dictDoorOP = new Dictionary<string, Dictionary<string, string>>();
listDoorOp = listOp;
foreach (var item in listDoorOp)
{
+2 -2
View File
@@ -7,7 +7,7 @@ order:
project: ''
pO: ''
line: ''
date: 2023-04-17T15:28:23.2220415+02:00
date: 2023-04-17T15:36:56.5017349+02:00
piece: DO_1
sizing:
width: 33.8125
@@ -58,7 +58,7 @@ doorOps:
50013: 0.0
side-refer from: lock_top/Lock-Top
50074:
Folder: Generic_Mortise
Folder: Generic Conceiled
Template: Generic_Conceiled\StdConHingeFaceR.lua
50036: 4.875
50014: 0.125