Esempio n. 1
0
        private void GoToEmpAddressBook(object sender, RoutedEventArgs e)
        {
            var navigationParameters = new NavigationParameters();
            var data = employeeService.GetAll();

            navigationParameters.Add("DataToDisplay", data.GetHashCode().ToString());
            AppParameters.Save(data.GetHashCode(), data);
            navigationParameters.Add("ReportPath", @"Reports\EmployeeAddressBook.rdlc");
            navigationParameters.Add("ReportDataSourceName", "EmployeeAddressBook");

            this.regionManager.RequestNavigate(RegionNames.WorkingArea,
                                               new Uri("ReportWindowView" + navigationParameters.ToString(), UriKind.Relative));
        }
        private void Phones()
        {
            var navigationParameters = new NavigationParameters();
            var data = employeeService.GetAll();

            navigationParameters.Add("DataToDisplay", data.GetHashCode().ToString());
            AppParameters.Save(data.GetHashCode(), data);
            navigationParameters.Add("ReportPath", @"Reports\EmployeePhoneList.rdlc");
            //navigationParameters.Add("Parameters",);
            navigationParameters.Add("ReportDataSourceName", "EmployeePhoneList");

            this.regionManager.RequestNavigate(RegionNames.WorkingArea,
                                               new Uri("ReportWindowView" + navigationParameters.ToString(), UriKind.Relative));
        }
        private void BHE()
        {
            var navigationParameters = new NavigationParameters();

            Mapper.CreateMap <WorkHour, BasicWorkHourVM>();
            Mapper.CreateMap <Employee, BasicEmployeeVM>();
            Mapper.CreateMap <WorkCode, BasicWorkCodeVM>();

            var data       = workHourService.GetReport().Where(a => a.WorkCode.Billable == true).ToList();
            var bworkhours = new List <BasicWorkHourVM>();

            foreach (WorkHour wh in data)
            {
                bworkhours.Add(Mapper.Map <WorkHour, BasicWorkHourVM>(wh));
            }
            navigationParameters.Add("DataToDisplay", bworkhours.GetHashCode().ToString());
            AppParameters.Save(bworkhours.GetHashCode(), bworkhours);
            navigationParameters.Add("ReportPath", @"Reports\HoursByEmployee.rdlc");
            navigationParameters.Add("ReportDataSourceName", "HoursByEmployee");

            this.regionManager.RequestNavigate(RegionNames.WorkingArea,
                                               new Uri("ReportWindowView" + navigationParameters.ToString(), UriKind.Relative));
        }