Пример #1
0
 public BatchModel(int id, int acceptableProducts, int defectProducts,
                   string timestampStart, string timestampEnd, string expirationDate, bool succeeded,
                   string performance, string quality, string availability, string oee,
                   int speed, int beerId, int machine, int?soldTo, bool recalled, string recipeName, string customerName)
 {
     Id = id;
     AcceptableProducts = acceptableProducts;
     DefectProducts     = defectProducts;
     TimestampStart     = timestampStart ?? throw new ArgumentNullException(nameof(timestampStart));
     TimestampEnd       = timestampEnd ?? throw new ArgumentNullException(nameof(timestampEnd));
     ExpirationDate     = expirationDate ?? throw new ArgumentNullException(nameof(expirationDate));
     Succeeded          = succeeded;
     Performance        = performance ?? throw new ArgumentNullException(nameof(performance));
     Quality            = quality ?? throw new ArgumentNullException(nameof(quality));
     Availability       = availability ?? throw new ArgumentNullException(nameof(availability));
     Oee              = oee ?? throw new ArgumentNullException(nameof(oee));
     Speed            = speed;
     BeerId           = beerId;
     Machine          = machine;
     SoldTo           = soldTo;
     Recalled         = recalled;
     RecipeName       = recipeName ?? throw new ArgumentNullException(nameof(recipeName));
     CustomerName     = customerName;
     ProducedProducts = AcceptableProducts + DefectProducts;
     Values           = new BatchValueCollection();
 }
Пример #2
0
 public void getValues()
 {
     Values = Singleton.Instance.DBManager.RetrieveBatchValues(Id);
 }