Example #1
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Post-Followup-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Post-Followup-Modify");
                return;
            }
            //bar1.Visible = false;
            if (grdViewCall.FocusedRowHandle >= 0)
            {
                int iEntryId = 0;
                iEntryId = Convert.ToInt32(grdViewCall.GetFocusedRowCellValue("EntryId").ToString());
                frmFollowUp frm = new frmFollowUp()
                {
                    TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill
                };

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView = grdViewCall;
                    m_oGridMasterView.FocusedRowHandle = grdViewCall.FocusedRowHandle;
                    BsfGlobal.g_bTrans = true;
                    m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
                    m_oDW.Hide();
                    BsfGlobal.g_bTrans = false;
                    Cursor.Current     = Cursors.WaitCursor;
                    PanelControl oPanel = new PanelControl();
                    oPanel = BsfGlobal.GetPanel(frm, "Post-FollowUp Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frm);
                    frm.Execute(iEntryId, "E");
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    iEntryId = Convert.ToInt32(grdViewCall.GetFocusedRowCellValue("EntryId").ToString());
                    CommFun.DW1.Hide();
                    frm = new frmFollowUp();
                    CommFun.DW2.Text = "Post-FollowUp Entry";
                    frm.TopLevel     = false;
                    CommFun.RP2.Controls.Clear();
                    frm.FormBorderStyle = FormBorderStyle.None;
                    frm.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frm);
                    frm.Execute(iEntryId, "E");
                    CommFun.DW2.Show();
                    //Cursor.Current = Cursors.WaitCursor;
                    //panelControl1.Controls.Clear();
                    //panelControl1.Controls.Add(frm);
                    //frm.Execute(iEntryId,"E");
                    //Cursor.Current = Cursors.Default;
                }
            }
        }
Example #2
0
        private void btnPostEntry_ItemClick(object sender, ItemClickEventArgs e)
        {
            dwHome.Hide();
            documentWindow1.Hide();
            dwHome.Text = "PostSale FollowUp Entry";
            frmFollowUp frm = new frmFollowUp()
            {
                TopLevel = false
            };

            radPanel1.Controls.Clear();
            frm.FormBorderStyle = Alias.FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;
            radPanel1.Controls.Add(frm);
            frm.Execute();
            dwHome.Show();
        }