aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-02-26 16:18:06 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-02-26 16:18:06 +0200
commit47691cbb0207d32c7b86113e3c425138907265d9 (patch)
tree04ba04cdee8a6c249b5ba04cdb4510e5c8fc872f /Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs
parent4c0b55f75844e9955d19177bc9c11821dcd2b272 (diff)
parentecda365478dfce97c5bba25603226bc42e864754 (diff)
downloadTango-47691cbb0207d32c7b86113e3c425138907265d9.tar.gz
Tango-47691cbb0207d32c7b86113e3c425138907265d9.zip
merge
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs
new file mode 100644
index 000000000..ecdbf662c
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using Tango.MachineService.Filters;
+using Tango.MachineService.Models;
+using Tango.MachineService.Views.Downloads;
+
+namespace Tango.MachineService.Controllers
+{
+ public class DownloadsController : Controller
+ {
+ [Authorize]
+ public ActionResult Index()
+ {
+ List<DownloadModel> downloads = new List<DownloadModel>();
+ for (int i = 0; i < 10; i++)
+ {
+ downloads.Add(new DownloadModel()
+ {
+ Name = "Downloads " + i,
+ Comments = "Some comments...\nWith a new line",
+ Date = DateTime.Now.ToString(),
+ User = "Roy",
+ ID = i.ToString(),
+ });
+ }
+
+ IndexViewModel model = new IndexViewModel();
+ model.Downloads = downloads;
+
+ return View(model);
+ }
+
+ [Authorize]
+ public ActionResult Download(String id)
+ {
+ return File(new byte[] { 25, 255, 255 }, System.Net.Mime.MediaTypeNames.Application.Octet,"Machine Studio v1.0.exe");
+ }
+ }
+} \ No newline at end of file