public AssetAddForm()
        {
            InitializeComponent();
            damService = MainForm.GetDamService();
            platService = MainForm.GetPlatService();
            platUserService = MainForm.GetPlatUserService();

            // 设置责任人
            WSUserArray userList = platUserService.queryAllUser(new long[] { 1 });
            if (userList.errorCode == 0)
            {
                if (userList.userArray == null || userList.userArray.Length == 0)
                {
                    MessageBox.Show("系统中必须至少存在一个平台用户");
                }
                else
                {
                    foreach (User user in userList.userArray)
                    {
                        CombItem item = new CombItem(user.userName, user.id.Value);
                        this.comboBoxResponser.Items.Add(item);
                    }
                }

            }
            else
            {
                MessageBox.Show("查询平台用户失败");
            }
            this.comboBoxResponser.SelectedIndex = 0;

            // 设置计算机类型
            this.comboBoxComputerType.Items.AddRange(new object[] {
            "pc",
            "laptop",
            "workstation",
            "server",
            "other"});
            this.comboBoxComputerType.SelectedIndex = 0;

            // 设置资产分组
            queryAssetGroupResponse response = damService.queryAssetGroup();
            if ([email protected] == 0)
            {
                foreach (RetAssetGroupInfo groupInfo in [email protected])
                {
                    CombItem item = new CombItem(groupInfo.groupName, groupInfo.groupId.Value);
                    this.comboBoxGroupID.Items.Add(item);
                }
                this.comboBoxGroupID.SelectedIndex = 0;
            }
            else
            {
                MessageBox.Show("无法获取资产分组信息");
            }
                                
            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonCancel.DialogResult = DialogResult.Cancel;

        }
        public UserListQueryInfoForm()
        {
            InitializeComponent();
            validate = false;

            // 获取Web服务对象
            platUserService = MainForm.GetPlatUserService();
            accessUserService = MainForm.GetAccessUserService();

            // 设置开始日期查询条件
            this.dateTimePickerCreationStartDate.Value = System.DateTime.Now.AddMonths(-1);
            //this.dateTimePickerLastLogOffStartTime.Value = System.DateTime.Now.AddMonths(-1);

            // 设置服务名称
            CombItem item = new CombItem("不限", -1);
            this.comboBoxServiceID.Items.Add(item);

            AcmServiceTemplateQueryParam serviceTemplateQueryParam = new AcmServiceTemplateQueryParam();
            RetAcmServiceTemplateInfoList serviceTemplateList = accessUserService.queryServiceTemplateList(serviceTemplateQueryParam);
            if (serviceTemplateList.errorCode == 0 )
            {
                if (serviceTemplateList.retAcmServiceTemplateInfoList != null)
                {
                    foreach (RetAcmServiceTemplateInfo serviceTemplate in serviceTemplateList.retAcmServiceTemplateInfoList)
                    {
                        item = new CombItem(serviceTemplate.serviceName, serviceTemplate.serviceId.Value);
                        this.comboBoxServiceID.Items.Add(item);
                    }
                }
            }
            else
            {
                MessageBox.Show("无法获取服务列表信息");
            }
            this.comboBoxServiceID.SelectedIndex = 0;

            // 设置用户分组
            item = new CombItem("不限", -1);
            this.comboBoxUserGroupId.Items.Add(item);
            this.comboBoxUserGroupId.SelectedIndex = 0;

            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
        }
        public AccessDetailQueryInfoForm()
        {
            InitializeComponent();

            platUserService = MainForm.GetPlatUserService();
            accessUserService = MainForm.GetAccessUserService();

            // 设置用户分组
            this.comboBoxUserGroupId.Items.Add(new CombItem("不限", -1));
            this.comboBoxUserGroupId.SelectedIndex = 0;

            // 设置服务名称
            this.comboBoxServiceID.Items.Add(new CombItem("不限", -1));

            AcmServiceTemplateQueryParam serviceTemplateQueryParam = new AcmServiceTemplateQueryParam();
            RetAcmServiceTemplateInfoList serviceTemplateList = accessUserService.queryServiceTemplateList(serviceTemplateQueryParam);
            if (serviceTemplateList.errorCode == 0)
            {
                if (serviceTemplateList.retAcmServiceTemplateInfoList != null)
                {
                    foreach (RetAcmServiceTemplateInfo serviceTemplate in serviceTemplateList.retAcmServiceTemplateInfoList)
                    {
                        CombItem item = new CombItem(serviceTemplate.serviceName, serviceTemplate.serviceId.Value);
                        this.comboBoxServiceID.Items.Add(item);
                    }
                }
                
            }
            else
            {
                MessageBox.Show("无法获取服务列表信息");
            }
            this.comboBoxServiceID.SelectedIndex = 0;

            // 设置开始时间
            this.dateTimePickerStartTime.Value = System.DateTime.Now.AddMonths(-1);

            // 设置下线原因
            this.comboBoxOfflineCause.Items.Add(new CombItem("不限", -1));
            this.comboBoxOfflineCause.SelectedIndex = 0;
            
            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
        }
        public BlacklistQueryInfoForm()
        {
            InitializeComponent();

            platUserService = MainForm.GetPlatUserService();
            accessUserService = MainForm.GetAccessUserService();

            // 设置用户分组
            CombItem item = new CombItem("不限", -1);
            this.comboBoxUserGroupId.Items.Add(item);
            this.comboBoxUserGroupId.SelectedIndex = 0;

            // 设置加入开始时间
            this.dateTimePickerStartDate.Value = System.DateTime.Now.AddMonths(-1);

            //设置加入原因
            this.comboBoxJoinReason.Items.Add(new CombItem("不限", -1));
            this.comboBoxJoinReason.Items.Add(new CombItem("操作员锁定用户", 1));
            this.comboBoxJoinReason.Items.Add(new CombItem("恶意登录尝试",2));
            this.comboBoxJoinReason.SelectedIndex = 0;

            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
        }