Ejemplo n.º 1
0
        private void btnEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            //bar1.Visible = false;
            DataView dvData;

            if (BsfGlobal.FindPermission("Pre-Followup-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Pre-Followup-Modify");
                return;
            }
            if (BsfGlobal.g_bWorkFlowDialog == true)
            {
                return;
            }
            if (grdCallSheetView.GetFocusedRow() == null)
            {
                return;
            }

            if (grdCallSheetView.FocusedRowHandle >= 0)
            {
                int entryId; bool bAns = false;
                if (BsfGlobal.g_bWorkFlowDialog == true)
                {
                    return;
                }
                dvData = new DataView(dtCallSht)
                {
                    RowFilter = String.Format("EntryId={0}", Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("EntryId")))
                };
                entryId = Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("EntryId"));
                string s = grdCallSheetView.GetFocusedRowCellValue("CallType").ToString();
                bAns = CallSheetEntryBL.CallSheetFound(Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("LeadId")), entryId);

                frmCallsheetEntry frmCsEntry = new frmCallsheetEntry()
                {
                    TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill
                };

                if (bAns == false)
                {
                    //UpdateChildren(frmCsEntry.groupControl1.Controls, true);
                    //frmCsEntry.btnBroker.Enabled = false;
                    //frmCsEntry.btnSave.Enabled = false;
                }
                else if (s == "Finalization")
                {
                    //UpdateChildren(frmCsEntry.groupControl1.Controls, true);
                    frmCsEntry.btnBroker.Enabled = true;
                    frmCsEntry.btnSave.Enabled   = true;
                    frmBuyer frm = new frmBuyer();
                    //UpdateChildren(frm.groupControl1.Controls, true);
                    frm.btnBroker.Enabled      = true;
                    frm.cboBroker.Enabled      = true;
                    frm.txtCommAmt.Enabled     = true;
                    frm.txtCommpercent.Enabled = true;
                    frm.btnSave.Enabled        = true;
                    frm.btnCancel.Enabled      = true;
                }

                //frmCsEntry.FillCallSheet = dtData;
                //frmCsEntry.TopLevel = false;
                //frmCsEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                //frmCsEntry.Dock = DockStyle.Fill;

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView = grdCallSheetView;
                    m_oGridMasterView.FocusedRowHandle = grdCallSheetView.FocusedRowHandle;
                    m_iFocusRowId = grdCallSheetView.FocusedRowHandle;
                    m_sTxtRemarks = txtRemarks;

                    BsfGlobal.g_bTrans = true;
                    m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
                    m_oDW.Hide();
                    BsfGlobal.g_bTrans = false;
                    Cursor.Current     = Cursors.WaitCursor;
                    PanelControl oPanel = new PanelControl();
                    oPanel = BsfGlobal.GetPanel(frmCsEntry, "Followup Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frmCsEntry);
                    frmCsEntry.i_RowId = m_iFocusRowId;
                    frmCsEntry.Execute("E", entryId, "CallReg");
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    m_oGridMasterView = grdCallSheetView;
                    m_oGridMasterView.FocusedRowHandle = grdCallSheetView.FocusedRowHandle;
                    m_iFocusRowId = grdCallSheetView.FocusedRowHandle;
                    m_sTxtRemarks = txtRemarks;

                    CommFun.DW1.Hide();
                    CommFun.DW2.Text    = "FollowUp Entry";
                    frmCsEntry.TopLevel = false;
                    CommFun.RP2.Controls.Clear();
                    frmCsEntry.FormBorderStyle = FormBorderStyle.None;
                    frmCsEntry.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frmCsEntry);
                    frmCsEntry.i_RowId = m_iFocusRowId;
                    frmCsEntry.Execute("E", entryId, "CallReg");
                    CommFun.DW2.Show();
                }
            }
        }
