Example #1
0
        private async void eraseList(long pListId)
        {
            // Obtener la lista por el id
            ListService     listService = new ListService();
            LTL_LotteryList list        = listService.getById(pListId);

            // Modificar el estado y guardar localmente
            list.LLS_LotteryListStatus = SystemConstants.LIST_STATUS_CANCELED;
            list.SYS_SynchronyStatus   = SystemConstants.SYNC_STATUS_PENDING_TO_SERVER;
            listService.updateList(list);
            // Reversar la lista en el servidor
            SynchronizeService syncService = new SynchronizeService();
            await syncService.processReverseToServerAsync(list);

            // Acciones posteriores a la reversiĆ³n
            this.Hide();
            MessageService.displayInfoMessage(GeneralConstants.SUCCESS_TRANSACTION_CANCELATION_MESSAGE, GeneralConstants.SUCCESS_TRANSACTION_CANCELATION_TITLE);
            LotteryDrawRepository     drawRepository     = new LotteryDrawRepository();
            LotteryDrawTypeRepository drawTypeRepository = new LotteryDrawTypeRepository();
            ListInstanceForm          listInstance       = new ListInstanceForm(
                this.appMediator,
                this,
                UtilityService.getPointSale(),
                drawTypeRepository.getById(drawRepository.getById(list.LTD_LotteryDraw).LDT_LotteryDrawType),
                DateTime.Today,
                listService.getListDetail(pListId)
                );

            listInstance.StartPosition = FormStartPosition.CenterParent;
            listInstance.ShowDialog();
            //listInstance.ShowDialog(this);
        }
Example #2
0
 public MainOptionMenu(ApplicationMediator pMediator, ListInstanceForm pListInstance)
 {
     this.appMediator  = pMediator;
     this.listInstance = pListInstance;
     InitializeComponent();
 }
Example #3
0
 public ListNameForm(ListInstanceForm pListInstance)
 {
     this.listInstance = pListInstance;
     //this.listInstance.mainOptionMenu.Dispose();
     InitializeComponent();
 }