コード例 #1
0
        private void btn_UploadBatch_Click(object sender, EventArgs e)
        {
            bool            flag            = false;
            NBatchInfoGroup nBatchInfoGroup = new NBatchInfoGroup();

            foreach (ListViewItem listViewItem in this.listView1.Items)
            {
                bool flag2 = listViewItem.Checked && listViewItem.SubItems[1].Text != "成功";
                if (flag2)
                {
                    NBatchInfo nBatchInfo = listViewItem.Tag as NBatchInfo;
                    nBatchInfo.SetupBatchInfo();
                    nBatchInfoGroup.Batchs.Add(nBatchInfo);
                    flag = true;
                }
            }
            bool flag3 = !flag;

            if (flag3)
            {
                MessageBox.Show("请勾选影像批次");
            }
            else
            {
                foreach (NBatchInfo current in nBatchInfoGroup.Batchs)
                {
                    this._transfer           = INetTransferFactory.GetNetTransfer();
                    this._transfer.OnNotify -= new EventHandler <TEventArg <NetTransferNotifyMsg> >(this.OnTransferNotify);
                    this._transfer.OnNotify += new EventHandler <TEventArg <NetTransferNotifyMsg> >(this.OnTransferNotify);
                    this._transfer.UploadBatch(current);
                }
            }
        }
コード例 #2
0
 public void btn_Download_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.textBox1.Text))
     {
         this._transfer           = INetTransferFactory.GetNetTransfer();
         this._transfer.OnNotify -= new EventHandler <TEventArg <NetTransferNotifyMsg> >(this.OnTransferNotify);
         this._transfer.OnNotify += new EventHandler <TEventArg <NetTransferNotifyMsg> >(this.OnTransferNotify);
         NQueryBatchInfo nQueryBatchInfo = new NQueryBatchInfo();
         nQueryBatchInfo.BatchNO = this.textBox1.Text;
         this._transfer.DownloadBatch(nQueryBatchInfo);
     }
 }
コード例 #3
0
        private void btnQryBatchHis_Click(object sender, EventArgs e)
        {
            bool flag = string.IsNullOrEmpty(this.textBox_BatchNO.Text);

            if (!flag)
            {
                NBatchHisQry nBatchHisQry = new NBatchHisQry();
                nBatchHisQry.BatchNO     = this.textBox_BatchNO.Text;
                this._transfer           = INetTransferFactory.GetNetTransfer();
                this._transfer.OnNotify -= new EventHandler <TEventArg <NetTransferNotifyMsg> >(this._transfer_OnNotify);
                this._transfer.OnNotify -= new EventHandler <TEventArg <NetTransferNotifyMsg> >(this._transfer_OnNotify);
                this._transfer.GetBatchHis(nBatchHisQry);
            }
        }
コード例 #4
0
        private void btn_DelBatch_Click(object sender, EventArgs e)
        {
            bool flag = string.IsNullOrEmpty(this.txtBox_BatchNO.Text);

            if (!flag)
            {
                NBatchInfo nBatchInfo = new NBatchInfo();
                nBatchInfo.BatchNO       = this.txtBox_BatchNO.Text;
                nBatchInfo.Operation     = EOperType.eDEL;
                this._transfer           = INetTransferFactory.GetNetTransfer();
                this._transfer.OnNotify -= this.OnReportDelete;
                this._transfer.OnNotify += this.OnReportDelete;
                this._transfer.UploadBatch(nBatchInfo);
            }
        }