void loadOperationDepartment_Completed_Dictionary(object sender, EventArgs e)
        {
            //DepartmentEntityDictionary.Clear();
            DepartmentEntityList.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (department department in loadOperation.Entities)
            {
                DepartmentEntity departmentEntity = new DepartmentEntity();
                departmentEntity.Department = department;
                departmentEntity.Update();
                //DepartmentEntityDictionary.Add(departmentEntity.DepartmentID, departmentEntity);
                DepartmentEntityList.Add(departmentEntity);
            }

            DepartmentEntity departmentEntityZero = new DepartmentEntity();

            departmentEntityZero.DepartmentID   = 0;
            departmentEntityZero.DepartmentName = "请选择部门";
            DepartmentEntityList.Add(departmentEntityZero);

            LoadOperation <user> loadOperationUser =
                SystemManageDomainContext.Load <user>(SystemManageDomainContext.GetUserQuery());

            loadOperationUser.Completed += loadOperationUser_Completed;
        }
Esempio n. 2
0
        void loadOperationDepartment_Completed(object sender, EventArgs e)
        {
            DepartmemtList.Clear();
            DepartmentDictionary.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.department department in loadOperation.Entities)
            {
                DepartmentEntity departmentEntity = new DepartmentEntity();
                departmentEntity.Department = department;
                departmentEntity.Update();
                DepartmemtList.Add(departmentEntity);
                DepartmentDictionary.Add(departmentEntity.DepartmentID, departmentEntity);
            }
            DepartmentEntity departmentEntityZero = new DepartmentEntity();

            departmentEntityZero.DepartmentID   = 0;
            departmentEntityZero.DepartmentName = "请选择部门";
            DepartmemtList.Add(departmentEntityZero);
            UpdateChanged("DepartmemtList");

            LoadOperation <ProductManager.Web.Model.user> loadOperationDepartment =
                systemManageDomainContext.Load <ProductManager.Web.Model.user>(systemManageDomainContext.GetUserQuery());

            loadOperationDepartment.Completed += loadOperationUser_Completed;
        }
Esempio n. 3
0
        public void LoadData()
        {
            IsBusy = true;
            productDomainContext      = new ProductDomainContext();
            systemManageDomainContext = new SystemManageDomainContext();

            LoadOperation <ProductManager.Web.Model.user> loadOperationUser =
                systemManageDomainContext.Load <ProductManager.Web.Model.user>(systemManageDomainContext.GetUserQuery());

            loadOperationUser.Completed += loadOperationUser_Completed;
        }
        void loadOperationDepartment_Completed(object sender, EventArgs e)
        {
            DepartmentEntityDictionary.Clear();
            LoadOperation loadOperation = sender as LoadOperation;

            foreach (ProductManager.Web.Model.department department in loadOperation.Entities)
            {
                DepartmentEntity departmentEntity = new DepartmentEntity();
                departmentEntity.Department = department;
                departmentEntity.Update();
                DepartmentEntityDictionary.Add(departmentEntity.DepartmentID, departmentEntity);
            }

            LoadOperation <ProductManager.Web.Model.user> loadOperationUser =
                SystemManageDomainContext.Load <ProductManager.Web.Model.user>(SystemManageDomainContext.GetUserQuery());

            loadOperationUser.Completed += loadOperationUser_Completed;
        }