void LoadOperation_ActionCompleted(object sender, EventArgs e)
        {
            ActionEntityList.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.action action in loadOperation.Entities)
            {
                ActionEntity actionEntity = new ActionEntity();
                actionEntity.Action = action;
                actionEntity.Update();
                ActionEntityList.Add(actionEntity);
            }
            UpdateRoleAndRoleAction();
        }
        public void LoadData()
        {
            IsBusy = true;
            systemManageDomainContext = new SystemManageDomainContext();
            systemManageDomainContext.PropertyChanged -= systemManageDomainContext_PropertyChanged;
            systemManageDomainContext.PropertyChanged += systemManageDomainContext_PropertyChanged;
            RootActionAndRoleActionEntity.ChildList.Clear();
            ActionAndRoleAnctionEntityDictionary.Clear();
            RoleEntityList.Clear();
            ActionEntityList.Clear();
            LoadOperation <ProductManager.Web.Model.action> loadOperationAction
                = systemManageDomainContext.Load <ProductManager.Web.Model.action>(systemManageDomainContext.GetActionQuery());

            loadOperationAction.Completed += LoadOperation_ActionCompleted;
        }
        void LoadOperation_ActionCompleted(object sender, EventArgs e)
        {
            ActionEntityList.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.action action in loadOperation.Entities)
            {
                ActionEntity actionEntity = new ActionEntity();
                actionEntity.Action = action;
                actionEntity.Update();
                ActionEntityList.Add(actionEntity);
            }

            /*LoadOperation<ProductManager.Web.Model.role> loadOperationRole
             *  = systemManageDomainContext.Load<ProductManager.Web.Model.role>(systemManageDomainContext.GetRoleQuery());
             * loadOperationRole.Completed += loadOperation_RoleCompleted;*/
            LoadOperation <ProductManager.Web.Model.department> loadOperationDepartment
                = systemManageDomainContext.Load <ProductManager.Web.Model.department>(systemManageDomainContext.GetDepartmentQuery());

            loadOperationDepartment.Completed += loadOperationDepartment_Completed;
        }
Exemple #4
0
 public void ClearList()
 {
     for (int i = NextLevelEntityList.Count - 1; i >= 0; i--)
     {
         NextLevelEntityList[i].Destroy();
     }
     for (int x = ActionEntityList.Count - 1; x >= 0; x--)
     {
         ActionEntityList[x].Destroy();
     }
     for (int z = BulletList.Count - 1; z >= 0; z--)
     {
         BulletList[z].Destroy();
     }
     for (int y = SignEntityList.Count - 1; y >= 0; y--)
     {
         SignEntityList[y].Destroy();
     }
     for (int g = EnemyCornerList.Count - 1; g >= 0; g--)
     {
         EnemyCornerList[g].Destroy();
     }
     for (int h = GroundEnemyList.Count - 1; h >= 0; h--)
     {
         GroundEnemyList[h].Destroy();
     }
     for (int o = EnemyBulletList.Count - 1; o >= 0; o--)
     {
         EnemyBulletList[o].Destroy();
     }
     NextLevelEntityList.Clear();
     ActionEntityList.Clear();
     BulletList.Clear();
     EnemyBulletList.Clear();
     GroundEnemyList.Clear();
     SignEntityList.Clear();
     EnemyCornerList.Clear();
 }