コード例 #1
0
        //查询
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                this.VisibleWailt(false);
                listBill = wave.ScanNewBill("ScanNewBill", BillTypes);
                switch (listBill.Count)
                {
                case 0:
                    billNo = "";
                    break;

                case 1:
                    billNo = listBill[0];
                    break;

                default:
                    SelectDialog selectDialog = new SelectDialog(listBill);
                    if (selectDialog.ShowDialog() == DialogResult.OK)
                    {
                        billNo = selectDialog.SelectedBillID;
                    }
                    break;
                }
                this.VisibleWailt(true);
                RefreshData();
            }
            catch (Exception ex)
            {
                THOKUtil.ShowError("读取数据失败,原因:" + ex.Message);
                this.VisibleWailt(false);
                return;
            }
        }
コード例 #2
0
        //查询
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                string billNo = string.Empty;
                Task   task   = new Task(url);
                task.GetBillMasterCompleted += new Task.GetBillMasterCompletedEventHandler(delegate(bool isSuccess, string msg, BillMaster[] billMasters)
                {
                    ClosePlWailt();
                    if (billMasters != null)
                    {
                        switch (billMasters.Length)
                        {
                        case 0:
                            billNo = "";
                            break;

                        case 1:
                            billNo = billMasters[0].BillNo;
                            break;

                        default:
                            SelectDialog selectDialog = new SelectDialog(billMasters);
                            if (selectDialog.ShowDialog() == DialogResult.OK)
                            {
                                billNo = selectDialog.SelectedBillID;
                            }
                            break;
                        }
                        foreach (BillMaster billMaster in billMasters)
                        {
                            if (billNo == billMaster.BillNo)
                            {
                                this.BillMaster = billMaster;
                            }
                        }
                    }
                    if (!isSuccess)
                    {
                        MessageBox.Show(msg);
                    }
                    RefreshData();
                });
                task.SearchBillMaster(BillTypes);
                DisplayPlWailt();
            }
            catch (Exception ex)
            {
                MessageBox.Show("读取数据失败,原因:" + ex.Message, "消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: SaintLoong/thok_sc_dz_wms
        private void btnOut_Click(object sender, EventArgs e)
        {
            //this.ReadMasterBill("5", "STOCKMOVE");//�¼�

            listBill = wave.ScanNewBill("ScanNewBill", "5");
            switch (listBill.Count)
            {
                case 0:
                    billNo = "";
                    break;
                case 1:
                    billNo = listBill[0];
                    break;
                default:
                    SelectDialog selectDialog = new SelectDialog(listBill);
                    if (selectDialog.ShowDialog() == DialogResult.OK)
                    {
                        billNo = selectDialog.SelectedBillID;
                    }
                    break;
            }
        }
コード例 #4
0
ファイル: BaseTaskForm.cs プロジェクト: uwitec/wms_rfid
        //��ѯ
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                sp.Stop();
                Task task = new Task(url);
                task.GetBillMasterCompleted += new Task.GetBillMasterCompletedEventHandler(delegate(bool isSuccess, string msg, BillMaster[] billMasters)
                {
                    ClosePlWailt();
                    if (billMasters != null)
                    {
                        switch (billMasters.Length)
                        {
                            case 0:
                                billNo = "";
                                break;
                            case 1:
                                billNo = billMasters[0].BillNo;
                                break;
                            default:
                                SelectDialog selectDialog = new SelectDialog(billMasters);
                                if (selectDialog.ShowDialog() == DialogResult.OK)
                                {
                                    billNo = selectDialog.SelectedBillID;
                                }
                                break;
                        }

                        List<BillMaster> listBill = new List<Interface.Model.BillMaster>();
                        int f = 0;
                        for (int i = 0; i < billMasters.Length; i++)
                        {
                            if (billNo.Contains(billMasters[i].BillNo))
                            {
                                f++;
                                listBill.Add(billMasters[i]);
                            }
                        }
                        BillMasters = new BillMaster[f];
                        listBill.CopyTo(BillMasters, 0);
                    }
                    if (!isSuccess)
                        MessageBox.Show(msg);
                    RefreshData();
                });

                task.SearchBillMaster(BillTypes);
                DisplayPlWailt();
            }
            catch (Exception ex)
            {
                MessageBox.Show("��ȡ����ʧ�ܣ�ԭ��" + ex.Message, "��Ϣ", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #5
0
 //��ѯ
 private void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         this.VisibleWailt(false);
         listBill = wave.ScanNewBill("ScanNewBill", BillTypes);
         switch (listBill.Count)
         {
             case 0:
                 billNo = "";
                 break;
             case 1:
                 billNo = listBill[0];
                 break;
             default:
                 SelectDialog selectDialog = new SelectDialog(listBill);
                 if (selectDialog.ShowDialog() == DialogResult.OK)
                 {
                     billNo = selectDialog.SelectedBillID;
                 }
                 break;
         }
         this.VisibleWailt(true);
         RefreshData();
     }
     catch (Exception ex)
     {
         THOKUtil.ShowError("��ȡ����ʧ�ܣ�ԭ��" + ex.Message);
         this.VisibleWailt(false);
         return;
     }
 }
コード例 #6
0
ファイル: BaseTaskForm.cs プロジェクト: 397152971/wms_rfid
 //��ѯ
 private void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         string billNo = string.Empty;
         Task task = new Task(url);
         task.GetBillMasterCompleted += new Task.GetBillMasterCompletedEventHandler(delegate(bool isSuccess, string msg, BillMaster[] billMasters)
         {
             ClosePlWailt();
             if (billMasters != null)
             {
                 switch (billMasters.Length)
                 {
                     case 0:
                         billNo = "";
                         break;
                     case 1:
                         billNo = billMasters[0].BillNo;
                         break;
                     default:
                         SelectDialog selectDialog = new SelectDialog(billMasters);
                         if (selectDialog.ShowDialog() == DialogResult.OK)
                         {
                             billNo = selectDialog.SelectedBillID;
                         }
                         break;
                 }
                 foreach (BillMaster billMaster in billMasters)
                 {
                     if (billNo == billMaster.BillNo)
                     {
                         this.BillMaster = billMaster;
                     }
                 }
             }
             if (!isSuccess)
                 MessageBox.Show(msg);
             RefreshData();
         });
         task.SearchBillMaster(BillTypes);
         DisplayPlWailt();
     }
     catch (Exception ex)
     {
         MessageBox.Show("��ȡ����ʧ�ܣ�ԭ��" + ex.Message, "��Ϣ", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #7
0
 void ReadMasterBill(string billType)
 {
     listBill = waveData.ScanNewBill("ScanNewBill", billType);
     switch (listBill.Count)
     {
         case 0:
             billNo = "";
             break;
         case 1:
             billNo = listBill[0];
             break;
         default:
             SelectDialog selectDialog = new SelectDialog(listBill);
             if (selectDialog.ShowDialog() == DialogResult.OK)
             {
                 billNo = selectDialog.SelectedBillID;
             }
             break;
     }
     RefreshData();
 }