Files
2023-07-26 19:06:50 +02:00

348 lines
11 KiB
C#

using System;
using System.Collections.Generic;
using System.Xml.Serialization;
namespace IOB_UT_NEXT.DataModel
{
public class Fimat
{
#region Public Classes
[XmlRoot(ElementName = "A_Recipe")]
public class ARecipe
{
#region Public Properties
[XmlElement(ElementName = "ColRecipe")]
public List<ColRecipe> ColRecipe { get; set; }
[XmlElement(ElementName = "DesRecipe")]
public DesRecipe DesRecipe { get; set; }
[XmlAttribute(AttributeName = "noNamespaceSchemaLocation")]
public string NoNamespaceSchemaLocation { get; set; }
[XmlText]
public string Text { get; set; }
[XmlAttribute(AttributeName = "xsi")]
public string Xsi { get; set; }
#endregion Public Properties
}
[XmlRoot(ElementName = "ColData")]
public class ColData
{
#region Public Properties
[XmlElement(ElementName = "ColourCode")]
public string ColourCode { get; set; }
[XmlElement(ElementName = "CompNumber")]
public int CompNumber { get; set; }
[XmlElement(ElementName = "Cost")]
public double Cost { get; set; }
[XmlElement(ElementName = "Date")]
public string Date { get; set; }
[XmlElement(ElementName = "Description")]
public string Description { get; set; }
[XmlElement(ElementName = "DosDuration")]
public int DosDuration { get; set; }
[XmlElement(ElementName = "DosError")]
public string DosError { get; set; }
[XmlElement(ElementName = "DosNote")]
public string DosNote { get; set; }
[XmlElement(ElementName = "Origin")]
public string Origin { get; set; }
[XmlElement(ElementName = "PartsPerc")]
public double PartsPerc { get; set; }
[XmlElement(ElementName = "PartsWeight")]
public double PartsWeight { get; set; }
[XmlElement(ElementName = "TypComp")]
public string TypComp { get; set; }
[XmlElement(ElementName = "Weight-gr")]
public double Weightgr { get; set; }
[XmlElement(ElementName = "Weight-gr-dosed")]
public double Weightgrdosed { get; set; }
[XmlElement(ElementName = "Weight-gr-prev")]
public double Weightgrprev { get; set; }
[XmlElement(ElementName = "Weight-gr-total")]
public double Weightgrtotal { get; set; }
#endregion Public Properties
}
[XmlRoot(ElementName = "ColRecipe")]
public class ColRecipe
{
#region Public Properties
[XmlElement(ElementName = "ColData")]
public ColData ColData { get; set; }
#endregion Public Properties
}
/// <summary>
/// Record consumo componente x rendiconto settimanale
/// </summary>
public class ConsRec
{
#region Public Properties
public string FileRef { get; set; } = "";
public string ColourCode { get; set; } = "";
public string Description { get; set; } = "";
public DateTime DtRif { get; set; } = DateTime.Now;
public double WeightGrTot { get; set; } = 0;
#endregion Public Properties
}
/// <summary>
/// Record consumo componente x rendiconto settimanale
/// </summary>
public class ConsOut
{
#region Public Properties
public string CodMag { get; set; } = "";
public string ColourCode { get; set; } = "";
public string Description { get; set; } = "";
public string UM { get; set; } = "";
public double WeightKgProc { get; set; } = 0;
public DateTime DtRif { get; set; } = DateTime.Now;
//public string FileRef { get; set; } = "";
#endregion Public Properties
}
/// <summary>
/// Record info sul periodo indicato
/// </summary>
public class PeriodInfo
{
#region Public Properties
public int NumFilesReceived { get; set; } = 0;
public string CurrStatus { get; set; } = "";
public Dictionary<string, string> ActionList { get; set; } = new Dictionary<string, string>();
#endregion Public Properties
}
/// <summary>
/// Configurazione x conversioni dati
/// </summary>
public class ConvSetup
{
/// <summary>
/// Inclusione o meno dell'header in file CSV
/// </summary>
public bool addHeader { get; set; } = false;
/// <summary>
/// Numero cifre decimale x arrotondamento
/// </summary>
public int numDec { get; set; } = 3;
/// <summary>
/// CodMagazzino
/// </summary>
public string codMag { get; set; } = "";
/// <summary>
/// Modalità export:
/// csv / FixWidth
/// </summary>
public string mode { get; set; } = "";
/// <summary>
/// Rapporti di conversione x gli item indicati
/// </summary>
public Dictionary<string, double> convRatio { get; set; } = new Dictionary<string, double>();
/// <summary>
/// Lunghezza fissa campi
/// </summary>
public Dictionary<string, int> fieldLength { get; set; } = new Dictionary<string, int>();
/// <summary>
/// Numero decimali campo
/// </summary>
public Dictionary<string, int> fieldNDec { get; set; } = new Dictionary<string, int>();
/// <summary>
/// Padding left (OVE necessari)
/// </summary>
public Dictionary<string, char> fieldLPad { get; set; } = new Dictionary<string, char>();
}
[XmlRoot(ElementName = "DesData")]
public class DesData
{
#region Public Properties
[XmlElement(ElementName = "Article")]
public string Article { get; set; }
[XmlElement(ElementName = "CustDrumCode")]
public string CustDrumCode { get; set; }
[XmlElement(ElementName = "Customer")]
public string Customer { get; set; }
[XmlElement(ElementName = "Date")]
public string Date { get; set; }
[XmlElement(ElementName = "Design")]
public string Design { get; set; }
[XmlElement(ElementName = "DosDuration")]
public int DosDuration { get; set; }
[XmlElement(ElementName = "DosedLine")]
public int DosedLine { get; set; }
[XmlElement(ElementName = "DosType")]
public string DosType { get; set; }
[XmlElement(ElementName = "DrumCode")]
public string DrumCode { get; set; }
[XmlElement(ElementName = "DrumInitialWeightKG")]
public double DrumInitialWeightKG { get; set; }
[XmlElement(ElementName = "DrumTag")]
public int DrumTag { get; set; }
[XmlElement(ElementName = "DrumType")]
public int DrumType { get; set; }
[XmlElement(ElementName = "Info1")]
public string Info1 { get; set; }
[XmlElement(ElementName = "Info2")]
public string Info2 { get; set; }
[XmlElement(ElementName = "Info3")]
public string Info3 { get; set; }
[XmlElement(ElementName = "Info4")]
public string Info4 { get; set; }
[XmlElement(ElementName = "Info5")]
public string Info5 { get; set; }
[XmlElement(ElementName = "Info6")]
public string Info6 { get; set; }
[XmlElement(ElementName = "Info7")]
public string Info7 { get; set; }
[XmlElement(ElementName = "Info8")]
public string Info8 { get; set; }
[XmlElement(ElementName = "Info9")]
public string Info9 { get; set; }
[XmlElement(ElementName = "LotID")]
public string LotID { get; set; }
[XmlElement(ElementName = "Note1")]
public string Note1 { get; set; }
[XmlElement(ElementName = "Note2")]
public string Note2 { get; set; }
[XmlElement(ElementName = "OrderCode")]
public string OrderCode { get; set; }
[XmlElement(ElementName = "Prio")]
public string Prio { get; set; }
[XmlElement(ElementName = "Quantity-kg")]
public double Quantitykg { get; set; }
[XmlElement(ElementName = "Quantity-kg-dosed")]
public double Quantitykgdosed { get; set; }
[XmlElement(ElementName = "RecipeStatus")]
public string RecipeStatus { get; set; }
[XmlElement(ElementName = "RecipeType")]
public string RecipeType { get; set; }
[XmlElement(ElementName = "RecName")]
public string RecName { get; set; }
[XmlElement(ElementName = "ReqType")]
public string ReqType { get; set; }
[XmlElement(ElementName = "Screen")]
public string Screen { get; set; }
[XmlElement(ElementName = "Sequence")]
public int Sequence { get; set; }
[XmlElement(ElementName = "SequenceTot")]
public int SequenceTot { get; set; }
[XmlElement(ElementName = "Series")]
public int Series { get; set; }
[XmlElement(ElementName = "ServiceType")]
public string ServiceType { get; set; }
[XmlElement(ElementName = "SplitCurrent")]
public int SplitCurrent { get; set; }
[XmlElement(ElementName = "SplitTotal")]
public int SplitTotal { get; set; }
[XmlElement(ElementName = "Taglio-D")]
public double TaglioD { get; set; }
[XmlElement(ElementName = "Taglio-N")]
public double TaglioN { get; set; }
[XmlElement(ElementName = "UM")]
public int UM { get; set; }
[XmlElement(ElementName = "Variant")]
public string Variant { get; set; }
[XmlElement(ElementName = "ViscoName")]
public string ViscoName { get; set; }
[XmlElement(ElementName = "ViscoValue")]
public double ViscoValue { get; set; }
#endregion Public Properties
}
[XmlRoot(ElementName = "DesRecipe")]
public class DesRecipe
{
#region Public Properties
[XmlElement(ElementName = "DesData")]
public DesData DesData { get; set; }
#endregion Public Properties
}
#endregion Public Classes
}
}