Beispiel #1
0
        private void btnNewDeal_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            if (ClassDBUtils.IsAllowed(ClassGenLib.username, "POST NEW DEAL") == false)
            {
                MessageBox.Show("Access denied! Insufficient rights to perform the function.", "Falcon", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            NewDeal nwdeal = new NewDeal();

            nwdeal.ShowDialog();
        }
Beispiel #2
0
        private void vwTrades_KeyUp(object sender, KeyEventArgs e)
        {
            string reportName = "";
            string dealno     = "";

            if (e.KeyCode == Keys.F3)
            {
                //print the deal not for the selected deal(s)
                for (int i = 0; i < vwTrades.RowCount; i++)
                {
                    if (vwTrades.IsRowSelected(i))
                    {
                        dealno = vwTrades.GetRowCellValue(i, "dealno").ToString();
                        if (dealno.Substring(0, 1) == "B")
                        {
                            ViewReports.BNOTE bnote = new ViewReports.BNOTE();
                            bnote.Parameters["dealno"].Value = dealno;

                            ((SqlDataSource)bnote.DataSource).ConfigureDataConnection += ClientTrades_ConfigureDataConnection;
                            ReportPrintTool tool = new ReportPrintTool(bnote);
                            tool.ShowPreview();
                        }
                        else if (dealno.Substring(0, 1) == "S")
                        {
                            ViewReports.SNOTE snote = new ViewReports.SNOTE();
                            snote.Parameters["dealno"].Value = dealno;


                            ((SqlDataSource)snote.DataSource).ConfigureDataConnection += ClientTrades_ConfigureDataConnection;
                            ReportPrintTool tool = new ReportPrintTool(snote);
                            tool.ShowPreview();
                        }
                        break;
                    }
                }
            }
            if (e.KeyCode == Keys.F10)
            {
                NewDeal ndeal = new NewDeal();
                ndeal.ShowDialog();
            }
        }