示例#1
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="selectionMode">The selection mode.</param>
        /// <param name="shifts">The collection of shifts.</param>
        public ResumeShiftForm(ShiftSelectionMode selectionMode, IList <IPosBatchStaging> shifts)
        {
            // Required for Windows Form Designer support
            InitializeComponent();

            this.shiftsData         = shifts;
            this.shiftSelectionMode = selectionMode;
        }
示例#2
0
        /// <summary>
        /// Shows the shift selection form.
        /// </summary>
        /// <param name="mode">The mode.</param>
        /// <param name="shifts">The shifts.</param>
        /// <returns></returns>
        private static IPosBatchStaging ShowShiftSelectionForm(ShiftSelectionMode mode, IList <IPosBatchStaging> shifts)
        {
            IPosBatchStaging shift = null;

            using (ResumeShiftForm dialog = new ResumeShiftForm(mode, shifts))
            {
                // Form is shown on top of Login form, so should not use POSFormsManager
                dialog.ShowDialog();

                if (dialog.DialogResult == DialogResult.OK)
                {
                    shift = dialog.SelectedShift;
                }
            }

            return(shift);
        }