コード例 #1
0
        public AssetListForm(UamWebService.MainForm parent, AssetQueryInfo queryInfo)
        {
            InitializeComponent();
            this.MdiParent = parent;
            DataGridViewRowCollection rows = this.dataGridView.Rows;

            // 设置查询条件
            if (queryInfo == null)
            {
                queryInfo = new AssetQueryInfo();
            }
            //AssetQueryInfo queryInfo = new AssetQueryInfo();
            //queryInfo.status = -1;
            //queryInfo.operSystemId = -1;

            // 调用查询接口
            RetAssetInfoList resultList = damService.queryAsset(queryInfo);
            if (resultList.errorCode == 0)
            {
                if (resultList.retAssetList != null)
                {
                    for (int i = 0; i < resultList.retAssetList.Length; i++)
                    {
                        if (resultList.retAssetList[i] == null)
                            continue;
                        String[] row = new String[this.dataGridView.ColumnCount];
                        row[0] = resultList.retAssetList[i].assetId.ToString();
                        row[1] = resultList.retAssetList[i].status.ToString();
                        row[2] = resultList.retAssetList[i].assetNumber;
                        row[3] = resultList.retAssetList[i].assetName;
                        row[4] = resultList.retAssetList[i].groupId.ToString();
                        row[5] = resultList.retAssetList[i].type;
                        row[6] = resultList.retAssetList[i].responser;
                        row[7] = resultList.retAssetList[i].joinDate.ToString();
                        rows.Add(row);
                    }
                }
                
            }
            else
            {
                MessageBox.Show("查询资产列表失败,失败原因为:" + resultList.errorMsg);
            }
        }
コード例 #2
0
 /// <remarks/>
 public void queryAssetAsync(AssetQueryInfo param0, object userState) {
     if ((this.queryAssetOperationCompleted == null)) {
         this.queryAssetOperationCompleted = new System.Threading.SendOrPostCallback(this.OnqueryAssetOperationCompleted);
     }
     this.InvokeAsync("queryAsset", new object[] {
                 param0}, this.queryAssetOperationCompleted, userState);
 }
コード例 #3
0
 /// <remarks/>
 public void queryAssetAsync(AssetQueryInfo param0) {
     this.queryAssetAsync(param0, null);
 }
コード例 #4
0
        public void updateList()
        {
            DataGridViewRowCollection rows = this.dataGridView.Rows;
            rows.Clear();
            AssetQueryInfo queryInfo = new AssetQueryInfo();

            // 调用查询接口
            RetAssetInfoList resultList = damService.queryAsset(queryInfo);
            if (resultList.errorCode == 0)
            {
                if (resultList.retAssetList != null)
                {
                    for (int i = 0; i < resultList.retAssetList.Length; i++)
                    {
                        if (resultList.retAssetList[i] == null)
                            continue;
                        String[] row = new String[this.dataGridView.ColumnCount];
                        row[0] = resultList.retAssetList[i].assetId.ToString();
                        row[1] = resultList.retAssetList[i].status.ToString();
                        row[2] = resultList.retAssetList[i].assetNumber;
                        row[3] = resultList.retAssetList[i].assetName;
                        row[4] = resultList.retAssetList[i].groupId.ToString();
                        row[5] = resultList.retAssetList[i].type;
                        row[6] = resultList.retAssetList[i].responser;
                        row[7] = resultList.retAssetList[i].joinDate.ToString();
                        rows.Add(row);
                    }
                }

            }
        }