Ejemplo n.º 1
0
        /// <summary>
        /// Obtiene los Guests By PR
        /// </summary>
        /// <param name="dateFrom">fecha inicial</param>
        /// <param name="dateTo">fecha final</param>
        /// <param name="leadSources">LeadoSource</param>
        /// <param name="PR">Pr</param>
        /// <param name="filters">Filters</param>
        /// <history>
        /// [erosado]       16/Mar/2016 Created
        /// [edgrodriguez]  26/Sep/2016 Modified. Se agrega el parámetro Program.
        /// </history>
        public async void DoGetGuestsByPR(DateTime dateFrom, DateTime dateTo, string leadSources, string program, string PR, List <bool> filters)
        {
            try
            {
                var data = await BRGuests.GetGuestsByPR(dateFrom, dateTo, leadSources, program, PR, filters);

                if (data.Count > 0)
                {
                    dtgr.DataContext     = data;
                    StatusBarReg.Content = $"{(dtgr.SelectedIndex + 1).ToString()}/{dtgr.Items.Count.ToString()}";
                }
                else
                {
                    UIHelper.ShowMessage("There is no data");
                    dtgr.DataContext = null;
                }
                StaEnd();
                imgButtonOk.IsEnabled    = true;
                imgButtonPrint.IsEnabled = true;
            }
            catch (Exception ex)
            {
                StaEnd();
                imgButtonOk.IsEnabled = true;
                UIHelper.ShowMessage(ex);
            }
        }