Exemplo n.º 1
0
        private ReportInfo GetReportInfo()
        {
            var parameters = new Dictionary <string, object>
            {
                { "start_date", dateperiodpicker.StartDateOrNull },
                { "end_date", dateperiodpicker.EndDateOrNull },
                { "creation_date", DateTime.Now }
            };

            if (userIsSalesRepresentative)
            {
                var currentEmployee = employeeRepository.GetEmployeeForCurrentUser(UoW);

                parameters.Add("order_author_include", new[] { currentEmployee.Id.ToString() });
                parameters.Add("order_author_exclude", new[] { "0" });
            }

            foreach (var item in filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            return(new ReportInfo {
                Identifier = ycheckbuttonDetail.Active ? "Sales.SalesReportDetail" : "Sales.SalesReport",
                Parameters = parameters
            });
        }
        private ReportInfo GetReportInfo()
        {
            var parameters = new Dictionary <string, object>
            {
                { "start_date", dateperiodpicker.StartDateOrNull },
                { "end_date", dateperiodpicker.EndDate.AddDays(1).AddTicks(-1) }
            };

            foreach (var item in _filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            return(new ReportInfo {
                Identifier = "Orders.OnecComments",
                UseUserVariables = true,
                Parameters = parameters
            });
        }
Exemplo n.º 3
0
        private ReportInfo GetReportInfo()
        {
            var parameters = new Dictionary <string, object>
            {
                { "start_date", dateperiodpicker.StartDateOrNull },
                { "end_date", dateperiodpicker.EndDateOrNull }
            };

            foreach (var item in filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            return(new ReportInfo
            {
                Identifier = "ServiceCenter.EquipmentReport",
                Parameters = parameters
            });
        }
Exemplo n.º 4
0
        private ReportInfo GetReportInfo()
        {
            string reportId;
            var    warehouse = yentryrefWarehouse.Subject as Warehouse;

            if (warehouse == null)
            {
                reportId = "Store.StockWaterMovements";
            }
            else if (warehouse.TypeOfUse == WarehouseUsing.Shipment)
            {
                reportId = "Store.StockShipmentMovements";
            }
            else if (warehouse.TypeOfUse == WarehouseUsing.Production)
            {
                reportId = "Store.StockProductionMovements";
            }
            else
            {
                throw new NotImplementedException("Неизвестный тип использования склада.");
            }

            var parameters = new Dictionary <string, object>
            {
                { "startDate", dateperiodpicker1.StartDateOrNull.Value },
                { "endDate", dateperiodpicker1.EndDateOrNull.Value },
                { "warehouse_id", warehouse?.Id ?? -1 },
                { "creationDate", DateTime.Now },
                { "sortType", string.Join(", ", selectableSortTypeNodes.Where(x => x.Selected).Select(x => x.SortType.ToString())) }
            };

            foreach (var item in filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            return(new ReportInfo
            {
                Identifier = reportId,
                Parameters = parameters
            });
        }
Exemplo n.º 5
0
        private ReportInfo GetReportInfo()
        {
            var parameters = new Dictionary <string, object>
            {
                { "StartDate", dateperiodpicker.StartDateOrNull },
                { "EndDate", dateperiodpicker.EndDateOrNull },
                { "DateType", yenumcomboboxDateType.SelectedItem.ToString() }
            };

            foreach (var item in _filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            return(new ReportInfo
            {
                Identifier = "Sales.SalesByDiscountReport",
                Parameters = parameters
            });
        }
Exemplo n.º 6
0
        private ReportInfo GetReportInfo()
        {
            var parameters = new Dictionary <string, object>
            {
                { "date", ydatepicker.Date.ToString("yyyy-MM-dd") },
                { "geo_group_id", (lstGeoGrp.SelectedItem as GeographicGroup)?.Id ?? 0 },
                { "creation_date", DateTime.Now }
            };

            foreach (var item in _filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            var repInfo = new ReportInfo {
                Identifier = "Store.GoodsToShipOnDate",
                Parameters = parameters
            };

            return(repInfo);
        }
Exemplo n.º 7
0
        private ReportInfo GetReportInfo()
        {
            var parameters = new Dictionary <string, object>
            {
                { "start_date", daterangepicker.StartDate },
                { "end_date", daterangepicker.EndDate.AddHours(23).AddMinutes(59).AddSeconds(59) },
                { "date", DateTime.Now },
                { "date_type", ((OrderDateType)yenumcomboboxDateType.SelectedItem) == OrderDateType.CreationDate },
                { "is_closed_order_only", chkClosedOrdersOnly.Active }
            };

            foreach (var item in _filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            return(new ReportInfo
            {
                Identifier = "Bottles.ReturnedTareReport",
                Parameters = parameters
            });
        }
Exemplo n.º 8
0
        private ReportInfo GetReportInfo()
        {
            var parameters = new Dictionary <string, object>
            {
                { "start_date", dateperiodpicker.StartDateOrNull },
                { "end_date", dateperiodpicker.EndDateOrNull.Value.AddDays(1).AddTicks(-1) },
                { "is_creation_date", (OrderDateType)comboTypeOfDate.SelectedItem == OrderDateType.CreationDate }
            };

            foreach (var item in _filter.GetParameters())
            {
                parameters.Add(item.Key, item.Value);
            }

            string identifier;

            //Если не выбран ни один сотрудник, открываем общий отчет, иначе подробный по сотрудникам
            if (parameters.ContainsKey(_orderAuthorIncludeParameter) &&
                parameters[_orderAuthorIncludeParameter] is object[] values &&
                values.Length == 1 &&
                values[0] == "0")
            {
                identifier = "Sales.PlanImplementationFullReport";
            }