Ejemplo n.º 2
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Pre-Followup-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Pre-Followup-Modify");
                return;
            }
            if (BsfGlobal.g_bWorkFlowDialog == true)
            {
                return;
            }
            if (grdTargetRegView.GetFocusedRow() == null)
            {
                return;
            }

            if (grdTargetRegView.FocusedRowHandle >= 0)
            {
                int iEntryId;
                if (BsfGlobal.g_bWorkFlowDialog == true)
                {
                    return;
                }
                iEntryId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId"));
                frmExecTarget frm = new frmExecTarget()
                {
                    TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill
                };

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView = grdTargetRegView;
                    m_oGridMasterView.FocusedRowHandle = grdTargetRegView.FocusedRowHandle;
                    m_iFocusRowId = grdTargetRegView.FocusedRowHandle;

                    BsfGlobal.g_bTrans = true;
                    m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
                    m_oDW.Hide();
                    BsfGlobal.g_bTrans = false;
                    Cursor.Current     = Cursors.WaitCursor;
                    PanelControl oPanel = new PanelControl();
                    oPanel = BsfGlobal.GetPanel(frm, "Target Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frm);
                    frm.i_RowId = m_iFocusRowId;
                    frm.Execute(iEntryId);
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    m_oGridMasterView = grdTargetRegView;
                    m_oGridMasterView.FocusedRowHandle = grdTargetRegView.FocusedRowHandle;
                    m_iFocusRowId = grdTargetRegView.FocusedRowHandle;

                    CommFun.DW1.Hide();
                    CommFun.DW2.Text = "Target Entry";
                    frm.TopLevel     = false;
                    CommFun.RP2.Controls.Clear();
                    frm.FormBorderStyle = FormBorderStyle.None;
                    frm.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frm);
                    frm.i_RowId = m_iFocusRowId;
                    frm.Execute(iEntryId);
                    CommFun.DW2.Show();
                }
            }
        }
Ejemplo n.º 3
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.g_bWorkFlowDialog == true)
            {
                return;
            }
            if (grdLeadRegView.GetFocusedRow() == null)
            {
                return;
            }

            if (grdLeadRegView.FocusedRowHandle >= 0)
            {
                int LeadId; bool bAns = false;
                if (BsfGlobal.g_bWorkFlowDialog == true)
                {
                    return;
                }
                //dvData = new DataView(dtCallSht) { RowFilter = String.Format("EntryId={0}", Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("EntryId").ToString())) };
                LeadId = Convert.ToInt32(grdLeadRegView.GetFocusedRowCellValue("LeadId"));
                //string s = grdCallSheetView.GetFocusedRowCellValue("CallType").ToString();
                //bAns = CallSheetEntryBL.CallSheetFound(Convert.ToInt32(grdCallSheetView.GetFocusedRowCellValue("LeadId")), entryId);

                frmNewLead frm = new frmNewLead()
                {
                    TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill
                };

                //if (bAns == false)
                //{
                //    //UpdateChildren(frmCsEntry.groupControl1.Controls, true);
                //    //frmCsEntry.btnBroker.Enabled = false;
                //    //frmCsEntry.btnSave.Enabled = false;
                //}
                //else if (s == "Finalization")
                //{
                //    //UpdateChildren(frmCsEntry.groupControl1.Controls, true);
                //    frmCsEntry.btnBroker.Enabled = true;
                //    frmCsEntry.btnSave.Enabled = true;
                //    frmBuyer frm = new frmBuyer();
                //    //UpdateChildren(frm.groupControl1.Controls, true);
                //    frm.btnBroker.Enabled = true;
                //    frm.cboBroker.Enabled = true;
                //    frm.txtCAmt.Enabled = true;
                //    frm.txtCommpercent.Enabled = true;
                //    frm.btnSave.Enabled = true;
                //    frm.btnCancel.Enabled = true;
                //}

                ////frmCsEntry.FillCallSheet = dtData;
                ////frmCsEntry.TopLevel = false;
                ////frmCsEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                ////frmCsEntry.Dock = DockStyle.Fill;

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView = grdLeadRegView;
                    m_oGridMasterView.FocusedRowHandle = grdLeadRegView.FocusedRowHandle;
                    m_iFocusRowId = grdLeadRegView.FocusedRowHandle;

                    BsfGlobal.g_bTrans = true;
                    m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
                    m_oDW.Hide();
                    BsfGlobal.g_bTrans = false;
                    Cursor.Current     = Cursors.WaitCursor;
                    PanelControl oPanel = new PanelControl();
                    oPanel = BsfGlobal.GetPanel(frm, "Lead Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frm);
                    frm.i_RowId = m_iFocusRowId;
                    frm.Execute(LeadId);
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    m_oGridMasterView = grdLeadRegView;
                    m_oGridMasterView.FocusedRowHandle = grdLeadRegView.FocusedRowHandle;
                    m_iFocusRowId = grdLeadRegView.FocusedRowHandle;

                    CommFun.DW1.Hide();
                    CommFun.DW2.Text = "Lead Entry";
                    frm.TopLevel     = false;
                    CommFun.RP2.Controls.Clear();
                    frm.FormBorderStyle = FormBorderStyle.None;
                    frm.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frm);
                    frm.i_RowId = m_iFocusRowId;
                    frm.Execute(LeadId);
                    CommFun.DW2.Show();
                }
            }
        }
