Ejemplo n.º 1
0
        private void Init()
        {
            PaCSGlobal.InitComPort("Toner", "GRCJ", ports);

            if (ports[0].IsOpen)
            {
                ports[0].DataReceived += new SerialDataReceivedEventHandler(serialPortGRCJ_DataReceived);//重新绑定
            }
            switch (PaCSGlobal.LoginUserInfo.Venderid)
            {
            case "C660":
                cmbLoc.Properties.BeginUpdate();
                TonerGlobal.LoadBufferByVendCode(cmbLoc);
                cmbLoc.Properties.EndUpdate();
                break;

            case "C6H0":
                cmbLoc.Properties.BeginUpdate();
                TonerGlobal.LoadBufferByVendCode(cmbLoc);
                cmbLoc.Properties.EndUpdate();
                break;

            case "O-0192":
                cmbLoc.Properties.BeginUpdate();
                TonerGlobal.LoadBufferByVendCode(cmbLoc);
                cmbLoc.Properties.EndUpdate();
                break;

            case "L107LO":
                cmbLoc.Properties.BeginUpdate();
                TonerGlobal.LoadStockByVendCode(cmbLoc);
                cmbLoc.Properties.EndUpdate();
                break;

            case "C660_SVC":
                cmbLoc.Properties.BeginUpdate();
                TonerGlobal.LoadStockByVendCode(cmbLoc);
                cmbLoc.Properties.EndUpdate();
                break;

            default:
                cmbLoc.Properties.BeginUpdate();
                TonerGlobal.LoadStockByVendCode(cmbLoc);
                cmbLoc.Properties.EndUpdate();
                cmbLoc.SelectedIndex = 0;
                break;
            }
        }
        private void Init()
        {
            PaCSGlobal.InitComPort("Toner", "GICJ", ports);

            if (ports[0].IsOpen)
            {
                ports[0].DataReceived += new SerialDataReceivedEventHandler(serialPortGICJ_DataReceived);//重新绑定
            }
            cmbLoc.Properties.BeginUpdate();
            TonerGlobal.LoadStockByVendCode(cmbLoc);
            cmbLoc.Properties.EndUpdate();
            cmbLoc.SelectedIndex = 0;

            cmbDest.Properties.BeginUpdate();
            TonerGlobal.LoadBufferByVendCode(cmbDest);
            cmbDest.Properties.EndUpdate();

            if (PaCSGlobal.LoginUserInfo.Fct_code.Equals("C6H0A")) //2014/12/03
            {
                GIType = 1;                                        //0:buffer 1:其他厂家
                cmbType.SelectedIndex = 1;
                cmbType.Enabled       = false;
            }
        }