Controllers/I2/I0208cController.cs

(开头部分) 4KB

这里只显示每个文件的开头 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;

namespace OPMS.Controllers
{
    public class I0208cController : BaseController
    {
        private DBHelp db = new DBHelp();

        //
        // GET: /I0208c/

        public ActionResult Index(string taskName = null, string queryStr = null)
        {
            ViewBag.taskName = new SelectList(db.I0202c.Where(t => t.States == true && t.Mf==true).OrderBy(t => t.Sort), "taskName", "taskName", taskName);//任务类型  
            ViewBag.queryStr = queryStr;
            if (taskName == null)
            {
                if (!string.IsNullOrEmpty(queryStr))
                {
                    return View(db.I0208c.Where(p => p.Mc.Contains(queryStr) || p.Operator.Contains(queryStr)).ToList());
                }
                return View(db.I0208c.ToList());
            }
            var list = db.I0208c.Where(t => t.TaskName == taskName);
            if (!string.IsNullOrEmpty(queryStr))
            {
                //关键字查询
                list = list.Where(p => p.Mc.Contains(queryStr) || p.Operator.Contains(queryStr));
            }
            return View(list);

        }

        //
        // GET: /I0208c/Details/5

        public ActionResult Details(int id = 0)
        {
            I0208c i0208c = db.I0208c.Find(id);
            if (i0208c == null)
            {
                return HttpNotFound();
            }
            return View(i0208c);
        }

        //
        // GET: /I0208c/Create

        public ActionResult Create(string taskName)
        {
            I0208c i0208c = new I0208c();
            i0208c.States = true;
后面还有 78 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。