Beispiel #1
0
        private void displayNewListInstance()
        {
            bool displayInstance = ValidationService.isNotPreviousDate(this.datePickerList.Value.Date);

            // Desplegar control de instancia si cumple las validaciones
            if (displayInstance)
            {
                LotteryDrawTypeRepository typeRepository = new LotteryDrawTypeRepository();
                ListInstanceForm          listInstance   = new ListInstanceForm(
                    this.appMediator,
                    this,
                    UtilityService.getPointSale(),
                    typeRepository.getById(this.drawTypeBox.SelectedIndex),
                    this.datePickerList.Value.Date
                    );
                listInstance.StartPosition = FormStartPosition.CenterParent;
                //listInstance.ShowDialog();
                listInstance.ShowDialog(this);
                //listInstance.Show(this);
                //listInstance.resetCurrentListCell();
            }
            else
            {
                MessageService.displayWarningMessage(GeneralConstants.NOT_ALLOWED_PREVIOUS_DATE_SALE_MESSAGE, GeneralConstants.NOT_ALLOWED_PREVIOUS_DATE_SALE_TITLE);
            }
        }
Beispiel #2
0
        private bool copyAndDisplayListInstance(long pDrawTypeId)
        {
            bool                successResult = true;
            ListService         listService   = new ListService();
            LDT_LotteryDrawType selectedGroup = this.groupService.getById(pDrawTypeId);
            ListInstanceForm    listInstance  = new ListInstanceForm(
                this.appMediator,
                this.selectorForm,
                UtilityService.getPointSale(),
                selectedGroup,
                DateTime.Today,
                listService.getListDetail(this.listId)
                );

            listInstance.StartPosition = FormStartPosition.CenterParent;
            listInstance.ShowDialog();
            //MessageBox.Show("Display: " + selectedGroup.LDT_DisplayName);
            return(successResult);
        }