public static string BuildHistoricalQuotesUrl(string symbol, EnumPeriod period, EnumTimeFrame timeFrame, int timeFrameValue)
 {
     return string.Format("api/hist/{0}/{1}/{2}-{3}",
         symbol.ToLower(),
         period.ToString().ToLower(),
         timeFrameValue,
         timeFrame.ToString().ToLower()
         );
 }
        public void ConfigurarFomulario(
            string salesRoom = null, //Necesarios segun el tipo de reporte
                                     //Checks arriba de los grids y configuracion del friltro
            bool blnAllSalesRoom = false, bool blnAllSegments = false, bool multiDate = false, bool blnOnlyOneRegister = false, bool groupByTeams = false,
            bool allSalesmen     = false, bool shRoles        = false, bool onePeriod = false,
            //Enumerados,
            EnumPeriod period = EnumPeriod.None, EnumBasedOnArrival?basedOnArrival = null, EnumQuinellas?quinellas = null,
            //para saber que mostrar Grids
            bool blnSalesRoom = true, bool blnPrograms = false, bool blnSegments = false, bool shMultiDateRanges = false, bool shConcentrate = false, bool shWeeks = false,
            //para saber que mostrar Filtros
            bool shGroupsByTeams = false, bool shAllSalesmen = false, bool isBySalesman = false, bool isGoal = false)
        {
            //Datos siempre usados
            _salesRoom = salesRoom;
            _period    = period;
            _onePeriod = onePeriod;
            _shWeeks   = shWeeks;
            //Configura Fechas
            ConfigureDates(multiDate, period);
            //configura la visibilidad de los filtros
            ConfigureFilters(basedOnArrival, quinellas, shGroupsByTeams, groupByTeams, shAllSalesmen, allSalesmen, isGoal, isBySalesman, shRoles);

            #region Configuracion de Grids.
            LoadSalesRooms(blnOnlyOneRegister, blnSalesRoom, blnAllSalesRoom, shMultiDateRanges, shConcentrate);
            LoadPrograms(blnPrograms);
            LoadSegments(blnSegments, blnAllSegments);
            LoadEfficiencyWeek();
            #endregion Configuracion de Grids.

            //Toma la configuracion del padre
            LoadUserFilters();
            EnumPredefinedDate selected = (EnumPredefinedDate)(cmbDate).SelectedValue;
            grdDtmStart.IsEnabled = grdDtgEnd.IsEnabled = (selected == EnumPredefinedDate.DatesSpecified);
            //configura el check all de los grids
            // ConfigureSelection(onlyOneRegister, allPrograms, allSegments);
        }
