public async void BindProdajeTipovaKarata()
        {
            // ProdajaTipSearchRequest request = new ProdajaTipSearchRequest { EventId = this.EventId };

            ProdajaTipSearchRequest request = new ProdajaTipSearchRequest
            {
                EventId          = this.EventId,
                IsProdajaVecaOd0 = ckbBrProdKarata.Checked,
                TipKarteNaziv    = txtTipKarte.Text
            };
            var prodajeTipoveKarata = await _service.Get <List <ProdajaTip> >(request);

            dgvProdajaTip.DataSource = prodajeTipoveKarata;
        }
        private async void frmOrganizatorIzvjestaj_Load(object sender, EventArgs e)
        {
            organizator = await _organizatorService.GetById <Organizator>(OrgId);

            EventSearchRequest request = new EventSearchRequest {
                OrganizatorId = OrgId
            };

            eventi = await _eventiService.Get <List <Event> >(request);

            foreach (var item in eventi)
            {
                eventIzvjestaji.Add(new EventIzvjestaj
                {
                    Naziv             = item.Naziv,
                    DatumOdrzavanja   = item.DatumOdrzavanja.ToShortDateString(),
                    KategorijaNaziv   = item.KategorijaNaziv,
                    Mjesto            = item.ProstorOdrzavanjaGradAdresa,
                    VrijemeOdrzavanja = item.VrijemeOdrzavanja
                });
            }

            foreach (var item in eventi)
            {
                ProdajaTipSearchRequest searchRequest = new ProdajaTipSearchRequest {
                    EventId = item.Id
                };
                var vraceniProdajaTipovi = await _prodajaTipService.Get <List <ProdajaTip> >(searchRequest);

                prodajaTipovi.AddRange(vraceniProdajaTipovi);
            }

            ReportDataSource rdsEvent = new ReportDataSource("DataSet1", eventIzvjestaji);

            this.reportViewer1.LocalReport.DataSources.Add(rdsEvent);

            ReportDataSource rdsPrTipovi = new ReportDataSource("DataSet2", prodajaTipovi);

            this.reportViewer1.LocalReport.DataSources.Add(rdsPrTipovi);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("OrganizatorNaziv", organizator.Naziv));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Telefon", organizator.Telefon));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Email", organizator.Email));


            this.reportViewer1.RefreshReport();
        }
Example #3
0
        public async Task Init()
        {
            ProdajaTipSearchRequest request = new ProdajaTipSearchRequest {
                EventId = this.EventId
            };

            prodajaTipovi = await _prodajaTipService.Get <List <ProdajaTip> >(request);

            ProdajaTipList.Clear();

            foreach (var p in prodajaTipovi)
            {
                ProdajaTipList.Add(p);
            }

            BrojKarata = BrKarata.ToString();
        }
Example #4
0
        private async void EventIzvjestaj_Load(object sender, EventArgs e)
        {
            Event = await _eventiService.GetById <Event>(eventId);

            ProdajaTipSearchRequest request = new ProdajaTipSearchRequest {
                EventId = eventId
            };

            prodajaTipovi = await _prodajaTipService.Get <List <ProdajaTip> >(request);

            OcjenaSearchRequest ocjenaSearch = new OcjenaSearchRequest {
                EventId = eventId
            };

            Ocjene = await _ocjeneService.Get <List <Ocjena> >(ocjenaSearch);

            LikeSearchRequest likeSearch = new LikeSearchRequest {
                EventId = eventId
            };

            Likes = await _likeService.Get <List <Like> >(likeSearch);


            EventBindingSource.DataSource = Event;
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Naziv", Event.Naziv));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Kategorija", Event.KategorijaNaziv));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Mjesto", Event.ProstorOdrzavanjaGradAdresa));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Naziv", Event.Naziv));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("DatumOdrzavanja", Event.DatumOdrzavanja.ToShortDateString()));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Vrijeme", Event.VrijemeOdrzavanja));

            ReportDataSource rds = new ReportDataSource("DataSet1", prodajaTipovi);

            this.reportViewer1.LocalReport.DataSources.Add(rds);

            ReportDataSource rds2 = new ReportDataSource("DataSet2", Ocjene);

            this.reportViewer1.LocalReport.DataSources.Add(rds2);

            ReportDataSource rds3 = new ReportDataSource("DataSet3", Likes);

            this.reportViewer1.LocalReport.DataSources.Add(rds3);

            this.reportViewer1.RefreshReport();
        }