public ActionResult Delete(int? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     FileReleases fileReleases = this.relmngr.GetDetailsById(id);
     if (fileReleases == null)
     {
         return HttpNotFound();
     }
     ViewFileReleases vrel = new ViewFileReleases();
     vrel.ImportFromModel(fileReleases);
     return View(vrel);
 }
        public ActionResult GetFileReleasesByProjectId(int?id)
        {
            //var fileReleases = db.FileReleases.Include(f => f.ChangeLog);

            var fileReleases = this.relmngr.GetAllReleasesByProjectId(id);
            List <ViewFileReleases> vrels = new List <ViewFileReleases>();

            foreach (var rel in fileReleases)
            {
                ViewFileReleases vrel = new ViewFileReleases();
                vrel.ImportFromModel(rel);
                vrels.Add(vrel);
            }

            return(View(vrels));
        }
        // GET: FileReleases/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FileReleases fileReleases = this.relmngr.GetDetailsById(id);

            if (fileReleases == null)
            {
                return(HttpNotFound());
            }
            ViewFileReleases vrel = new ViewFileReleases();

            vrel.ImportFromModel(fileReleases);
            return(View(vrel));
        }
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FileReleases fileReleases = this.relmngr.GetDetailsById(id);

            if (fileReleases == null)
            {
                return(HttpNotFound());
            }
            ViewFileReleases vrel = new ViewFileReleases();

            vrel.ImportFromModel(fileReleases);
            ViewBag.Id = new SelectList(db.ChangeLogs, "Id", "Title", vrel.Id);
            return(View(vrel));
        }
        // GET: FileReleases
        public ActionResult Index( int ? projectid)
        {
            //var fileReleases = db.FileReleases.Include(f => f.ChangeLog);

            var fileReleases = this.relmngr.GetAllReleasesByProjectId(projectid);
            List<ViewFileReleases> vrels = new List<ViewFileReleases>();
            foreach( var rel in fileReleases)
            {
                ViewFileReleases vrel = new ViewFileReleases();
                vrel.ImportFromModel(rel);
                vrels.Add(vrel);
            }

            return View(vrels);
        }
 public ActionResult Edit(int? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     FileReleases fileReleases = this.relmngr.GetDetailsById(id);
     if (fileReleases == null)
     {
         return HttpNotFound();
     }
     ViewFileReleases vrel = new ViewFileReleases();
     vrel.ImportFromModel(fileReleases);
     ViewBag.Id = new SelectList(db.ChangeLogs, "Id", "Title", vrel.Id);
     return View(vrel);
 }