コード例 #1
0
        //ClearInfoWares = Escape
        //AddWaresReceipt = Enter

        void PrintReceipt(TypePay parTypePay)
        {
            switch (Global.GetTypeAccess(CodeEvent.PrintReceipt))
            {
            case TypeAccess.NoErrorAccess:
                ErrorAccess(CodeEvent.PrintReceipt);
                break;

            case TypeAccess.Question:

            case TypeAccess.Yes:
                Clear();
                SetView(ModeInterface.PrintReceipt);
                SetViewPay(parTypePay);
                break;
            }
        }
コード例 #2
0
        bool KeyProcedureMainInput(Keys parKeys, int parOption = 0)
        {
            int varKeys = (int)parKeys;

            if (MainInputKeyMap.ClearInfoWares == varKeys)
            {
                ClearInfoWares();
            }
            else if (MainInputKeyMap.IncrementWares == varKeys && parOption != 1 && Global.GetTypeAccess(CodeEvent.IncrementWares) == TypeAccess.Yes)
            {
                IncrementWares();
            }
            else if (MainInputKeyMap.DecrementWares == varKeys && parOption != 1 && Global.GetTypeAccess(CodeEvent.DecrementWares) == TypeAccess.Yes)
            {
                DecrementWares();
            }
            else if (MainInputKeyMap.PrintReceipt_Cash == varKeys)
            {
                PrintReceipt(TypePay.Cash);
            }
            else if (MainInputKeyMap.PrintReceipt_Pos == varKeys)
            {
                PrintReceipt(TypePay.Pos);
            }
            else if (MainInputKeyMap.PrintReceipt_NonCash == varKeys)
            {
                PrintReceipt(TypePay.NonCash);
            }
            else if (MainInputKeyMap.AddWaresReceipt == varKeys && parOption == 1)
            {
                AddWaresReceipt();
            }
            else if (MainInputKeyMap.DeleteWaresReceipt_Current == varKeys)
            {
                DeleteWaresReceipt(TypeDeleteWaresReceipt.Current);
            }
            else if (MainInputKeyMap.DeleteWaresReceipt_All == varKeys)
            {
                DeleteWaresReceipt(TypeDeleteWaresReceipt.All);
            }
            else if (MainInputKeyMap.DeleteWaresReceipt_Choice == varKeys)
            {
                DeleteWaresReceipt(TypeDeleteWaresReceipt.Choice);
            }
            else if (MainInputKeyMap.EditQuantityWares == varKeys)
            {
                EditQuantityWares();
            }
            else if (MainInputKeyMap.ChangeCurrentReceipt == varKeys)
            {
                ChangeCurrentReceipt();
            }
            else if (MainInputKeyMap.NewReceipt == varKeys)
            {
                NewReceipt();
            }
            else if (MainInputKeyMap.RecalcPrice == varKeys)
            {
                varWork.RecalcPrice();
            }
            else if (MainInputKeyMap.Help == varKeys)
            {
                Help();
            }
            else if (MainInputKeyMap.PrintZ == varKeys)
            {
                varWork.PrintZ();
            }
            else if (MainInputKeyMap.PrintX == varKeys)
            {
                varWork.PrintX();
            }
            else if (MainInputKeyMap.CountCash == varKeys)
            {
                CountCash();
            }
            else if (MainInputKeyMap.UpdateData == varKeys)
            {
                varWork.UpdateData();
            }
            else if (MainInputKeyMap.PrintPosX == varKeys)
            {
                varWork.PrintPosX();
            }
            else if (MainInputKeyMap.PrintPosZ == varKeys)
            {
                varWork.PrintPosZ();
            }
            else if (MainInputKeyMap.InputOutputMoney == varKeys)
            {
                InputOutputMoney();
            }
            else if (MainInputKeyMap.ReturnLastReceipt == varKeys)
            {
                ReturnLastReceipt();
            }
            else if (MainInputKeyMap.ReturnOtherWorkplace == varKeys)
            {
                ReturnOtherWorkplace();
            }
            else if (MainInputKeyMap.ReturnReceipt == varKeys)
            {
                ReturnReceipt();
            }
            else if (MainInputKeyMap.ReturnAnyReceipt == varKeys)
            {
                ReturnAnyReceipt();
            }
            else
            {
                return(false);
            }
            return(true);
        }