示例#1
0
文件: InventoryBO.cs 项目: ewin66/dev
 public bool checkIsAlreadyHaveAChild(Session session, Guid parentInventoryId)
 {
     NAS.DAL.Nomenclature.Inventory.Inventory parent = session.GetObjectByKey <NAS.DAL.Nomenclature.Inventory.Inventory>(parentInventoryId);
     if (parent.Inventorys != null && parent.Inventorys.Count == 1)
     {
         return(true);
     }
     return(false);
 }
示例#2
0
文件: InventoryBO.cs 项目: ewin66/dev
 //DND Duyet tu node con den node cha
 public void getParentInventoryTree(Session session, Guid startId, ref List <Guid> inventoryUnitIdList)
 {
     NAS.DAL.Nomenclature.Inventory.Inventory i = session.GetObjectByKey <NAS.DAL.Nomenclature.Inventory.Inventory>(startId);
     if (i != null && i.InventoryUnitId != null && i.InventoryUnitId.RowStatus > 0)
     {
         inventoryUnitIdList.Add(i.InventoryUnitId.InventoryUnitId);
         getParentInventoryTree(session, i.ParentInventoryId.InventoryId, ref inventoryUnitIdList);
     }
 }
示例#3
0
文件: InventoryBO.cs 项目: ewin66/dev
 //DND Duyet tu node cha xuong den node con
 public void getInventoryTree(Session session, Guid startId, ref List <Guid> inventoryUnitIdList)
 {
     NAS.DAL.Nomenclature.Inventory.Inventory root = session.GetObjectByKey <NAS.DAL.Nomenclature.Inventory.Inventory>(startId);
     if (root != null)
     {
         foreach (NAS.DAL.Nomenclature.Inventory.Inventory i in root.Inventorys)
         {
             if (i.InventoryUnitId.RowStatus > 0)
             {
                 inventoryUnitIdList.Add(i.InventoryUnitId.InventoryUnitId);
                 getInventoryTree(session, i.InventoryId, ref inventoryUnitIdList);
             }
         }
     }
 }