2021-05-27 15:30:04 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
using Common;
|
|
|
|
|
|
using SharedDatabase.Resources;
|
2021-05-27 15:30:04 +00:00
|
|
|
|
|
|
|
|
|
|
namespace SharedDatabase.Entities
|
|
|
|
|
|
{
|
2021-12-07 09:15:59 +00:00
|
|
|
|
public class OrderInfo : IParamsProvider, Common.IOrderInfo
|
2021-05-27 15:30:04 +00:00
|
|
|
|
{
|
2021-11-11 17:16:02 +00:00
|
|
|
|
public virtual int Id { get; protected set; }
|
|
|
|
|
|
public virtual string POName { get; set; } /// 0
|
|
|
|
|
|
public virtual sbyte POState { get; set; } /// 1 0=New, 1=Active, 2=Finished
|
|
|
|
|
|
public virtual string Workflow { get; set; } /// 2
|
|
|
|
|
|
public virtual string TestProcedure { get; set; } /// 3
|
|
|
|
|
|
public virtual string VariantCode { get; set; } /// 4
|
2021-12-14 13:58:18 +00:00
|
|
|
|
public virtual string VacoDescription { get; set; } /// 5
|
|
|
|
|
|
public virtual string MadeInText { get; set; } /// 6
|
2022-01-11 11:13:00 +00:00
|
|
|
|
public virtual int Year { get; set; } /// 7
|
|
|
|
|
|
public virtual string ModuleParam { get; set; } /// 8
|
|
|
|
|
|
public virtual string LaserMarking { get; set; } /// 9
|
|
|
|
|
|
public virtual string Packing { get; set; } /// 10
|
|
|
|
|
|
public virtual int PiecesCount { get; set; } /// 11
|
|
|
|
|
|
public virtual string SNPrefix { get; set; } /// 12
|
|
|
|
|
|
public virtual int SNFirst { get; set; } /// 13
|
|
|
|
|
|
public virtual int SNDigitsCount { get; set; } /// 14
|
|
|
|
|
|
public virtual string SNSuffix { get; set; } /// 15
|
|
|
|
|
|
public virtual string RAPrefix { get; set; } /// 16
|
|
|
|
|
|
public virtual int RAFirst { get; set; } /// 17
|
|
|
|
|
|
public virtual string RASuffix { get; set; } /// 18
|
|
|
|
|
|
public virtual string Remark { get; set; } /// 19
|
2021-11-11 17:16:02 +00:00
|
|
|
|
public virtual int BaseNr1 { get; set; }
|
|
|
|
|
|
public virtual int BaseNr2 { get; set; }
|
|
|
|
|
|
public virtual int BaseNr3 { get; set; }
|
|
|
|
|
|
public virtual int BaseNr4 { get; set; }
|
|
|
|
|
|
public virtual int BaseNr5 { get; set; }
|
2021-12-15 06:04:17 +00:00
|
|
|
|
public virtual int CurrentPcsCount { get; set; }
|
|
|
|
|
|
public virtual int CurrentSN { get; set; }
|
|
|
|
|
|
public virtual int CurrentRA { get; set; }
|
|
|
|
|
|
public virtual int CurrentNr1 { get; set; }
|
|
|
|
|
|
public virtual int CurrentNr2 { get; set; }
|
|
|
|
|
|
public virtual int CurrentNr3 { get; set; }
|
|
|
|
|
|
public virtual int CurrentNr4 { get; set; }
|
|
|
|
|
|
public virtual int CurrentNr5 { get; set; }
|
2021-05-27 15:30:04 +00:00
|
|
|
|
|
|
|
|
|
|
public OrderInfo()
|
2021-11-11 17:16:02 +00:00
|
|
|
|
{
|
|
|
|
|
|
POName = string.Empty;
|
|
|
|
|
|
InitializeAll();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public OrderInfo(string orderName)
|
2021-05-27 15:30:04 +00:00
|
|
|
|
{
|
2021-11-11 17:16:02 +00:00
|
|
|
|
POName = orderName;
|
|
|
|
|
|
InitializeAll();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual void InitializeAll()
|
|
|
|
|
|
{
|
2021-12-14 13:58:18 +00:00
|
|
|
|
POState = (sbyte)OrderState.New;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
Workflow = string.Empty;
|
|
|
|
|
|
TestProcedure = string.Empty;
|
|
|
|
|
|
VariantCode = string.Empty;
|
2021-12-14 13:58:18 +00:00
|
|
|
|
VacoDescription = string.Empty;
|
|
|
|
|
|
MadeInText = string.Empty;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
Year = DateTime.Now.Year;
|
2021-12-07 09:15:59 +00:00
|
|
|
|
ModuleParam = string.Empty;
|
2021-11-16 22:15:30 +00:00
|
|
|
|
LaserMarking = string.Empty;
|
2021-12-14 13:58:18 +00:00
|
|
|
|
Packing = string.Empty;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
SNPrefix = string.Empty;
|
|
|
|
|
|
SNSuffix = string.Empty;
|
|
|
|
|
|
RAPrefix = string.Empty;
|
|
|
|
|
|
RASuffix = string.Empty;
|
2021-05-27 15:30:04 +00:00
|
|
|
|
Remark = string.Empty;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual XmlSerializer GetSerializer() { return null; }
|
|
|
|
|
|
|
|
|
|
|
|
public virtual string ComponentName { get { return POName; } }
|
|
|
|
|
|
|
|
|
|
|
|
string[] paramNames = new string[]
|
|
|
|
|
|
{
|
|
|
|
|
|
Strings.Order,
|
|
|
|
|
|
Strings.State,
|
|
|
|
|
|
Strings.Workflow,
|
|
|
|
|
|
Strings.Test_procedure,
|
|
|
|
|
|
Strings.Variant_code,
|
2021-12-14 13:58:18 +00:00
|
|
|
|
Strings.Variant_description,
|
|
|
|
|
|
Strings.Made_in_text,
|
2022-01-11 11:13:00 +00:00
|
|
|
|
Strings.Year_of_calibration,
|
2021-12-07 09:15:59 +00:00
|
|
|
|
Strings.Module_parameter,
|
2021-11-16 22:15:30 +00:00
|
|
|
|
Strings.Laser_marking,
|
2021-12-14 13:58:18 +00:00
|
|
|
|
Strings.Packing,
|
2021-11-11 17:16:02 +00:00
|
|
|
|
Strings.Pieces_count,
|
|
|
|
|
|
Strings.Serial_nr + " " + Strings.prefix,
|
|
|
|
|
|
Strings.Serial_nr + " " + Strings.first,
|
|
|
|
|
|
Strings.Serial_nr + " " + Strings.digits_count,
|
|
|
|
|
|
Strings.Serial_nr + " " + Strings.suffix,
|
|
|
|
|
|
Strings.Radio_address + " " + Strings.prefix,
|
|
|
|
|
|
Strings.Radio_address + " " + Strings.first,
|
|
|
|
|
|
Strings.Radio_address + " " + Strings.suffix,
|
|
|
|
|
|
Strings.Remark,
|
|
|
|
|
|
};
|
|
|
|
|
|
public virtual string ParamName(int i) { return paramNames[i]; }
|
|
|
|
|
|
public virtual int ParamsCount() { return paramNames.Length; }
|
|
|
|
|
|
|
|
|
|
|
|
public virtual ICollection<string> ParamValues(int i)
|
|
|
|
|
|
{
|
|
|
|
|
|
var list = new List<string>();
|
2021-05-27 15:30:04 +00:00
|
|
|
|
|
2021-11-11 17:16:02 +00:00
|
|
|
|
switch (i)
|
|
|
|
|
|
{
|
2021-11-16 22:15:30 +00:00
|
|
|
|
case 1:
|
|
|
|
|
|
for (OrderState os = 0; os < OrderState.Count; os++) list.Add(os.ToString());
|
|
|
|
|
|
return list;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
default:
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual string ToString(int i)
|
|
|
|
|
|
{
|
|
|
|
|
|
switch (i)
|
|
|
|
|
|
{
|
2021-12-14 13:58:18 +00:00
|
|
|
|
case 0: return POName;
|
|
|
|
|
|
case 1: return ((OrderState)POState).ToString();
|
|
|
|
|
|
case 2: return Workflow;
|
|
|
|
|
|
case 3: return TestProcedure;
|
|
|
|
|
|
case 4: return VariantCode;
|
|
|
|
|
|
case 5: return VacoDescription;
|
|
|
|
|
|
case 6: return MadeInText;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 7: return Year.ToString();
|
|
|
|
|
|
case 8: return ModuleParam;
|
|
|
|
|
|
case 9: return LaserMarking;
|
|
|
|
|
|
case 10: return Packing;
|
|
|
|
|
|
case 11: return PiecesCount.ToString();
|
|
|
|
|
|
case 12: return SNPrefix;
|
|
|
|
|
|
case 13: return SNFirst.ToString();
|
|
|
|
|
|
case 14: return SNDigitsCount.ToString();
|
|
|
|
|
|
case 15: return SNSuffix;
|
|
|
|
|
|
case 16: return RAPrefix;
|
|
|
|
|
|
case 17: return RAFirst.ToString();
|
|
|
|
|
|
case 18: return RASuffix;
|
|
|
|
|
|
case 19: return Remark;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
default:
|
2021-12-15 06:04:17 +00:00
|
|
|
|
return string.Format("order={0} pcs={1} wflow={2} proc={3} vaco={4} remark={5}",
|
|
|
|
|
|
POName, PiecesCount, Workflow, TestProcedure, VariantCode, Remark);
|
2021-11-11 17:16:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual CfgUpdateFlags UpdateParam(int i, string str)
|
|
|
|
|
|
{
|
|
|
|
|
|
switch (i)
|
|
|
|
|
|
{
|
2021-12-14 13:58:18 +00:00
|
|
|
|
case 0: POName = str; break;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 1: POState = (sbyte)((str == OrderState.New.ToString()) ? OrderState.New :
|
|
|
|
|
|
(str == OrderState.Active.ToString()) ? OrderState.Active
|
|
|
|
|
|
: OrderState.Finished);
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 2: Workflow = str; break;
|
2021-12-14 13:58:18 +00:00
|
|
|
|
case 3: TestProcedure = str; break;
|
|
|
|
|
|
case 4: VariantCode = str; break;
|
|
|
|
|
|
case 5: VacoDescription = str; break;
|
|
|
|
|
|
case 6: MadeInText = str; break;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 7: Year = int.Parse(str); break;
|
|
|
|
|
|
case 8: ModuleParam = str; break;
|
|
|
|
|
|
case 9: LaserMarking = str; break;
|
|
|
|
|
|
case 10: Packing = str; break;
|
|
|
|
|
|
case 11: PiecesCount = int.Parse(str); break;
|
|
|
|
|
|
case 12: SNPrefix = str; break;
|
|
|
|
|
|
case 13: SNFirst = int.Parse(str); break;
|
|
|
|
|
|
case 14: SNDigitsCount = int.Parse(str); break;
|
|
|
|
|
|
case 15: SNSuffix = str; break;
|
|
|
|
|
|
case 16: RAPrefix = str; break;
|
|
|
|
|
|
case 17: RAFirst = int.Parse(str); break;
|
|
|
|
|
|
case 18: RASuffix = str; break;
|
|
|
|
|
|
case 19: Remark = str; break;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
default:
|
|
|
|
|
|
return CfgUpdateFlags.None;
|
|
|
|
|
|
}
|
2021-12-14 13:58:18 +00:00
|
|
|
|
|
|
|
|
|
|
return CfgUpdateFlags.RestartRqrd;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual bool ValidateParam(int i, string str, out string message)
|
2021-05-27 15:30:04 +00:00
|
|
|
|
{
|
2021-11-11 17:16:02 +00:00
|
|
|
|
message = string.Empty;
|
|
|
|
|
|
int idummy;
|
2022-03-10 22:14:56 +00:00
|
|
|
|
long ldummy;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
|
|
|
|
|
|
switch (i)
|
|
|
|
|
|
{
|
2021-12-14 13:58:18 +00:00
|
|
|
|
case 0: /// POName
|
2022-03-10 22:14:56 +00:00
|
|
|
|
if (str.Length < 1 || str.Length > 10)
|
2021-11-16 22:15:30 +00:00
|
|
|
|
{
|
2022-03-10 22:14:56 +00:00
|
|
|
|
message = string.Format("Order must have up to 10 digits");
|
2021-11-16 22:15:30 +00:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
2022-03-10 22:14:56 +00:00
|
|
|
|
else if (!long.TryParse(str, out ldummy) || ldummy <= 0)
|
2021-11-16 22:15:30 +00:00
|
|
|
|
{
|
2022-03-10 22:14:56 +00:00
|
|
|
|
message = string.Format("Order must be a positive integer number up to 9999999999");
|
2021-11-16 22:15:30 +00:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
return true;
|
2022-01-12 09:38:33 +00:00
|
|
|
|
case 1: /// POState
|
|
|
|
|
|
if (ParamValues(i).Contains(str)) return true;
|
|
|
|
|
|
break;
|
2021-12-14 13:58:18 +00:00
|
|
|
|
case 2: /// Workflow
|
|
|
|
|
|
case 3: /// TestProcedure
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 9: /// LaserMarking
|
|
|
|
|
|
case 10: /// Packing
|
2021-11-11 17:16:02 +00:00
|
|
|
|
/// nonempty string
|
|
|
|
|
|
if (!string.IsNullOrEmpty(str)) return true;
|
|
|
|
|
|
message = string.Format(Strings._0_should_not_be_empty, ParamName(i));
|
|
|
|
|
|
return false;
|
2021-12-14 13:58:18 +00:00
|
|
|
|
case 4: /// VariantCode
|
|
|
|
|
|
case 5: /// VacoDescription
|
|
|
|
|
|
case 6: /// MadeInText
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 8: /// ModuleParam
|
2021-12-07 09:15:59 +00:00
|
|
|
|
/// string (incl. an empty one)
|
|
|
|
|
|
if (str != null) return true;
|
|
|
|
|
|
message = string.Format("Should not be null", ParamName(i));
|
|
|
|
|
|
return false;
|
2022-01-12 09:38:33 +00:00
|
|
|
|
case 7: /// Year
|
|
|
|
|
|
if (int.TryParse(str, out idummy) && idummy > 2020 && idummy < 2099) return true;
|
2021-11-11 17:16:02 +00:00
|
|
|
|
break;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 11: /// PiecesCount
|
|
|
|
|
|
case 14: /// SNDigits
|
2021-11-16 22:15:30 +00:00
|
|
|
|
/// positive integers
|
|
|
|
|
|
if (int.TryParse(str, out idummy) && idummy > 0) return true;
|
|
|
|
|
|
break;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 12: /// SNPrefix
|
|
|
|
|
|
case 15: /// SNSuffix
|
|
|
|
|
|
case 16: /// RAPrefix
|
|
|
|
|
|
case 18: /// RASuffix
|
|
|
|
|
|
case 19: /// Remark
|
2021-11-11 17:16:02 +00:00
|
|
|
|
/// strings
|
|
|
|
|
|
return true;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
case 13: /// SNFirst
|
|
|
|
|
|
case 17: /// RAFirst
|
2021-11-11 17:16:02 +00:00
|
|
|
|
/// non-negative integer
|
|
|
|
|
|
if (int.TryParse(str, out idummy) && idummy >= 0) return true;
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
message = "Invalid index";
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message = string.Format(Strings.Invalid_0, ParamName(i));
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-10 22:14:56 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Copy content of one entity to another entity (except of Id)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="dest">Entity to copy to</param>
|
|
|
|
|
|
/// <param name="visibleOnly">true = do not copy invisible members</param>
|
|
|
|
|
|
public virtual void CopyContentTo(OrderInfo dest, bool visibleOnly = false)
|
2021-11-16 22:15:30 +00:00
|
|
|
|
{
|
|
|
|
|
|
dest.POName = POName;
|
|
|
|
|
|
dest.POState = POState;
|
|
|
|
|
|
dest.Workflow = Workflow;
|
|
|
|
|
|
dest.TestProcedure = TestProcedure;
|
|
|
|
|
|
dest.VariantCode = VariantCode;
|
2021-12-14 13:58:18 +00:00
|
|
|
|
dest.VacoDescription = VacoDescription;
|
|
|
|
|
|
dest.MadeInText = MadeInText;
|
2022-01-11 11:13:00 +00:00
|
|
|
|
dest.Year = Year;
|
2021-12-07 09:15:59 +00:00
|
|
|
|
dest.ModuleParam = ModuleParam;
|
2021-11-16 22:15:30 +00:00
|
|
|
|
dest.LaserMarking = LaserMarking;
|
2021-12-14 13:58:18 +00:00
|
|
|
|
dest.Packing = Packing;
|
2021-11-16 22:15:30 +00:00
|
|
|
|
dest.PiecesCount = PiecesCount;
|
|
|
|
|
|
dest.SNPrefix = SNPrefix;
|
|
|
|
|
|
dest.SNFirst = SNFirst;
|
|
|
|
|
|
dest.SNDigitsCount = SNDigitsCount;
|
|
|
|
|
|
dest.SNSuffix = SNSuffix;
|
|
|
|
|
|
dest.RAPrefix = RAPrefix;
|
|
|
|
|
|
dest.RAFirst = RAFirst;
|
|
|
|
|
|
dest.RASuffix = RASuffix;
|
2021-12-15 06:04:17 +00:00
|
|
|
|
dest.Remark = Remark;
|
2022-03-10 22:14:56 +00:00
|
|
|
|
|
|
|
|
|
|
if (!visibleOnly)
|
|
|
|
|
|
{
|
|
|
|
|
|
dest.BaseNr1 = BaseNr1;
|
|
|
|
|
|
dest.BaseNr2 = BaseNr2;
|
|
|
|
|
|
dest.BaseNr3 = BaseNr3;
|
|
|
|
|
|
dest.BaseNr4 = BaseNr4;
|
|
|
|
|
|
dest.BaseNr5 = BaseNr5;
|
|
|
|
|
|
dest.CurrentPcsCount = CurrentPcsCount;
|
|
|
|
|
|
dest.CurrentSN = CurrentSN;
|
|
|
|
|
|
dest.CurrentRA = CurrentRA;
|
|
|
|
|
|
dest.CurrentNr1 = CurrentNr1;
|
|
|
|
|
|
dest.CurrentNr2 = CurrentNr2;
|
|
|
|
|
|
dest.CurrentNr3 = CurrentNr3;
|
|
|
|
|
|
dest.CurrentNr4 = CurrentNr4;
|
|
|
|
|
|
dest.CurrentNr5 = CurrentNr5;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Compare content of two entities (except of Id)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="dest">Entity to compare with</param>
|
|
|
|
|
|
/// <param name="visibleOnly">true = do not compare invisible members</param>
|
|
|
|
|
|
/// <returns>true = two entities are equal (except of Id)</returns>
|
|
|
|
|
|
public virtual bool Equals(OrderInfo dest, bool visibleOnly = false)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (dest.POName != POName) return false;
|
|
|
|
|
|
if (dest.POState != POState) return false;
|
|
|
|
|
|
if (dest.Workflow != Workflow) return false;
|
|
|
|
|
|
if (dest.TestProcedure != TestProcedure) return false;
|
|
|
|
|
|
if (dest.VariantCode != VariantCode) return false;
|
|
|
|
|
|
if (dest.VacoDescription != VacoDescription) return false;
|
|
|
|
|
|
if (dest.MadeInText != MadeInText) return false;
|
|
|
|
|
|
if (dest.Year != Year) return false;
|
|
|
|
|
|
if (dest.ModuleParam != ModuleParam) return false;
|
|
|
|
|
|
if (dest.LaserMarking != LaserMarking) return false;
|
|
|
|
|
|
if (dest.Packing != Packing) return false;
|
|
|
|
|
|
if (dest.PiecesCount != PiecesCount) return false;
|
|
|
|
|
|
if (dest.SNPrefix != SNPrefix) return false;
|
|
|
|
|
|
if (dest.SNFirst != SNFirst) return false;
|
|
|
|
|
|
if (dest.SNDigitsCount != SNDigitsCount) return false;
|
|
|
|
|
|
if (dest.SNSuffix != SNSuffix) return false;
|
|
|
|
|
|
if (dest.RAPrefix != RAPrefix) return false;
|
|
|
|
|
|
if (dest.RAFirst != RAFirst) return false;
|
|
|
|
|
|
if (dest.RASuffix != RASuffix) return false;
|
|
|
|
|
|
if (dest.Remark != Remark) return false;
|
|
|
|
|
|
|
|
|
|
|
|
if (!visibleOnly)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (dest.BaseNr1 != BaseNr1) return false;
|
|
|
|
|
|
if (dest.BaseNr2 != BaseNr2) return false;
|
|
|
|
|
|
if (dest.BaseNr3 != BaseNr3) return false;
|
|
|
|
|
|
if (dest.BaseNr4 != BaseNr4) return false;
|
|
|
|
|
|
if (dest.BaseNr5 != BaseNr5) return false;
|
|
|
|
|
|
if (dest.CurrentPcsCount != CurrentPcsCount) return false;
|
|
|
|
|
|
if (dest.CurrentSN != CurrentSN) return false;
|
|
|
|
|
|
if (dest.CurrentRA != CurrentRA) return false;
|
|
|
|
|
|
if (dest.CurrentNr1 != CurrentNr1) return false;
|
|
|
|
|
|
if (dest.CurrentNr2 != CurrentNr2) return false;
|
|
|
|
|
|
if (dest.CurrentNr3 != CurrentNr3) return false;
|
|
|
|
|
|
if (dest.CurrentNr4 != CurrentNr4) return false;
|
|
|
|
|
|
if (dest.CurrentNr5 != CurrentNr5) return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
2021-11-16 22:15:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// All members are copied except of ID (so that NHibernate works properly).
|
|
|
|
|
|
/// List of groups is empty.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="newOrderNr">New order ID string</param>
|
|
|
|
|
|
/// <param name="targetPiecesCount">-1 = the same number of pieces as the original order</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public virtual IParamsProvider Clone()
|
|
|
|
|
|
{
|
|
|
|
|
|
OrderInfo clone = new OrderInfo();
|
|
|
|
|
|
CopyContentTo(clone);
|
|
|
|
|
|
return clone;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-11-11 17:16:02 +00:00
|
|
|
|
public virtual bool UpdateEmbeddedDbEntity()
|
|
|
|
|
|
{
|
|
|
|
|
|
return true; /// =OK, do nothing
|
2021-05-27 15:30:04 +00:00
|
|
|
|
}
|
2021-12-07 09:15:59 +00:00
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return POName;
|
|
|
|
|
|
}
|
2021-05-27 15:30:04 +00:00
|
|
|
|
}
|
2021-11-11 17:16:02 +00:00
|
|
|
|
|
|
|
|
|
|
public enum OrderState : sbyte
|
|
|
|
|
|
{
|
|
|
|
|
|
New = 0,
|
|
|
|
|
|
Active = 1,
|
|
|
|
|
|
Finished = 2,
|
2021-11-16 22:15:30 +00:00
|
|
|
|
Count
|
2021-11-11 17:16:02 +00:00
|
|
|
|
}
|
2021-05-27 15:30:04 +00:00
|
|
|
|
}
|