Exemplo n.º 1
0
        //private void BtnMoveWork_Click(object sender, EventArgs e)
        //{
        //    //MyUserControl02 test = this.ActiveControl as MyUserControl02;
        //    //GridControl testControl = test.ActiveControl as GridControl;
        //    //GridView testView = testControl.MainView as GridView;

        //    //ProcessComparenceDialog dialog = new ProcessComparenceDialog(testView.GetRowCellValue(testView.FocusedRowHandle, "PART_NUMBER").ToString());
        //    //dialog.Width = 1300;
        //    //dialog.Height = 350;
        //    //dialog.ShowDialog();
        //}

        //private void FlowLayoutPanel1_MouseDown(object sender, MouseEventArgs e)
        //{
        //    flyoutPanel1.OwnerControl = this.flowLayoutPanel1;
        //    flyoutPanel1.Size = new Size(200, 400);
        //    //flyoutPanel.ShowBeakForm();
        //    if (flyoutPanel1.FlyoutPanelState.IsActive) flyoutPanel1.HidePopup();
        //    else flyoutPanel1.ShowPopup();
        //}
        private void UserControl_Click(object sender, EventArgs e)
        {
            try
            {
                MyUserControl02 selectedUserControl = sender as MyUserControl02;
                //this.gridControl1.DataSource = new MyDatabaseConnect01().connection7(selectedUserControl.eqpId, selectedUserControl.workCenter);
                this.gridControl1.DataSource = DashboardDAO.SelectOrderOfEquipmentList(new DashboardDTO()
                {
                    EQP_ID = selectedUserControl.eqpId, WORK_CENTER = selectedUserControl.workCenter
                });
                this.labelControl2.Text   = selectedUserControl.eqpDesc;
                flyoutPanel1.OwnerControl = this;
                flyoutPanel1.Size         = new Size(600, 350);
                //flyoutPanel.ShowBeakForm();

                if (flyoutPanel1.FlyoutPanelState.IsActive)
                {
                    flyoutPanel1.HidePopup(); this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; this.gridControl3.Visible = false; this.gridControl3.DataSource = null;
                }
                else
                {
                    flyoutPanel1.ShowPopup();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 2
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                BtnReset_Click(null, null);

                //List<DataThreeVo> resultList = new MyDatabaseConnect01().connection3(this.slueSelect.EditValue.ToString());
                IList <DashboardDTO> resultList = DashboardDAO.SelectEquipmentList(new DashboardDTO()
                {
                    DEPT_CODE = this.slueSelect.EditValue.ToString()
                });
                //flowLayoutPanel.Size = new Size(3000, 2000);
                //flowLayoutPanel.WrapContents = false;
                // https://www.dotnetperls.com/flowlayoutpanel
                // https://www.c-sharpcorner.com/forums/getting-control-from-flowlayoutpanel
                // https://stackoverflow.com/questions/40279918/flowlayoutpanel-scrollbar-doesnt-disapear-properly-sometimes
                flowLayoutPanel1.HorizontalScroll.Maximum = 0;
                flowLayoutPanel1.AutoScroll             = false;
                flowLayoutPanel1.VerticalScroll.Visible = false;
                flowLayoutPanel1.AutoScroll             = true;

                MyUserControl02 userControl;
                int             _rowIndex = 0;
                for (int x = 0; x < resultList.Count; x++)
                {
                    userControl        = new MyUserControl02(resultList[x].EQP_DESC.ToString(), resultList[x].EQP_ID.ToString(), resultList[x].WORK_CENTER.ToString(), resultList[x].STATE.ToString());
                    userControl.Click += UserControl_Click;
                    flowLayoutPanel1.Controls.Add(userControl);
                }


                //this.groupControl2.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 3
0
        private void BtnChart_Click(object sender, EventArgs e)
        {
            try
            {
                MyUserControl02 test        = this.ActiveControl as MyUserControl02;
                GridControl     testControl = test.ActiveControl as GridControl;
                GridView        testView    = testControl.MainView as GridView;
                //MessageBox.Show(testView.FocusedRowHandle.ToString());
                //this.gridControl1.DataSource = new MyDatabaseConnect01().connection8(test.eqpNumber, "");
                //DataRow drFocusedRow = testView.GetDataRow(testView.FocusedRowHandle);

                if (testView.SelectedRowsCount <= 0)
                {
                    return;
                }

                FlyoutProperties properties = new FlyoutProperties();
                properties.ButtonSize = new Size(100, 10);
                properties.Style      = FlyoutStyle.Popup;
                FlyoutDialog.Show(this.FindForm(), "", new MyDialog01(test.eqpId, testView.GetRowCellValue(testView.FocusedRowHandle, "PROCESS_SEQ").ToString(), testView.GetRowCellValue(testView.FocusedRowHandle, "PROD_ORDER_NUMBER").ToString()), properties, 0, 0);

                //dialog.Width = 1300;
                //dialog.Height = 350;


                //if (groupControl1.Visible == true) this.groupControl1.Visible = false;
                //else if(groupControl1.Visible == false) this.groupControl1.Visible = true;
                //MyUserControl02 test = this.ActiveControl as MyUserControl02;
                ////GridControl testControl = test.ActiveControl as GridControl;
                ////GridView testView = testControl.MainView as GridView;
                ////MessageBox.Show(testView.FocusedRowHandle.ToString());
                //this.gridControl1.DataSource = new MyDatabaseConnect01().connection8(test.eqpNumber,"");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 4
0
        public static void MakeLayoutContol3(FlowLayoutPanel flowLayoutPanel, string _valString)
        {
            List <MyDatabaseConnect01.DataThreeVo> resultList = new MyDatabaseConnect01().connection3(_valString);

            //flowLayoutPanel.Size = new Size(3000, 2000);
            //flowLayoutPanel.WrapContents = false;
            // https://www.dotnetperls.com/flowlayoutpanel
            // https://www.c-sharpcorner.com/forums/getting-control-from-flowlayoutpanel
            // https://stackoverflow.com/questions/40279918/flowlayoutpanel-scrollbar-doesnt-disapear-properly-sometimes
            flowLayoutPanel.HorizontalScroll.Maximum = 0;
            flowLayoutPanel.AutoScroll             = false;
            flowLayoutPanel.VerticalScroll.Visible = false;
            flowLayoutPanel.AutoScroll             = true;

            MyUserControl02 userControl;
            int             _rowIndex = 0;

            for (int x = 0; x < resultList.Count; x++)
            {
                userControl = new MyUserControl02(resultList[x].EQP_DESC.ToString(), resultList[x].EQP_ID.ToString(), resultList[x].WORK_CENTER.ToString(), resultList[x].STATE.ToString());
                flowLayoutPanel.Controls.Add(userControl);
            }
        }