| 12345678910111213141516171819202122232425262728293031323334353637383940414243 | 
							- using System.Collections.Generic;
 
- using System.Linq;
 
- using InABox.Core;
 
- namespace Comal.Classes
 
- {
 
-     [UserTracking(typeof(Quote))]
 
-     public class KitFormula : Entity, IRemotable, IPersistent, ILicense<QuotesManagementLicense>
 
-     {
 
-         [EditorSequence(1)]
 
-         [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
 
-         public string Code { get; set; }
 
-         [EditorSequence(2)]
 
-         [TextBoxEditor]
 
-         public string Description { get; set; }
 
-         
 
-         [EditorSequence(3)]
 
-         [ExpressionEditor(null, typeof(KitFormulaExpressionGenerator))]
 
-         public virtual string Formula { get; set; }  
 
-         
 
-         private class KitFormulaExpressionGenerator : IExpressionModelGenerator
 
-         {
 
-             public List<string> GetVariables(object?[] items)
 
-             {
 
-                 var variables = new List<string>();
 
-                 var props = CoreUtils.PropertyList(typeof(QuoteCostSheetItem), x => true, true);
 
-                 foreach (var prop in props.Keys)
 
-                     variables.Add(prop);
 
-                 return variables;
 
-             }
 
-         }
 
-         public override string ToString()
 
-         {
 
-             return string.Format("{0}: {1}", Code, Description);
 
-         }
 
-         
 
-     }
 
-     
 
- }
 
 
  |