Exemple #3
0
        /// <summary>
        /// Configuracion de controles del formulario.
        /// </summary>
        /// <history>
        /// [edgrodriguez] 03/Mar/2016 Created
        /// [emoguel] 29/09/2016 Modified--->Se agregó un parametro para saber si mostrará el combo de "DateBasedOn" y el nombre del reporte
        /// </history>
        public void ConfigurarFomulario(bool blnSalesRoom           = false, bool blnAllSalesRoom        = false, bool blnGifts       = false, bool blnAllGifts        = false,
                                        bool blnCategories          = false, bool blnAllCategories       = false, bool blnPrograms    = false, bool blnAllPrograms     = false,
                                        bool blnRatetypes           = false, bool blnAllRatetypes        = false, bool blnLeadSources = false, bool blnAllLeadSources  = false,
                                        bool blnWarehouse           = false, bool blnAllWarehouse        = false, bool blnOneDate     = false, bool blnOnlyOneRegister = false, EnumPeriod enumPeriod = EnumPeriod.None,
                                        EnumProgram enumPrograms    = EnumProgram.All, bool blnOnePeriod = false, EnumBasedOnArrival enumBasedOnArrival = EnumBasedOnArrival.NoBasedOnArrival,
                                        EnumQuinellas enumQuinellas = EnumQuinellas.NoQuinellas, EnumDetailGifts enumDetailGifts = EnumDetailGifts.NoDetailGifts, EnumSaveCourtesyTours?enumSaveCourtesyTours = null,
                                        EnumSalesByMemberShipType enumSalesByMemberShipType = EnumSalesByMemberShipType.NoDetail, EnumBasedOnBooking enumBasedOnBooking = EnumBasedOnBooking.NoBasedOnBooking,
                                        EnumExternalInvitation?enumExternalInvitation       = null, bool blncbStatus = false, bool blnGiftReceiptType = false, bool blnGuestId = false, bool blnGiftSale = false, bool blnDateRange = true, bool blnDateBaseOn = false, string strReportName = "")
        {
            ConfigureDates(blnOneDate, enumPeriod, blnDateRange);
            ConfigureFilters(enumBasedOnArrival, enumQuinellas, enumDetailGifts, enumSaveCourtesyTours,
                             enumSalesByMemberShipType, enumBasedOnBooking, enumExternalInvitation, blncbStatus, blnGiftReceiptType,
                             blnGuestId, blnGiftSale, blnDateBaseOn);

            LoadCombos();

            #region Configuracion de Grids.
            LoadSalesRooms(blnOnlyOneRegister, blnSalesRoom, blnAllSalesRoom);
            LoadCategories(blnOnlyOneRegister, blnCategories, blnAllCategories);
            LoadGifts(blnOnlyOneRegister, blnGifts, blnAllGifts);
            LoadLeadSources(blnOnlyOneRegister, blnLeadSources, blnAllLeadSources);
            LoadPrograms(blnOnlyOneRegister, blnPrograms, blnAllPrograms);
            LoadRateTypes(blnOnlyOneRegister, blnRatetypes, blnAllRatetypes);
            LoadWarehouses(blnOnlyOneRegister, blnWarehouse, blnAllWarehouse);
            #endregion Configuracion de Grids.
            LoadDateBasedOn(strReportName);
            LoadUserFilters(blnOneDate);
        }
Exemple #4
0
        /// <summary>
        /// Llena el grid de goals
        /// </summary>
        /// <history>
        /// [emoguel] created 11/05/2016
        /// </history>
        private async void LoadGoals()
        {
            try
            {
                status.Visibility = Visibility.Visible;
                EnumPeriod period = ((EnumPeriod)cmbPeriod.SelectedValue);
                _goal.gopy       = cmbPlace.SelectedValue.ToString();
                _goal.gopd       = (period == EnumPeriod.Monthly) ? "M" : "W";
                _goal.goDateFrom = Convert.ToDateTime(dtpFrom.Value);
                _goal.goDateTo   = Convert.ToDateTime(dtpTo.Value);

                #region DataGridCombobox
                switch (_goal.gopy)
                {
                case "LS":
                {
                    cmbLoc.SelectedValuePath = "lsID";
                    cmbLoc.DisplayMemberPath = "lsN";
                    LoadLeadSources();
                    break;
                }

                case "LO":
                {
                    cmbLoc.SelectedValuePath = "loID";
                    cmbLoc.DisplayMemberPath = "loN";
                    LoadLocations();
                    break;
                }

                case "SR":
                {
                    cmbLoc.SelectedValuePath = "srID";
                    cmbLoc.DisplayMemberPath = "srN";
                    LoadSalesRooms();
                    break;
                }

                case "WH":
                {
                    cmbLoc.SelectedValuePath = "whID";
                    cmbLoc.DisplayMemberPath = "whN";
                    LoadWarehouses();
                    break;
                }
                }
                #endregion

                List <Goal> lstGoal = await BRGoals.GetGoals(_goal);

                _lstAllGoals = new List <Goal>();
                lstGoal.ForEach(go =>
                {
                    Goal goal = new Goal();
                    ObjectHelper.CopyProperties(goal, go);
                    _lstAllGoals.Add(goal);
                });
                if (lstGoal.Count == 0)
                {
                    LoadGoalsDefault(_goal);
                }
                else
                {
                    dgrGoals.ItemsSource = lstGoal;
                }
                status.Visibility = Visibility.Collapsed;
            }
            catch (Exception ex)
            {
                UIHelper.ShowMessage(ex);
            }
        }
