Controllers/I2/I0202Controller.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using OPMS.Models;
using System.IO;
namespace OPMS.Controllers
{
public class I0202Controller : BaseController
{
private DBHelp db = new DBHelp();
//
// GET: /I0202/
public ActionResult Index(int id = 0, string ProjectID=null, string queryStr = null)
{
ViewBag.SId = id;
List<I0201> i0201s = db.I0201.ToList();
if (ProjectID == null)
{
if (i0201s.Count>0)
ProjectID = i0201s[0].ProjectID;
}
ViewBag.ProjectID = new SelectList(i0201s, "ProjectID", "ProjectName");
var list = db.I0202.Where(t => t.ProjectID == ProjectID);
var list2 = db.I0202c.Where(t=>t.Pf==true&&t.States==true).OrderBy(t=>t.Sort);
if (!string.IsNullOrEmpty(queryStr))
{
//关键字查询
list = list.Where(p => p.Remark.Contains(queryStr));
}
var model = new ViewI0202_c
{
i2 = list.ToArray().ToList(),
i2c = list2.ToArray().ToList()
};
ViewBag.queryStr = queryStr;
return View(model);
}
//
// GET: /I0202/Details/5
public ActionResult Details(int id = 0)
{
I0202 i0202 = db.I0202.Find(id);
if (i0202 == null)
{
return HttpNotFound();
}
return View(i0202);
}
#region 新增与编辑
后面还有 257 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
