Example #1
0
        private void Login(string sPassword)
        {
            EEHEmployeeTableAdapter taEmployee = new EEHEmployeeTableAdapter();

            dsCommon.EEHEmployeeDataTable dtEmployees = taEmployee.GetOperatorCodeByPassword(sPassword);
            string sOperatorCode;

            switch (dtEmployees.Rows.Count)
            {
            case 1:
                sOperatorCode = dtEmployees[0].OperatorCode;
                OperatorConfirmed(sOperatorCode);
#if PocketPC
                MyRFGun         = new SymbolRFGun.SymbolRFGun();
                MyRFGun.RFScan += new RFScanEventHandler(MyRFGun_RFScan);
#endif
                break;

            case 0:
                uxPWD.Text = "";
                uxPWD.Focus();
                throw new Exception("Invalid password.");

            default:
                uxPWD.Focus();
                throw new Exception("Unknown error validating password.");
            }
            RefreshScreenState();
        }
Example #2
0
 private void frmRFBase_Load(object sender, EventArgs e)
 {
     try
     {
         MyRFGun         = new SymbolRFGun.SymbolRFGun();
         MyRFGun.RFScan += new RFScanEventHandler(MyRFGun_RFScan);
     }
     catch (SymbolRFGunException ex)
     {
         MessageBox.Show(ex.Message);
         this.Close();
     }
 }
Example #3
0
 private void ResetGun()
 {
     try
     {
         _myRFGun.Close();
         _myRFGun         = new SymbolRFGun.SymbolRFGun();
         _myRFGun.RFScan += MyRFGunRFScan;
     }
     catch (SymbolRFGunException ex)
     {
         MessageBox.Show(ex.Message);
         Close();
     }
 }
Example #4
0
 void ResetGun()
 {
     try
     {
         MyRFGun.Close();
         MyRFGun         = new SymbolRFGun.SymbolRFGun();
         MyRFGun.RFScan += new RFScanEventHandler(MyRFGun_RFScan);
     }
     catch (SymbolRFGunException ex)
     {
         MessageBox.Show(ex.Message);
         this.Close();
     }
 }
