コード例 #1
0
ファイル: MainForm.cs プロジェクト: Guoyingbin/HNXC_WCS
        string FormDialog_OnDialog(DialogEventArgs args)
        {
            string strValue = "";
            if (InvokeRequired)
            {
                return (string)this.Invoke(new DialogEventHandler(FormDialog_OnDialog), args);
            }
            else
            {
                //1:���ϣ�2�����,4:����
                if (args.Message[0] == "1"||args.Message[0] == "2"  || args.Message[0] == "4")
                {
                    THOK.XC.Dispatching.View.StockToStation frm = new View.StockToStation(int.Parse(args.Message[0]), args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {

                        strValue = frm.strValue;
                    }

                }
                else if (args.Message[0] == "6")//�̵�
                {
                    THOK.XC.Dispatching.View.CheckScan frm = new THOK.XC.Dispatching.View.CheckScan(int.Parse(args.Message[0]), args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strValue;
                    }

                }
                else if (args.Message[0] == "3")  //�̰���������
                {
                    THOK.XC.Dispatching.View.ReadBarcode frm = new THOK.XC.Dispatching.View.ReadBarcode(args.Message[1]);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBarCode;
                    }

                }
                else if (args.Message[0] == "5")  //��¥���⣬RFID��һ��,ѡ��������
                {
                    THOK.XC.Dispatching.View.CannelBillSelect frm = new THOK.XC.Dispatching.View.CannelBillSelect(args.Message[1], args.Message[2], args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBillNo;
                    }
                }
                else if (args.Message[0] == "7")//�̰���⣬�Ѷ�����ش���,��λ�л�
                {
                    THOK.XC.Dispatching.View.CellError frm = new View.CellError(args.Message[1], args.Message[2]);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.Flag;
                    }
                }
                else if (args.Message[0] == "8")//�̰����⣬�Ѷ�����ش���,��λ�޻�
                {
                    THOK.XC.Dispatching.View.CellNewBillSelect frm = new View.CellNewBillSelect(args.Message[1], args.Message[2], args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBillNo;
                    }
                }
                else if (args.Message[0] == "9")//�̰����⣬�Ѷ�����ش���
                {
                    THOK.XC.Dispatching.View.frmNewCraneBill frm = new View.frmNewCraneBill(args.Message[1], args.Message[2], args.dtInfo, args.Message[3]);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBillNo;
                    }
                }
            }
            return strValue;
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: Guoyingbin/HNXC_WCS
        string FormDialog_OnDialog(DialogEventArgs args)
        {
            string strValue = "";
            if (InvokeRequired)
            {
                return (string)this.Invoke(new DialogEventHandler(FormDialog_OnDialog), args);
            }
            else
            {
                //1:补料,2、抽检,4:倒库
                if (args.Message[0] == "1" || args.Message[0] == "2" || args.Message[0] == "4")
                {
                    THOK.XC.Dispatching.View.StockToStation frm = new View.StockToStation(int.Parse(args.Message[0]), args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {

                        strValue = frm.strValue;
                    }

                }
                else if (args.Message[0] == "6")//盘点
                {
                    THOK.XC.Dispatching.View.CheckScan frm = new THOK.XC.Dispatching.View.CheckScan(int.Parse(args.Message[0]), args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strValue;
                    }

                }
                else if (args.Message[0] == "3")  //烟包条码问题
                {
                    THOK.XC.Dispatching.View.ReadBarcode frm = new THOK.XC.Dispatching.View.ReadBarcode(args.Message[1]);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBarCode;
                    }

                }
                else if (args.Message[0] == "5")  //二楼出库,RFID不一致,选择新批次
                {
                    THOK.XC.Dispatching.View.CannelBillSelect frm = new THOK.XC.Dispatching.View.CannelBillSelect(args.Message[1], args.Message[2], args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBillNo;
                    }
                }
                else if (args.Message[0] == "7")//烟包入库,堆垛机返回错误,货位有货
                {
                    THOK.XC.Dispatching.View.CellError frm = new View.CellError(args.Message[1], args.Message[2]);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.Flag;
                    }
                }
                else if (args.Message[0] == "8")//烟包出库,堆垛机返回错误,货位无货
                {
                    THOK.XC.Dispatching.View.CellNewBillSelect frm = new View.CellNewBillSelect(args.Message[1], args.Message[2], args.dtInfo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBillNo;
                    }
                }
                else if (args.Message[0] == "9")//烟包出库,堆垛机返回错误,
                {
                    THOK.XC.Dispatching.View.frmNewCraneBill frm = new View.frmNewCraneBill(args.Message[1], args.Message[2], args.dtInfo, args.Message[3]);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        strValue = frm.strBillNo;
                    }
                }
            }
            return strValue;
        }