2.1、 预约安排
2.1.1、 //ViewBag:获取动态视图数据字典
2.1.2、 //无法获取session 重定向到登录界面 重新登录
- 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()//
-
- 售后服务
{
return View();
}
}
}
- 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();
-
- 预约安排
public ActionResult Appointment()//预约安排
{
try
{
ViewBag.UserName = Session["UserName"].ToString().Trim();
-
-
- //ViewBag:获取动态视图数据字典
-
return View();
}
catch (Exception)
{
-
-
- //无法获取session 重定向到登录界面 重新登录
-
return Redirect("/Home/Login");
}
}
-
- 审核预约单
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);
}