Ejemplo n.º 1
0
        /// <summary>
        /// Muestra el filtro por Sales Room & Salesman
        /// </summary>
        /// <history>
        /// [ecanul] 03/05/2016 Created
        /// </history>
        private void ShowDateRangeSm()
        {
            _frmFilter = new frmFilterDateRange {
                frmPrs = this, Owner = this
            };
            StaStart("Loading Date Range Window...");
            switch (_rptSalesman)
            {
            case EnumRptSalesRoomAndSalesman.Manifest:
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom, shGroupsByTeams: true, groupByTeams: _clsFilter.BlnGroupedByTeams, isBySalesman: true, shRoles: true);
                break;

            default:
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom, shGroupsByTeams: true, groupByTeams: _clsFilter.BlnGroupedByTeams, isBySalesman: true);
                break;
            }
            _frmFilter.ShowDialog();
            StaEnd();
            if (!_frmFilter.ok)
            {
                return;
            }
            ShowReportBySalesman(_rptSalesman, _clsFilter);
            _frmFilter.Close();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Muestra el filtro por Sales Room
        /// </summary>
        /// <history>
        /// [ecanul] 03/05/2016 Created
        /// </history>
        private void ShowDateRangeSr()
        {
            _frmFilter = new frmFilterDateRange {
                frmPrs = this, Owner = this
            };
            StaStart("Loading Date Range Window...");
            switch (_rptRoomSales)
            {
            case EnumRptSalesRoom.StatsBySegments:
            case EnumRptSalesRoom.StatsBySegmentsCategories:
            case EnumRptSalesRoom.StatsBySegmentsOwn:
            case EnumRptSalesRoom.StatsBySegmentsCategoriesOwn:
            case EnumRptSalesRoom.StatsByFtbAndLocatios:
            case EnumRptSalesRoom.StatsByFtbAndLocatiosCategories:
                _frmFilter.ConfigurarFomulario(_salesRoom, shGroupsByTeams: true, groupByTeams: _clsFilter.BlnGroupedByTeams, shAllSalesmen: true, allSalesmen: _clsFilter.BlnIncludeAllSalesmen, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom);
                break;

            case EnumRptSalesRoom.StatsBySegmentsCategoriesMultiDatesRanges:
                //Se usa para indicar que no se mostrara el filtro de datos y que las fechas se usaran las que tenga el grid
                _multiDate = true;
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, groupByTeams: _clsFilter.BlnGroupedByTeams, shGroupsByTeams: true, allSalesmen: _clsFilter.BlnIncludeAllSalesmen, shAllSalesmen: true, blnSalesRoom: false, shMultiDateRanges: true);
                break;

            case EnumRptSalesRoom.StatsByFtb:
            case EnumRptSalesRoom.StatsByCloser:
            case EnumRptSalesRoom.StatsByExitCloser:
                _frmFilter.ConfigurarFomulario(_salesRoom, shGroupsByTeams: true, groupByTeams: _clsFilter.BlnGroupedByTeams, shAllSalesmen: true, allSalesmen: _clsFilter.BlnIncludeAllSalesmen, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnSegments: true, blnAllSegments: true, blnPrograms: true);
                break;

            case EnumRptSalesRoom.DailySales:
                _onlyOnRegister = false;
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom, isGoal: true);
                break;

            case EnumRptSalesRoom.ConcerntrateDailySales:
                _frmFilter.ConfigurarFomulario(_salesRoom, blnSalesRoom: false, shConcentrate: true);
                break;

            case EnumRptSalesRoom.EfficiencyWeekly:
                _frmFilter.ConfigurarFomulario(_salesRoom, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom, period: EnumPeriod.Weekly, shWeeks: true, onePeriod: true);
                break;

            case EnumRptSalesRoom.StatsByLocation:
            case EnumRptSalesRoom.StatsByLocationAndSalesRoom:
                _onlyOnRegister = false;
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom);
                break;

            case EnumRptSalesRoom.StatsByLocationMonthly:
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom, period: EnumPeriod.Monthly, onePeriod: true); //queda pendiente blnoneperiod Obliga a que siempre sea de mes en mes
                break;

            case EnumRptSalesRoom.SalesByLocationMonthly:
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom, period: EnumPeriod.Monthly);
                break;

            default:
                _frmFilter.ConfigurarFomulario(_salesRoom, multiDate: _multiDate, blnOnlyOneRegister: _onlyOnRegister, blnAllSalesRoom: _allSalesRoom);
                break;
            }
            _frmFilter.ShowDialog();
            StaEnd();
            if (!_frmFilter.ok)
            {
                return;
            }
            ShowReportBySalesRoom(_rptRoomSales, _clsFilter);
            _frmFilter.Close();
        }