private void bindRoleList(RoleManagerBLL bll, int pageIndex, int pageSize)
    {
        int total;

        GridView1.DataSource = bll.GetRoleList(pageIndex, pageSize, out total);
        GridView1.DataBind();

        Navigation1.DataBind(pageIndex, pageSize, total);
    }
    private void bindList(int pageIndex, int pageSize)
    {
        var loginedUser = PageUtility.User;

        int total;

        GridView1.DataSource = _cookbookBLL.GetCookbookList(string.Empty, loginedUser.OrganizationId, "order by DisplayOrder Desc", pageIndex, pageSize, out total);
        GridView1.DataBind();

        Navigation1.DataBind(pageIndex, pageSize, total);
    }
    private void BindList(int pageIndex, int pageSize)
    {
        var loginedUser = PageUtility.User;

        int total;

        gdCookbookDate.DataSource = _cookbookBLL.GetCookbookSetInDateList(null, null, loginedUser.OrganizationId, null, pageIndex, pageSize, out total);
        gdCookbookDate.DataBind();

        Navigation1.DataBind(pageIndex, pageSize, total);
    }
    private void BindUseList(UserManagerBLL bll, int pageIndex, int pageSize)
    {
        bool?isAdmin = null;

        if (rbtnViewAdmin.Checked)
        {
            isAdmin = true;
        }
        else if (rbtnViewMember.Checked)
        {
            isAdmin = false;
        }

        int total;

        GridView1.DataSource = bll.GetUserList(string.Empty, false, isAdmin, null, pageIndex, pageSize, out total);
        GridView1.DataBind();

        Navigation1.DataBind(pageIndex, pageSize, total);
    }
        private void RegisterComponents()
        {
            this.Text = HSTMachine.Workcell.HSTSettings.Install.EquipmentID + " {HAMR PRODUCT}";

            viewChangeMsgChannel.MessageSentEvent += new Seagate.AAS.Parsel.Services.MessageChannel.ReceiveMessageHandler(RecieveViewChangeMessage);

            try
            {
                Seagate.AAS.Parsel.Services.ServiceManager.MenuNavigator.SetMainForm(this, 0, panelTitle.Height, viewChangeMsgChannel);
            }
            catch (Exception e)
            {
                // swallow ServiceManager null reference exceptions thrown by the VS Forms Designer
            }

            // register panels for message notification
            panels.Add(panelTitle);
            panels.Add(Navigation1);
            panels.Add(panelCommand1);
            //panels.Add(SubNavigation1);

            if (HSTMachine.Workcell != null)
            {
                panelTitle.AssignWorkcell(HSTMachine.Workcell);
                panelCommand1.AssignWorkcell(HSTMachine.Workcell);
                Navigation1.AssignWorkcell(HSTMachine.Workcell);
                HSTMachine.Workcell.DisplayTitleMessage("System Idle");

                // Disable simulation if vision is enabled
                if (HSTMachine.Workcell.HSTSettings.Install.EnableVision == true)
                {
                    if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
                    {
                        HSTMachine.Workcell.HSTSettings.Install.OperationMode = OperationMode.Auto;
                    }
                }

                if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Auto)
                {
                    this.ModeCaption = "Auto";
                }
                else if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.DryRun)
                {
                    this.ModeCaption = (HSTMachine.Workcell.HSTSettings.Install.DryRunWithoutBoat) ? "Dry Run (No Boats)" : "Dry Run (With Boats)";
                }
                else if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Bypass)
                {
                    this.ModeCaption = "Bypass";
                }
                else if (HSTMachine.Workcell.HSTSettings.Install.OperationMode == OperationMode.Simulation)
                {
                    this.ModeCaption = "Simulation";
                }

                testProbeComPort.PortName  = HSTMachine.Workcell.CalibrationSettings.MeasurementTest.COMPort.ToString();
                testProbeComPort.BaudRate  = HSTMachine.Workcell.CalibrationSettings.MeasurementTest.BaudRate;
                testProbeComPort.DataBits  = HSTMachine.Workcell.CalibrationSettings.MeasurementTest.DataBits;
                testProbeComPort.RtsEnable = false;
                testProbeComPort.DtrEnable = false;

                try
                {
                    testProbeComPort.Open();
                    if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog)
                    {
                        Log.Info("Test Probe COM Port", "Test Probe serial port: {0}, baud rate: {1}, data bits: {2}, stop bits: {3}, parity: {4} has been opened.",
                                 testProbeComPort.PortName, testProbeComPort.BaudRate, testProbeComPort.DataBits, testProbeComPort.StopBits, testProbeComPort.Parity);
                    }
                }

                catch (Exception ex)
                {
                    Log.Error("Test Probe COM Port", "Error opening Test Probe serial port: {0}.", ex.Message);
                }
            }
        }