Exemplo n.º 1
0
        public MyTileBar04()
        {
            InitializeComponent();
            MyDevExpressFunctions.InitSearchLookUpEdit(this.slueSelect, "DEPT_NAME", "DEPT_CODE", true);
            MyDevExpressFunctions.SetVisibleColumnSearchLookUpEdit(this.slueSelect, new string[] { "DEPT_NAME", "DEPT_CODE" }, new string[] { "부서명", "부서코드" });
            this.slueSelect.Properties.DataSource = new MyDatabaseConnect01().connection2();
            //this.slueSelect.EditValueChanged += SlueSelect_EditValueChanged;
            MyDevExpressFunctions.MakeWindowsUIButtonPanel(this.windowsUIButtonPanel1, new string[] { "검색", "초기화", "저장", "프린트", "차트" });
            WindowsUIButton btnSearch = this.windowsUIButtonPanel1.Buttons["검색"] as WindowsUIButton;
            WindowsUIButton btnReset  = this.windowsUIButtonPanel1.Buttons["초기화"] as WindowsUIButton;

            btnSearch.Click += BtnSearch_Click;
            btnReset.Click  += BtnReset_Click;
        }
Exemplo n.º 2
0
        public MySearchLookUpEdit01()
        {
            InitializeComponent();


            MyDevExpressFunctions.SetVisibleColumnSearchLookUpEdit(this.slueTest, new string[] { "BIG_CLASS", "BIG_CLASS_DESC" }, new string[] { "대분류", "대분류명" });
            MyDevExpressFunctions.InitSearchLookUpEdit(this.slueTest, "BIG_CLASS_DESC", "ROWINDEX", true);

            slueTest.Properties.View.OptionsSelection.CheckBoxSelectorColumnWidth = 40;
            slueTest.Properties.View.OptionsSelection.MultiSelect     = true;
            slueTest.Properties.View.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect;
            slueTest.Properties.ShowAddNewButton = true;
            slueTest.Enter             += slueTest_Enter;
            slueTest.EditValueChanged  += slueTest_EditValueChanged;
            slueTest.CustomDisplayText += slueTest_CustomDisplayText;
            slueTest.Closed            += searchLookUpEdit_Closed;
            slueTest.Popup             += AddNewButtonChangeCaption_Popup; // AddNewButton Caption
            MyDevExpressFunctions.SetBestFitPopupSearchLookUpEdit(this.slueTest, 25);
            this.simpleButton1.Click += SimpleButton1_Click;
        }
