コード例 #1
0
 string CalculateAmountColor(CarLoadDocumentItem item)
 {
     if (item.Amount > item.AmountInStock)
         return "red";
     if(item.Equipment == null)
     {
         if (item.AmountInRouteList < item.AmountLoaded + item.Amount)
             return "orange";
         if (item.AmountInRouteList == item.AmountLoaded + item.Amount)
             return "green";
         if (item.AmountInRouteList > item.AmountLoaded + item.Amount)
             return "blue";
     }
     else
     {
         if (1 < item.AmountLoaded + item.Amount)
             return "orange";
         if (1 == item.AmountLoaded + item.Amount)
             return "green";
         if (1 > item.AmountLoaded + item.Amount)
             return "blue";
     }
     return "black";
 }
コード例 #2
0
 public virtual void AddItem(CarLoadDocumentItem item)
 {
     item.Document = this;
     ObservableItems.Add (item);
 }