shzxscmvc/Controllers/shopmanagerController.cs

(开头部分) 4KB

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

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

namespace shzxscmvc.Controllers
{
    public class shopmanagerController : Controller
    {
        //
        // GET: /shopmanager/

        shzxscmvc.Models.shzxscentiti shdb = new Models.shzxscentiti();

        public ActionResult Index()
        {
            return View();
        }
        //下载于www.51aspx.com
        //
        // GET: /shopmanager/Details/5

        public ActionResult Details(int id)
        {
            return View();
        }

        public ActionResult Creategtype()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Creategtype(gtype gtype)
        {
            if (ModelState.IsValid)
            {
                shdb.gtypes.Add(gtype);
                shdb.SaveChanges();
                return RedirectToAction("Createstype");
            }

            return View(gtype);
        }

        public ActionResult Createstype()
        {
            ViewBag.gtypeid = new SelectList(shdb.gtypes, "Id", "Name");
            return View();
        }

        [HttpPost]
        public ActionResult Createstype(stype stype)
        {
            if (ModelState.IsValid)
            {
                shdb.stypes.Add(stype);
                shdb.SaveChanges();
后面还有 126 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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