Ejemplo n.º 1
0
        private void AddNode(TreeNode parentNode, Unit parentUnit)
        {
            foreach (Unit u in parentUnit.ChildUnits)
            {
                TreeNode n = new TreeNode(u.Code + "-" + u.Name);
                parentNode.Nodes.Add(n);

                AddNode(n, u);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new Unit object.
 /// </summary>
 /// <param name="unitID">Initial value of the UnitID property.</param>
 /// <param name="code">Initial value of the Code property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="deleted">Initial value of the Deleted property.</param>
 public static Unit CreateUnit(global::System.Int32 unitID, global::System.String code, global::System.String name, global::System.Boolean deleted)
 {
     Unit unit = new Unit();
     unit.UnitID = unitID;
     unit.Code = code;
     unit.Name = name;
     unit.Deleted = deleted;
     return unit;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Units EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUnits(Unit unit)
 {
     base.AddObject("Units", unit);
 }