Пример #1
0
        /// <summary>
        /// CMDs the menu click.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="Gizmox.WebGUI.Forms.MenuItemEventArgs"/> instance containing the event data.</param>
        void cmdMenuClick(object sender, MenuItemEventArgs e)
        {
            //Control[] controls = this.Form.Controls.Find("wspPane", true);
            //if (controls.Length > 0)
            //{
            //    Panel wspPane = (Panel)controls[0];
            //    wspPane.Text = (string)e.MenuItem.Text;
            //}

            if (!(e.MenuItem.Tag == null))
            {
                switch (e.MenuItem.Tag.ToString().ToLower())
                {
                case "sales_worksheet":
                    SalesWizard wizSalesInput = new SalesWizard(EnumHelper.TxType.CAS);
                    wizSalesInput.ShowDialog();
                    break;

                case "sales_worksheet_fast":
                    FastModeLogin fastLogin = new FastModeLogin();
                    fastLogin.Closed += new EventHandler(fastLogin_Closed);
                    fastLogin.ShowDialog();
                    break;

                case "sales_authorization":
                    Authorization wizAuthPrice = new Authorization(EnumHelper.TxType.CAS);
                    wizAuthPrice.SalesType = EnumHelper.TxType.CAS;
                    wizAuthPrice.ShowDialog();
                    break;

                case "salesreturn_worksheet":
                    SalesWizard wizDiscChange = new SalesWizard(EnumHelper.TxType.CRT);
                    wizDiscChange.ShowDialog();
                    break;

                case "salesreturn_authorization":
                    Authorization wizAuthDisc = new Authorization(EnumHelper.TxType.CRT);
                    wizAuthDisc.SalesType = EnumHelper.TxType.CRT;
                    wizAuthDisc.ShowDialog();
                    break;

                case "rpt_salesworksheet":
                    Reports.Worksheet wizPriceWorksheet = new RT2020.EmulatedPoS.Reports.Worksheet(EnumHelper.TxType.CAS);
                    wizPriceWorksheet.SalesType = EnumHelper.TxType.CAS;
                    wizPriceWorksheet.ShowDialog();
                    break;

                case "rpt_saleshistory":
                    Reports.History wizPriceHistory = new RT2020.EmulatedPoS.Reports.History(EnumHelper.TxType.CAS);
                    wizPriceHistory.SalesType = EnumHelper.TxType.CAS;
                    wizPriceHistory.ShowDialog();
                    break;

                case "rpt_salesreturnworksheet":
                    Reports.Worksheet wizDiscWorksheet = new RT2020.EmulatedPoS.Reports.Worksheet(EnumHelper.TxType.CRT);
                    wizDiscWorksheet.SalesType = EnumHelper.TxType.CRT;
                    wizDiscWorksheet.ShowDialog();
                    break;

                case "rpt_salesreturnhistory":
                    Reports.History wizDiscHistory = new RT2020.EmulatedPoS.Reports.History(EnumHelper.TxType.CRT);
                    wizDiscHistory.SalesType = EnumHelper.TxType.CRT;
                    wizDiscHistory.ShowDialog();
                    break;
                }
            }
        }