Ejemplo n.º 1
0
        private void InitDepartmentTree()
        {
            ResponseModel response = DepartmentService_.GetDepartments();

            if (response.Code == 1)
            {
                if (response.DataCount >= 1)
                {
                    List <Department> departments =
                        Serializer_.Deserialize <List <Department> >(Serializer_.Serialize(response.Data));
                    BindToTreeView(departments);
                }
                else
                {
                    MessageBox.Show("尚未有任何部门被创建");
                }
            }
            else
            {
                MessageBox.Show(response.Message);
            }
        }
        private ResponseModel SaveEntity()
        {
            Department department = new Department();

            return(DepartmentService_.InsertDepartment(department));
        }