private void DGVPrijamnice_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string id;

            id = DGVPrijamnice.Rows[e.RowIndex].Cells["idDokumenta"].Value.ToString();
            int id2 = int.Parse(id.ToString());
            List <PregledPrijamniceStavke> listaStavki = PregledPrijamniceStavke.DohvatiStavkeDokumenta(id2);

            DGVStavke2.DataSource = listaStavki;
            DGVStavke2.Columns["NazivArtikla"].HeaderText = "Naziv artikla";
        }
예제 #2
0
        /// <summary>
        /// Dohvaća podatke o prijemnicama i popunjava report
        /// </summary>
        private void dohvatiPrijamnice()
        {
            Microsoft.Reporting.WinForms.ReportDataSource reportDS1 = new Microsoft.Reporting.WinForms.ReportDataSource();
            Microsoft.Reporting.WinForms.ReportDataSource reportDS2 = new Microsoft.Reporting.WinForms.ReportDataSource();

            reportDS1.Name = "dsPrijamnica";
            reportDS2.Name = "dsPrijamnicaStavke";
            List <PregledPrijamniceStavke> listaStavki     = PregledPrijamniceStavke.DohvatiStavkeDokumenta(pID);
            List <PregledPrijamnice>       listaPrijamnica = PregledPrijamnice.DohvatiPrijamnicuPremaID(pID);

            bwLoadReport.ReportProgress(37);
            System.Threading.Thread.Sleep(500);
            reportDS1.Value = listaPrijamnica;
            reportDS2.Value = listaStavki;
            this.report.LocalReport.DataSources.Add(reportDS1);
            this.report.LocalReport.DataSources.Add(reportDS2);
            bwLoadReport.ReportProgress(80);
            System.Threading.Thread.Sleep(500);
            this.report.LocalReport.ReportEmbeddedResource = "Skladiste_PI.Izvjestaji.Prijamnice.rdlc";
        }