private void PopulateExec() { BsfGlobal.OpenCRMDB(); dtTarget = new DataTable(); string stt = ""; string newS = ""; try { stt = m_sExecId.TrimEnd(','); for (int i = 0; i < stt.Length; i++) { newS += stt[i].ToString(); } dtTarget = TargetEntryBL.GetExecutive(newS); grdTarget.DataSource = dtTarget; grdViewTarget.Columns["RowId"].Visible = false; grdViewTarget.Columns["ExecutiveId"].Visible = false; grdViewTarget.Columns["Sel"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; RepositoryItemCheckEdit chkSel = new RepositoryItemCheckEdit(); chkSel.CheckedChanged += chkSel_CheckedChanged; grdViewTarget.BestFitColumns(); BsfGlobal.g_CRMDB.Close(); grdViewTarget.OptionsCustomization.AllowFilter = false; grdViewTarget.OptionsBehavior.AllowIncrementalSearch = true; grdViewTarget.OptionsView.ShowAutoFilterRow = false; grdViewTarget.OptionsView.ShowViewCaption = false; grdViewTarget.OptionsView.ShowFooter = false; grdViewTarget.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect; grdViewTarget.OptionsSelection.InvertSelection = false; grdViewTarget.OptionsView.ColumnAutoWidth = true; grdViewTarget.Appearance.HeaderPanel.Font = new Font(grdViewTarget.Appearance.HeaderPanel.Font, FontStyle.Bold); grdViewTarget.Appearance.FocusedCell.BackColor = Color.Teal; grdViewTarget.Appearance.FocusedCell.ForeColor = Color.White; grdViewTarget.Appearance.FocusedRow.ForeColor = Color.Teal; grdViewTarget.Appearance.FocusedRow.BackColor = Color.White; grdViewTarget.OptionsSelection.EnableAppearanceHideSelection = false; } catch (Exception e) { throw e; } }
private void navBarItem7_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { bool bAns = false; bAns = TargetEntryBL.PowerUserFound(); if (bAns == true) { MessageBox.Show("Don't have Permission to View"); return; } panelControl1.Controls.Clear(); frmExecutiveAnalysis frmRR = new frmExecutiveAnalysis() { TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill }; panelControl1.Controls.Add(frmRR); frmRR.Show(); }
private void btnExecu_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Cursor.Current = Cursors.WaitCursor; bool bAns = false; bAns = TargetEntryBL.PowerUserFound(); if (bAns == true) { MessageBox.Show("Don't have Permission to View"); return; } panelControl1.Controls.Clear(); frmExecutiveAnalysis frmRR = new frmExecutiveAnalysis() { TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill }; panelControl1.Controls.Add(frmRR); frmRR.Show(); Cursor.Current = Cursors.Default; }