Beispiel #1
0
        private void btnCEntry_ItemClick(object sender, ItemClickEventArgs e)
        {
            CommFun.DW1.Text = "Complaint Entry";
            radPanel1.Controls.Clear();
            frmComplaintEntry frmCompEntry = new frmComplaintEntry();

            frmCompEntry.TopLevel        = false;
            frmCompEntry.FormBorderStyle = Alias.FormBorderStyle.None;
            frmCompEntry.Dock            = DockStyle.Fill;
            frmCompEntry.Radpanel        = radPanel1;
            radPanel1.Controls.Add(frmCompEntry);
            frmCompEntry.Show();
        }
Beispiel #2
0
        private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("ComplaintRegister-Add") == false)
            {
                MessageBox.Show("You don't have Rights to ComplaintRegister-Add", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }
            //Radpanel.Controls.Clear();
            frmComplaintEntry frmCompEntry = new frmComplaintEntry();

            if (BsfGlobal.g_bWorkFlow == true)
            {
                BsfGlobal.g_bTrans = true;
                oPanel             = BsfGlobal.GetPanel(frmCompEntry, "Complaint Entry");
                if (oPanel != null)
                {
                    oPanel.Controls.Clear();
                    frmCompEntry.TopLevel        = false;
                    frmCompEntry.FormBorderStyle = FormBorderStyle.None;
                    frmCompEntry.Dock            = DockStyle.Fill;
                    oPanel.Controls.Add(frmCompEntry);
                    //frmBr.Execute("E", iAdvRegId, sApprve);
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
            }
            else
            {
                Radpanel.Controls.Clear();
                frmCompEntry.Radpanel        = Radpanel;
                frmCompEntry.TopLevel        = false;
                frmCompEntry.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                frmCompEntry.Dock            = DockStyle.Fill;
                Radpanel.Controls.Add(frmCompEntry);
            }

            frmCompEntry.Show();
        }
Beispiel #3
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (DGvTransView.FocusedRowHandle < 0)
            {
                return;
            }
            if (BsfGlobal.FindPermission("Complaint-Entry-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to ComplaintRegister-Modify", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            //bar1.Visible = false;
            if (DGvTransView.FocusedRowHandle >= 0)
            {
                int ComplaintId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("ComplaintId").ToString());
                //frmComplaintEntry frmCompEntry = new frmComplaintEntry() { TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill };

                string Approve = CommFun.IsNullCheck(DGvTransView.GetRowCellValue(DGvTransView.FocusedRowHandle, "Approve"), CommFun.datatypes.vartypestring).ToString();
                if (Approve != "Partial" && Approve != "Yes")
                {
                    string sUserName = BsfGlobal.CheckEntryUsed("Complaint-Entry-Modify", ComplaintId, BsfGlobal.g_sCRMDBName);
                    if (sUserName != "")
                    {
                        string sMsg = "The Entry is already Used by " + sUserName;
                        sMsg = sMsg + ", Do not Edit";
                        MessageBox.Show(sMsg);
                        return;
                    }
                }

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

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView = DGvTransView;
                    m_oGridMasterView.FocusedRowHandle = DGvTransView.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(frmProg, "Complaint Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frmProg);
                    frmProg.Execute(ComplaintId);
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    ComplaintId = Convert.ToInt32(DGvTransView.GetRowCellValue(DGvTransView.FocusedRowHandle, "ComplaintId"));
                    CommFun.DW1.Hide();
                    frmProg          = new frmComplaintEntry();
                    CommFun.DW2.Text = "Complaint Entry";
                    frmProg.TopLevel = false;
                    CommFun.RP2.Controls.Clear();
                    frmProg.FormBorderStyle = FormBorderStyle.None;
                    frmProg.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frmProg);
                    frmProg.Execute(ComplaintId);
                    CommFun.DW2.Show();
                }
                //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(frmCompEntry, "Complaint Entry");
                //    if ((oPanel == null))
                //        return;
                //    oPanel.Controls.Clear();
                //    oPanel.Controls.Add(frmCompEntry);
                //    frmCompEntry.Execute(PBRegId);
                //    oPanel.Visible = true;
                //    Cursor.Current = Cursors.Default;
                //}
                //else
                //{
                //    Cursor.Current = Cursors.WaitCursor;
                //    panelControl1.Controls.Clear();
                //    panelControl1.Controls.Add(frmCompEntry);
                //    frmCompEntry.Execute(PBRegId);
                //    Cursor.Current = Cursors.Default;
                //}
            }
        }