Ejemplo n.º 4
0
        private void barbtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Executive Target-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Executive Target-Modify");
                return;
            }
            barTargetReg.Visible = false;
            if (grdTargetRegView.FocusedRowHandle >= 0)
            {
                int i_RegModeId = 0; s_RegMode = "E";
                i_RegModeId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId").ToString());
                frmTargetEntry frm = new frmTargetEntry()
                {
                    TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill
                };

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    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, "Executive Target Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frm);
                    frm.Execute(s_RegMode, i_RegModeId, "Reg");
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    Cursor.Current = Cursors.WaitCursor;
                    panelTargetReg.Controls.Clear();
                    panelTargetReg.Controls.Add(frm);
                    frm.Execute(s_RegMode, i_RegModeId, "Reg");
                    Cursor.Current = Cursors.Default;
                }
            }
            //barTargetReg.Visible = false;
            //if (BsfGlobal.g_bWorkFlowDialog == true)
            //    return;
            //frmTargetEntry frm = new frmTargetEntry();
            //frm.TopLevel = false;
            //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            //frm.Dock = DockStyle.Fill;

            //if (BsfGlobal.g_bWorkFlow == true)
            //{
            //    BsfGlobal.g_bTrans = true; PanelControl oPanel = new PanelControl();
            //    //oPanel = BsfGlobal.GetPanel(frm, "Executive Target Entry");
            //    if (oPanel != null)
            //    {
            //        s_RegMode = "E";
            //        i_RegModeId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId"));
            //        BsfGlobal.g_bTrans = true;
            //        m_oDW = (DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
            //        m_oDW.Hide();
            //        BsfGlobal.g_bTrans = false;
            //        Cursor.Current = Cursors.WaitCursor;
            //        //PanelControl oPanel = new PanelControl();
            //        oPanel = BsfGlobal.GetPanel(frm, "Executive Target Entry");
            //        if ((oPanel == null))
            //            return;
            //        oPanel.Controls.Clear();
            //        oPanel.Controls.Add(frm);
            //        frm.Execute(s_RegMode, i_RegModeId, "Reg");
            //        oPanel.Visible = true;
            //        Cursor.Current = Cursors.Default;
            //    }
            //}
            //else
            //{
            //    if (grdTargetRegView.FocusedRowHandle >= 0)
            //    {
            //        barTargetReg.Visible = false;
            //        s_RegMode = "E";
            //        i_RegModeId = Convert.ToInt32(grdTargetRegView.GetFocusedRowCellValue("TargetId"));
            //        panelTargetReg.Controls.Clear();
            //        frmTargetEntry frmTargetEnt = new frmTargetEntry() { TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill };
            //        frmTargetEnt.Execute(s_RegMode, i_RegModeId,"Reg");
            //        CommFun.DW1.Text = "Executive Target Entry";
            //        panelTargetReg.Controls.Add(frmTargetEnt);
            //        frmTargetEnt.Show();
            //    }
            //    else
            //        return;
            //}
        }