public DocDetailPage()
 {
     this.InitializeComponent();
     Dokument = new Model.Dokument();
     //Dokument = new Model.Dokument(0, new DateTime(),
     //        new DateTime(), new DateTime(), "oznaka0", "potpis0", new DateTime(),
     //        "text0" );
     panel.DataContext = Dokument;
 }
        public DokumentDetaljiPage(Model.Dokument doc)
        {
            this.InitializeComponent();

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;

            Doc = doc;

            this.DataContext = Doc;
        }
Ejemplo n.º 3
0
        public IActionResult PreuzmiDokument(int id)
        {
            Model.Dokument dokument = _service.GetById(id);

            if (dokument == null)
            {
                return(NotFound());
            }

            Stream stream = new MemoryStream(dokument.Sadrzaj);

            return(File(stream, "application/octet-stream", dokument.FileName));
        }