Parking/Controllers/BicycleController.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Bicycle.Controllers
{
    public class BicycleController : Controller
    {
        //
        // GET: /Bicycle/
        DBA.BLL.Bicycle bll = new DBA.BLL.Bicycle();
        DBA.BLL.Places pbll = new DBA.BLL.Places();
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Create(string ID)
        {
            List<SelectListItem> select1 = new List<SelectListItem>();
            select1.Add(new SelectListItem
            {
                Text = "请选择",
                Value = ""
            });
            List<DBA.Model.Places> list = pbll.GetModelList("");
            for (int i = 0; i < list.Count; i++)
            {
                select1.Add(new SelectListItem
                {
                    Text = list[i].Name ,
                    Value = list[i].ID.ToString()
                });
            };
            ViewData["PID"] = new SelectList(select1, "Value", "Text", "");
            if (string.IsNullOrEmpty(ID))
            {
                DBA.Model.Bicycle model = new DBA.Model.Bicycle();
                return View(model);
            }
            else
            {
                return View(bll.GetModel(Convert.ToInt32(ID)));
            }

        }

        [ValidateInput(false)]
        [HttpPost]
        public ActionResult Edit(DBA.Model.Bicycle model)
        {
            bll.Edit(model);
            return RedirectToAction("BicycleManage");

        }

        [HttpPost]
        public JsonResult Del(string ID)
后面还有 82 行代码,购买后查看完整代码

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

AI 解读 AI

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

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