Exemple #5
0
        /// <summary>
        /// Llena el combo de range dates dependiendo lo seleccionado
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <history>
        /// [emoguel] created 10/05/2016
        /// </history>
        private void cmbPeriod_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            EnumPeriod period = ((EnumPeriod)cmbPeriod.SelectedValue);

            ComboBoxHelper.ConfigureDates(cmbRangeDate, period, selectedCmb: 1);
        }
 public LoadHistoricalQuotesRequest(string symbol, EnumPeriod period)
 {
     _symbol = symbol;
     _period = period;
 }
 public StoreHistoricalQuotesRequest(string symbol, EnumPeriod period, HistoricalQuotes data)
     : base(symbol, period)
 {
     Data = data;
 }
Exemple #8
0
        /// <summary>
        /// Configura los controles del formulario
        /// </summary>
        /// <history>
        ///   [vku] 22/Mar/2016 Created
        /// </history>
        public void ConfigureForm(bool blnLeadSource          = false, bool blnLeadSourcesPaymentComm = false, bool blnAllLeadSource = false, bool blnAllLeadSourcePaymentComm = false,
                                  bool blnPaymentTypes        = false, bool blnAllPaymentTypes        = false, bool blnPRs = false, bool blnAllPRs        = false,
                                  bool blnChargeTo            = false, bool blnAllChargeTo     = false, bool blnGifts      = false, bool blnAllGifts      = false, bool blnGiftProdGift = false, bool blnAllGiftProdGift = false, bool blnRangeFolios = false, bool blnAllRangeFolios = false,
                                  bool blnOneDate             = false, bool blnOnlyOneRegister = false, bool blnChkUsedate = false, EnumPeriod enumPeriod = EnumPeriod.None,
                                  EnumProgram enumPrograms    = EnumProgram.Outhouse, bool blnOnePeriod = false, EnumBasedOnArrival enumBasedOnArrival = EnumBasedOnArrival.NoBasedOnArrival,
                                  EnumQuinellas enumQuinellas = EnumQuinellas.NoQuinellas, EnumDetailGifts enumDetailGifts = EnumDetailGifts.NoDetailGifts, EnumSaveCourtesyTours?enumSaveCourtesyTours = null,
                                  EnumSalesByMemberShipType enumSalesByMemberShipType = EnumSalesByMemberShipType.NoDetail, EnumBasedOnBooking enumBasedOnBooking = EnumBasedOnBooking.NoBasedOnBooking,
                                  EnumExternalInvitation?enumExternalInvitation       = null, bool blnFolSeries = false, bool blnFolFrom = false, bool blnFolTo = false, bool blnUseDates = false, bool blnAllFolios = false)
        {
            ConfigureDates(blnOneDate, enumPeriod);
            ConfigureFilters(enumBasedOnArrival, enumQuinellas, enumDetailGifts, enumSaveCourtesyTours,
                             enumSalesByMemberShipType, enumBasedOnBooking, enumExternalInvitation, blnFolSeries, blnFolFrom, blnFolTo, blnUseDates, blnAllFolios);

            LoadCombos();

            #region Configuracion de grids
            LoadLeadSources(blnOnlyOneRegister, blnLeadSource, blnAllLeadSource, enumPrograms);
            LoadLeadSourcesPaymentCoom(blnOnlyOneRegister, blnLeadSourcesPaymentComm, blnAllLeadSourcePaymentComm);
            LoadPaymentTypes(blnOnlyOneRegister, blnPaymentTypes, blnAllPaymentTypes);
            LoadPRs(blnOnlyOneRegister, blnPRs, blnAllPRs);
            LoadChargeTo(blnOnlyOneRegister, blnChargeTo, blnAllChargeTo);
            LoadGifts(blnOnlyOneRegister, blnGifts, blnAllGifts);
            LoadGiftsProdGift(blnOnlyOneRegister, blnGiftProdGift, blnAllGiftProdGift);
            #endregion

            LoadUserFilters();
        }