コード例 #1
0
 // GET: Format/Edit/5
 public ActionResult Edit(int id)
 {
     if (Authenticate.IsAuthenticated())
     {
         ViewBag.Title = "Edit";
         var format = FormatManager.LoadByID(id);
         return(View(format));
     }
     else
     {
         return(RedirectToAction("Login", "User", new { returnurl = HttpContext.Request.Url }));
     }
 }
コード例 #2
0
        // GET: api/Format/5
        public Format Get(int id)
        {
            Format program = FormatManager.LoadByID(id);

            return(program);
        }