自学内容网 自学内容网

AleserviceController

目录

1、 AleserviceController

1.1、 售后服务

2、 AppointmentController

2.1、 预约安排

2.1.1、 //ViewBag:获取动态视图数据字典

2.1.2、 //无法获取session 重定向到登录界面 重新登录

  1. AleserviceController 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

namespace QXQPS.Areas.MechanicsManagment.Controllers

{

    public class AleserviceController : Controller

    {

        // GET: MechanicsManagment/Aleservice

        public ActionResult Aleservice()//

    1. 售后服务

        {

            return View();

        }

    }

}

  1. AppointmentController 

using QXQPS.Models;

using QXQPS.Vo;

using System;

using System.Collections;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

namespace QXQPS.Areas.MechanicsManagment.Controllers

{

    public class AppointmentController : Controller

    {

        // GET: MechanicsManagment/Appointment

        Models.QXQPEntities myModels = new Models.QXQPEntities();

    1. 预约安排

        public ActionResult Appointment()//预约安排

        {

            try

            {

                ViewBag.UserName = Session["UserName"].ToString().Trim();

      1. //ViewBag:获取动态视图数据字典

                return View();

            }

            catch (Exception)

            {

      1.                 //无法获取session 重定向到登录界面 重新登录

                return Redirect("/Home/Login");

            }

        }

    1. 审核预约单

        public ActionResult ToAudit(int PredateID)//审核预约单

        {

            try

            {

                var list = myModels.PW_Predate.Where(m => m.PredateID == PredateID).Single();

                list.ToAudit = true;

                myModels.Entry(list).State = System.Data.Entity.EntityState.Modified;

                myModels.SaveChanges();

            }

            catch (Exception)

            {

                return Json(false, JsonRequestBehavior.AllowGet);

            }

            return Json(true, JsonRequestBehavior.AllowGet);

        }


原文地址:https://blog.csdn.net/weixin_42132177/article/details/142653837

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!