Пример #1
0
        /// <summary>
        /// Carga el historico
        /// </summary>
        /// <history>
        /// [vipacheco] 07/Junio/2016 Created
        /// </history>
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            _dsGifsReceiptLog = ((CollectionViewSource)(this.FindResource("dsGifsReceiptLog")));

            _busyIndicator.IsBusy    = true;
            _dsGifsReceiptLog.Source = await BRGiftsReceiptLog.GetGiftsReceiptLog(_ReceiptID);

            _busyIndicator.IsBusy = false;
        }
Пример #2
0
        /// <summary>
        /// Guarda el recibo de regalos exchange
        /// </summary>
        /// <history>
        /// [vipacheco] 27/Mayo/2016 Created
        /// </history>
        private async Task SaveReceiptExchange()
        {
            // obtenemos los datos del recibo
            GiftsReceipt _GRResult = await BRGiftsReceipts.GetGiftReceipt(_ReceiptID);

            // Construimos el nuevo GiftsReceipts
            GiftsReceipt _GiftsReceipt = new GiftsReceipt()
            {
                grNum            = txtgrNum.Text,
                grD              = frmHost.dtpServerDate,
                grgu             = _GRResult.grgu,
                grExchange       = true,
                grGuest          = _GRResult.grGuest,
                grPax            = _GRResult.grPax,
                grHotel          = _GRResult.grHotel,
                grRoomNum        = _GRResult.grRoomNum,
                grpe             = _GRResult.grpe,
                grlo             = _GRResult.grlo,
                grls             = _GRResult.grls,
                grsr             = _GRResult.grsr,
                grWh             = _GRResult.grWh,
                grMemberNum      = _GRResult.grMemberNum,
                grHost           = _GRResult.grHost,
                grComments       = txtgrComments.Text,
                grDeposit        = 0,
                grDepositTwisted = 0,
                grcu             = "US",
                grcxcPRDeposit   = 0,
                grcucxcPRDeposit = "US",
                grCxCClosed      = false,
                grExchangeRate   = 0,
                grct             = _GRResult.grct,
                grMaxAuthGifts   = _GRResult.grMaxAuthGifts,
                grcxcGifts       = 0,
                grcxcComments    = null,
                grTaxiIn         = 0,
                grTaxiOut        = 0,
                grCancel         = false,
                grClosed         = false,
                grCxCAppD        = null,
                grTaxiOutDiff    = 0,
                grGuest2         = _GRResult.grGuest2,
                grcucxcTaxiOut   = _GRResult.grcucxcTaxiOut,
                grpt             = _GRResult.grpt
            };

            // Guardamos el Gift Receipt
            ReceiptExchangeID = await BRGiftsReceipts.SaveGiftReceipt(_GiftsReceipt);

            // Guardamos el historico del recibo
            await BRGiftsReceiptLog.SaveGiftsReceiptsLog(ReceiptExchangeID, Context.User.User.peID);
        }
Пример #3
0
        /// <summary>
        /// Guarda los Gifts Receipt Additional ingresados
        /// </summary>
        /// <history>
        /// [vipacheco] 12/Mayo/2016 Created
        /// </history>
        private async void btnSave_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            int lngReceiptID = 0;
            int lngGuestID   = 0;

            foreach (GetGiftsReceiptsAdditional currentRow in dtgGuestsAdditional.Items)
            {
                // si se desea generar el recibo de regalos
                if (currentRow.Generate.Value)
                {
                    lngGuestID = currentRow.gaAdditional;

                    // Agregamos el recibo de regalos
                    lngReceiptID = await AddReceipt(lngGuestID);

                    GiftsReceiptsShort giftReceiptShort = new GiftsReceiptsShort()
                    {
                        grID = lngReceiptID, grNum = "", grExchange = false
                    };
                    _frmGiftsReceipt.obsGiftsReceipt.Add(giftReceiptShort);

                    // Agregamos los regalos del recibo
                    AddGifts(lngGuestID, lngReceiptID);

                    // Indica que el huesped ya tiene recibo de regalos
                    Guest _Guest = await BRGuests.GetGuest(lngGuestID, true);

                    _Guest.guGiftsReceived = true;
                    await BREntities.OperationEntity(_Guest, Model.Enums.EnumMode.Edit);

                    // Actualizamos los regalos de la invitacion
                    UpdateInvitsGifts(lngReceiptID, lngGuestID);

                    // Guardamos el historico del recibo
                    await BRGiftsReceiptLog.SaveGiftsReceiptsLog(lngReceiptID, _frmGiftsReceipt.txtChangedBy.Text);
                }
            }
            Close();
        }
Пример #4
0
 /// <summary>
 /// Guarda el historico de recibos de regalos
 /// </summary>
 /// <param name="intReceiptID">Clave del recibo de regalos</param>
 /// <param name="strChangedBy">Clave del usuario que esta haciendo el cambio</param>
 /// <returns></returns>
 /// <history>
 /// [michan] 18/06/2016 Created
 /// </history>
 public async Task SaveGiftsReceiptsLog(int intReceiptID, string strChangedBy)
 {
     await BRGiftsReceiptLog.SaveGiftsReceiptsLog(intReceiptID, strChangedBy);
 }