Example #1
0
 public FrmOpenCloseTeller(bool isOpen)
 {
     InitializeComponent();
     _isOpen = isOpen;
     Text = isOpen ? GetString("openTellerText") : GetString("closeTellerText");
     InitializeTellersComboBox();
     labelCurrency.Text = ServicesProvider.GetInstance().GetCurrencyServices().GetPivot().Code;
     if (isOpen)
         OpenOfDayAmountEvent = new OpenOfDayAmountEvent();
     else
         CloseOfDayAmountEvent = new CloseOfDayAmountEvent();
 }
Example #2
0
        private static TellerEvent GetTellerEvent(string code)
        {
            TellerEvent e;
            switch (code)
            {
                case OTellerEvents.CashIn:
                    e = new TellerCashInEvent();
                    break;

                case OTellerEvents.CashOut:
                    e = new TellerCashOutEvent();
                    break;

                case OTellerEvents.OpenDay:
                    e = new OpenOfDayAmountEvent();
                    break;

                case OTellerEvents.CloseDay:
                    e = new CloseOfDayAmountEvent();
                    break;

                case OTellerEvents.OpenDayPositiveDifference:
                    e = new OpenAmountPositiveDifferenceEvent();
                    break;

                case OTellerEvents.OpenDayNegativeDifference:
                    e = new OpenAmountNegativeDifferenceEvent();
                    break;

                case OTellerEvents.CloseDayPositiveDifference:
                    e = new CloseAmountPositiveDifferenceEvent();
                    break;

                case OTellerEvents.CloseDayNegativeDifference:
                    e = new CloseAmountNegativeDifferenceEvent();
                    break;

                default:
                    Debug.Fail("Failed to create teller events");
                    throw new Exception();
            }

            return e;
        }