Example #5
0
        private void ScanToLocationViewLoad(object sender, EventArgs e)
        {
            uxLabelOperatorCode.Text = OperatorCode;

            try
            {
                _myRFGun         = new SymbolRFGun.SymbolRFGun();
                _myRFGun.RFScan += MyRFGunRFScan;
            }
            catch (SymbolRFGunException ex)
            {
                MessageBox.Show(ex.Message);
                Close();
            }

            try
            {
                //Select Device from device list
                Debug.Assert(Device.AvailableDevices != null, "Device.AvailableDevices != null");
                var myDevice = (Device)SelectDevice.Select(
                    Controller.Title,
                    Device.AvailableDevices);

                if (myDevice == null)
                {
                    MessageBox.Show("No Device Selected", "SelectDevice");

                    //close the form
                    Close();

                    return;
                }

                //check the device type
                switch (myDevice.AudioType)
                {
                //if standard device
                case AudioType.StandardAudio:
                    _myAudioController = new StandardAudio(myDevice);
                    break;

                //if simulated device
                case AudioType.SimulatedAudio:
                    _myAudioController = new SimulatedAudio(myDevice);
                    break;

                default:
                    throw new InvalidDataTypeException("Unknown Device Type");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            try
            {
                using (var racksDT = new RackListTableAdapter().GetRackList(Plant))
                {
                    RackSelection.DataSource    = racksDT;
                    RackSelection.DisplayMember = "Rack";
                    RackSelection.Text          = BeginPhysicalRack;
                }
                using (var shelvesDT = new ShelfListTableAdapter().GetShelfList(Plant))
                {
                    ShelfSelection.DataSource    = shelvesDT;
                    ShelfSelection.DisplayMember = "Shelf";
                    ShelfSelection.Text          = BeginPhysicalShelf;
                }
                using (var positionsDT = new PositionListTableAdapter().GetPositionList(Plant))
                {
                    PositionSelection.DataSource    = positionsDT;
                    PositionSelection.DisplayMember = "Position";
                    PositionSelection.Text          = BeginPhysicalPosition;
                }
            }
            catch (SqlException ex)
            {
                foreach (SqlError sqlErr in ex.Errors)
                {
                    MessageBox.Show(sqlErr.Message);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            RefreshProgress();
        }
Example #6
0
        private void frmScanToLocation_Load(object sender, EventArgs e)
        {
            try
            {
                MyRFGun         = new SymbolRFGun.SymbolRFGun();
                MyRFGun.RFScan += new RFScanEventHandler(MyRFGun_RFScan);
            }
            catch (SymbolRFGunException ex)
            {
                MessageBox.Show(ex.Message);
                this.Close();
            }

            try
            {
                //Select Device from device list
                Symbol.Audio.Device MyDevice = (Symbol.Audio.Device)Symbol.StandardForms.SelectDevice.Select(
                    Symbol.Audio.Controller.Title,
                    Symbol.Audio.Device.AvailableDevices);

                if (MyDevice == null)
                {
                    MessageBox.Show("No Device Selected", "SelectDevice");

                    //close the form
                    this.Close();

                    return;
                }

                //check the device type
                switch (MyDevice.AudioType)
                {
                //if standard device
                case Symbol.Audio.AudioType.StandardAudio:
                    MyAudioController = new Symbol.Audio.StandardAudio(MyDevice);
                    break;

                //if simulated device
                case Symbol.Audio.AudioType.SimulatedAudio:
                    MyAudioController = new Symbol.Audio.SimulatedAudio(MyDevice);
                    break;

                default:
                    throw new Symbol.Exceptions.InvalidDataTypeException("Unknown Device Type");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            try
            {
                Exception ex = null;
                dsPhysicalInventory       = (DataSetPhysicalInventory)cache.RetrieveObject(CacheAddress.PhysicalInventoryData);
                taEmployee                = (EmployeeTableAdapter)cache.RetrieveObject(CacheAddress.EmployeeTableAdapter);
                taPhysicalProgress        = (PhysicalProgressTableAdapter)cache.RetrieveObject(CacheAddress.PhysicalProgressTableAdapter);
                taPhysicalProgressSummary = (PhysicalProgressSummaryTableAdapter)cache.RetrieveObject(CacheAddress.PhysicalProgressSummaryTableAdapter);
                taWarehouseInventory      = (WarehouseInventoryTableAdapter)cache.RetrieveObject(CacheAddress.WarehouseInventoryTableAdapter);

                switch (dsPhysicalInventory.Employee.Rows.Count)
                {
                case 1:
                    OperatorCode             = dsPhysicalInventory.Employee[0].OperatorCode;
                    uxLabelOperatorCode.Text = OperatorCode;
                    break;

                case 0:
                    ex = new Exception("Invalid password.");
                    throw ex;

                default:
                    ex = new Exception("Unknown error validating password.");
                    throw ex;
                }
                PutAwayAisle          = (string)cache.RetrieveObject(CacheAddress.BeginPhysicalAisle);
                BeginPhysicalShelf    = (Int32)cache.RetrieveObject(CacheAddress.BeginPhysicalShelf);
                BeginPhysicalSubshelf = (Int32)cache.RetrieveObject(CacheAddress.BeginPhysicalSubshelf);
                uxCBAisle.Items.Add(PutAwayAisle);
                uxCBAisle.SelectedIndex = 0;
                if (BeginPhysicalShelf == 0)
                {
                    uxCBShelf.Items.Add("1");
                    uxCBShelf.Items.Add("2");
                    uxCBShelf.Items.Add("3");
                    uxCBShelf.Items.Add("4");
                    PutAwayShelf = 1;
                }
                else
                {
                    uxCBShelf.Items.Add(BeginPhysicalShelf.ToString());
                    PutAwayShelf = BeginPhysicalShelf;
                }
                uxCBShelf.SelectedIndex = 0;

                if (BeginPhysicalSubshelf == 0)
                {
                    uxCBSubshelf.Items.Add("1");
                    uxCBSubshelf.Items.Add("2");
                    uxCBSubshelf.Items.Add("3");
                    uxCBSubshelf.Items.Add("4");
                    uxCBSubshelf.Items.Add("5");
                    uxCBSubshelf.Items.Add("6");
                    uxCBSubshelf.Items.Add("7");
                    uxCBSubshelf.Items.Add("8");
                    uxCBSubshelf.Items.Add("9");
                    uxCBSubshelf.Items.Add("10");
                    uxCBSubshelf.Items.Add("11");
                    uxCBSubshelf.Items.Add("12");
                    PutAwaySubshelf = 1;
                }
                else
                {
                    uxCBSubshelf.Items.Add(BeginPhysicalSubshelf.ToString());
                    PutAwaySubshelf = BeginPhysicalSubshelf;
                }
                uxCBSubshelf.SelectedIndex = 0;
                RefreshProgress();
            }
            catch (SqlException ex)
            {
                foreach (SqlError SQLErr in ex.Errors)
                {
                    MessageBox.Show(SQLErr.Message);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #7
0
 private void ScanForm_Load(object sender, EventArgs e)
 {
     MyRFGun         = new SymbolRFGun.SymbolRFGun();
     MyRFGun.RFScan += new RFScanEventHandler(MyRFGun_RFScan);
     RefreshScreenState();
 }