Esempio n. 1
0
        /// <summary>
        /// Determina si un regalo es manejado por un sistema externo
        /// </summary>
        /// <param name="ExternalProduct"></param>
        /// <param name="_Gift"></param>
        /// <returns></returns>
        /// <history>
        /// [vipacheco] 26/Mayo/2016 Created
        /// </history>
        public static bool IsExternalProduct(EnumExternalProduct ExternalProduct, string _Gift, ref Gift _GiftResult)
        {
            string FieldName = "";
            bool   blnIs     = false;


            // si es el monedero electronico
            if (ExternalProduct == EnumExternalProduct.expElectronicPurse)
            {
                FieldName = "giProductGiftsCard";
            }
            // si son las promociones de PVP
            else
            {
                FieldName = "giPVPPromotion";
            }

            // localizamos el regalo
            _GiftResult = frmHost._lstGifts.Where(x => x.giID == _Gift).First();
            Type type = _GiftResult.GetType();

            blnIs = type.GetProperty(FieldName).GetValue(_GiftResult, null) == null ? false : true;


            return(blnIs);
        }
Esempio n. 2
0
        public frmCancelExternalProducts(EnumExternalProduct enumExternalProducts, int ReceiptID, int GuestID,
                                         string NameGuest, decimal MaxAuthGifts, decimal TotalGifts, decimal CurAdjustment,
                                         bool ValidateMaxAuthGifts, bool pUseCxCCost, bool Exchange, frmGiftsReceipts FrmGiftsReceipt, GiftsReceipt pGiftsDataContext, bool pIsExchangeReceipt)
        {
            _EnumExternalProduct       = enumExternalProducts;
            _ReceiptID                 = ReceiptID;
            _MaxAuthGifts              = MaxAuthGifts;
            _GuestID                   = GuestID;
            _ValidateMaxAuthGifts      = ValidateMaxAuthGifts;
            useCxCCost                 = pUseCxCCost;
            _Exchange                  = Exchange;
            _isExchangeReceipt         = pIsExchangeReceipt;
            _Cancelled                 = false;
            _FrmGiftsReceipt           = FrmGiftsReceipt;
            _FrmCancelExternalProducts = this;
            _giftsDataContext          = pGiftsDataContext;
            _CurAdjustment             = CurAdjustment;
            _TotalGifts                = TotalGifts;

            InitializeComponent();

            // Si es monedero electronico
            if (_EnumExternalProduct == EnumExternalProduct.expElectronicPurse)
            {
                Title        = "Cancel Electronic Purse";
                _CancelField = "geCancelElectronicPurse";
                geCancelPVPPromoColumn.Visibility = Visibility.Hidden;
            }
            // si son las promociones de Sistur
            else
            {
                Title        = "Cancel Sistur Promotions";
                _CancelField = "geCancelPVPPromo";
                geCancelElectronicPurseColumn.Visibility = Visibility.Hidden;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Consulta los regalos de un recibo que tienen asociados productos externos y que pueden ser cancelados
 /// </summary>
 /// <param name="GuestID"></param>
 /// <param name="EnumExternal"></param>
 /// <param name="package"></param>
 /// <history>
 /// [vipacheco] 16/Mayo/2016 Created
 /// </history>
 public static List <GiftsReceiptDetailCancel> GetGiftsReceiptDetailCancel(int GuestID, EnumExternalProduct EnumExternal, bool?package = false)
 {
     using (var dbContext = new IMEntities(ConnectionHelper.ConnectionString()))
     {
         return(dbContext.USP_OR_GetGiftsReceiptDetailCancel(GuestID, (byte)EnumExternal, package).ToList());
     }
 }