Controllers/AssentController.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using WebApplication1.Models;
using WebApplication1.Models.Entities;
namespace WebApplication1.Controllers
{
public class AssentController : Controller
{
private MyDataContext db = new MyDataContext();
// GET: Assent
public ActionResult Index()
{
if (Session["UserId"] == null)
{
return Redirect("~/User/Login");
}
else
{
String name = Session["UserName"].ToString();
ViewBag.notice = name;
var assentDataContext = db.AssentDataContext.Include(a => a.AssentCategory).Include(a => a.AssentDepartment).Include(a => a.AssentUser);
return View(assentDataContext.ToList());
}
}
public ActionResult Index1()
{
if (Session["UserId"] == null)
{
return Redirect("~/User/Login");
}
else
{
String name = Session["UserName"].ToString();
ViewBag.notice = name;
int id = (int)Session["UserId"];
var assentDataContext = db.AssentDataContext.Include(a => a.AssentCategory).Include(a => a.AssentDepartment).Include(a => a.AssentUser).Where(p => p.AssentUserId.Equals(id));
return View(assentDataContext.ToList());
}
}
// GET: Assent/Details/5
public ActionResult Details(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
Assent assent = db.AssentDataContext.Find(id);
if (assent == null)
后面还有 140 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