Exemplo n.º 3
0
        public MyTileBar05()
        {
            InitializeComponent();

            try
            {
                MyDevExpressFunctions.InitSearchLookUpEdit(this.slueSelect, "DEPT_NAME", "DEPT_CODE", true);
                MyDevExpressFunctions.SetVisibleColumnSearchLookUpEdit(this.slueSelect, new string[] { "DEPT_NAME", "DEPT_CODE" }, new string[] { "부서명", "부서코드" });
                this.slueSelect.Properties.DataSource = DashboardDAO.SelectDepartmentList(new DashboardDTO());


                //this.slueSelect.EditValueChanged += SlueSelect_EditValueChanged;
                MyDevExpressFunctions.MakeWindowsUIButtonPanel(this.windowsUIButtonPanel1, new string[] { "검색", "초기화", "구분자", "미리보기", "차트", "작업이동", "구분자", "저장", "프린트" });
                WindowsUIButton btnSearch   = this.windowsUIButtonPanel1.Buttons["검색"] as WindowsUIButton;
                WindowsUIButton btnReset    = this.windowsUIButtonPanel1.Buttons["초기화"] as WindowsUIButton;
                WindowsUIButton btnChart    = this.windowsUIButtonPanel1.Buttons["차트"] as WindowsUIButton;
                WindowsUIButton btnPreview  = this.windowsUIButtonPanel1.Buttons["미리보기"] as WindowsUIButton;
                WindowsUIButton btnMoveWork = this.windowsUIButtonPanel1.Buttons["작업이동"] as WindowsUIButton;

                //PeekFormButton btnPanelMoveWork = this.flyoutPanel1.OptionsButtonPanel.Buttons["작업이동"] as PeekFormButton;
                //PeekFormButton btnPanelAccept = this.flyoutPanel1.OptionsButtonPanel.Buttons["적용"] as PeekFormButton;
                //PeekFormButton btnPanelDecline = this.flyoutPanel1.OptionsButtonPanel.Buttons["취소"] as PeekFormButton;
                this.flyoutPanel1.ButtonClick += FlyoutPanel1_ButtonClick;
                //btn.clik


                btnSearch.Click  += BtnSearch_Click;
                btnReset.Click   += BtnReset_Click;
                btnChart.Click   += BtnChart_Click;
                btnPreview.Click += BtnPreview_Click;
                //btnMoveWork.Click += BtnMoveWork_Click;
                //btnPanelMoveWork.Click += BtnMoveWork_Click;
                this.gridControl1.Click += GridControl1_Click;

                // https://enginhak.tistory.com/entry/XtraGridView-Column-Header-Checkbox-Add
                this.gridView2.CellValueChanging += GridView2_CellValueChanging;
                //this.gridView2.MouseUp += GridView2_MouseUp;
                this.panelComparence.Visible = false;
                //flowLayoutPanel1.MouseDown += FlowLayoutPanel1_MouseDown;
                //MyDevExpressFunctions.InitGridControl(this.gridView1, 0);
                //int iColumnCount = oHeaderText.Length;
                //DevExpress.XtraGrid.Columns.GridColumn[] cCols = new DevExpress.XtraGrid.Columns.GridColumn[iColumnCount];
                //for (int i = 0; i < iColumnCount; i++)
                //{
                //    cCols[i] = new DevExpress.XtraGrid.Columns.GridColumn() { FieldName = Enum.GetNames(typeof(DbColumnIndex))[i].ToString(), Name = Enum.GetNames(typeof(DbColumnIndex))[i], Caption = oHeaderText[i], Visible = true, Width = HeaderWidth[i] };
                //    this.gridView1.Columns.Add(cCols[i]);
                //    MyDevExpressFunctions.SetHeaderAlignmentGridView(this.gridView1, gridView1.Columns.Count - 1);
                //    MyDevExpressFunctions.SetCellAlignmentGridView(this.gridView1, gridView1.Columns.Count - 1);
                //}
                MyDevExpressFunctions.InitGridControl(this.gridView1, 0);

                int iColumnCount = oHeaderText2.Length;



                DevExpress.XtraGrid.Columns.GridColumn[] cCols = new DevExpress.XtraGrid.Columns.GridColumn[iColumnCount];
                for (int i = 0; i < iColumnCount; i++)
                {
                    cCols[i] = new DevExpress.XtraGrid.Columns.GridColumn()
                    {
                        FieldName = Enum.GetNames(typeof(DbColumnIndex2))[i].ToString(), Name = Enum.GetNames(typeof(DbColumnIndex2))[i], Caption = oHeaderText2[i], Visible = true, Width = HeaderWidth2[i]
                    };
                    if (oHeaderText2[i] == "생산순서")
                    {
                        cCols[i].Visible = false;
                    }
                    this.gridView1.Columns.Add(cCols[i]);
                    MyDevExpressFunctions.SetHeaderAlignmentGridView(this.gridView1, gridView1.Columns.Count - 1);
                    MyDevExpressFunctions.SetCellAlignmentGridView(this.gridView1, gridView1.Columns.Count - 1);
                }


                MyDevExpressFunctions.InitGridControl(this.gridView2, 0);
                this.gridView2.OptionsBehavior.Editable = true;
                iColumnCount = oHeaderText3.Length;

                cCols = new DevExpress.XtraGrid.Columns.GridColumn[iColumnCount];
                for (int i = 0; i < iColumnCount; i++)
                {
                    RepositoryItemCheckEdit repositoryItemCheckEdit = new RepositoryItemCheckEdit();
                    repositoryItemCheckEdit.ValueChecked    = "True";
                    repositoryItemCheckEdit.ValueUnchecked  = "False";
                    repositoryItemCheckEdit.CheckedChanged += RepositoryItemCheckEdit_CheckedChanged;
                    cCols[i] = new DevExpress.XtraGrid.Columns.GridColumn()
                    {
                        FieldName = Enum.GetNames(typeof(DbColumnIndex3))[i].ToString(), Name = Enum.GetNames(typeof(DbColumnIndex3))[i], Caption = oHeaderText3[i], Visible = true, Width = HeaderWidth3[i]
                    };
                    if (oHeaderText3[i] == "선택")
                    {
                        cCols[i].ColumnEdit = repositoryItemCheckEdit;
                    }
                    if (oHeaderText3[i] == "선택2")
                    {
                        cCols[i].ColumnEdit = repositoryItemCheckEdit;
                    }

                    this.gridView2.Columns.Add(cCols[i]);

                    MyDevExpressFunctions.SetHeaderAlignmentGridView(this.gridView2, gridView2.Columns.Count - 1);
                    MyDevExpressFunctions.SetCellAlignmentGridView(this.gridView2, gridView2.Columns.Count - 1);
                }
                this.gridView2.OptionsSelection.ShowCheckBoxSelectorInColumnHeader         = DevExpress.Utils.DefaultBoolean.True; // 체크박스 전체 선택가능 헤더만들지 여부
                this.gridView2.OptionsSelection.ResetSelectionClickOutsideCheckboxSelector = true;                                 // 셀밖에 값을 눌러도 체크박스 온오프만 적용됨
                //gridView2.OptionsSelection.MultiSelect = true;
                //gridView2.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
                gridView2.VisibleColumns[2].OptionsColumn.ShowCaption = false;
                //this.gridView2.CustomDrawColumnHeader += GridView2_CustomDrawColumnHeader;



                MyDevExpressFunctions.InitGridControl(this.gridView3, 0);
                this.gridView3.OptionsBehavior.Editable = true;
                iColumnCount = oHeaderText3.Length;

                cCols = new DevExpress.XtraGrid.Columns.GridColumn[iColumnCount];
                for (int i = 0; i < iColumnCount; i++)
                {
                    cCols[i] = new DevExpress.XtraGrid.Columns.GridColumn()
                    {
                        FieldName = Enum.GetNames(typeof(DbColumnIndex3))[i].ToString(), Name = Enum.GetNames(typeof(DbColumnIndex3))[i], Caption = oHeaderText3[i], Visible = true, Width = HeaderWidth3[i]
                    };
                    if (oHeaderText3[i] == "선택")
                    {
                        cCols[i].Visible = false;
                    }
                    if (oHeaderText3[i] == "선택2")
                    {
                        cCols[i].Visible = false;
                    }
                    this.gridView3.Columns.Add(cCols[i]);

                    MyDevExpressFunctions.SetHeaderAlignmentGridView(this.gridView3, gridView3.Columns.Count - 1);
                    MyDevExpressFunctions.SetCellAlignmentGridView(this.gridView3, gridView3.Columns.Count - 1);
                }
                this.slueSelect.Text = "50000198";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }