示例#1
0
        private void navBarControl1_MouseDown(object sender, MouseEventArgs e)
        {
            navBarControl1.ActiveGroup = null;
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            var navBar = sender as NavBarControl;

            if (navBar == null)
            {
                return;
            }
            var hitInfo = navBar.CalcHitInfo(new Point(e.X, e.Y));

            if (!hitInfo.InLink)
            {
                return;
            }
            switch (hitInfo.Link.ItemName)
            {
            case "navBarItem3":
                var xtraUser = new FrmBaseList {
                    Dock = DockStyle.Fill
                };
                panelControl4.Controls.Add(xtraUser);
                break;

            case "":
                break;
            }
        }
示例#2
0
        private void txtDepCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            FrmBaseList fList = new FrmBaseList(1);

            if (DialogResult.OK == fList.ShowDialog())
            {
                txtDepCode.Text = fList.sID;
                txtDepName.Text = fList.sText;
            }
        }
示例#3
0
        private void ItemButtonEditDep_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                int iRow = 0;
                if (gridView1.RowCount > 0)
                {
                    iRow = gridView1.FocusedRowHandle;
                }

                FrmBaseList fList = new FrmBaseList(1);
                fList.Text = "部门信息";
                if (fList.ShowDialog() == DialogResult.OK)
                {
                    gridView1.SetRowCellValue(iRow, gridColcDepCode, fList.sID);
                    gridView1.SetRowCellValue(iRow, gridColcDepName, fList.sText);
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
        }