DispatchingController
目录
1、 DispatchingController
1.1、 //维修派工
1.2、 ClearDispatching
1.3、 查询派工结算方式金额
using QXQPS.Models;
using QXQPS.Vo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace QXQPS.Areas.MechanicsManagment.Controllers
{
public class DispatchingController : Controller
{
// GET: MechanicsManagment/Dispatching
Models.QXQPEntities myModels = new Models.QXQPEntities();
public ActionResult Dispatching()//维修派工
{
return View();
}
[HttpPost]
public ActionResult Dispatching(int ReceptionID)//维修派工
{
Session["ReceptionID"] = ReceptionID;
return View();
}
public ActionResult ClearDispatching()//维修派工
{
Session["ReceptionID"] = null;
return View();
}
public ActionResult SelectDispatch(int DispatchID)//查询派工结算方式金额
{
var Price = 0;
try
{
var list = myModels.SYS_Dispatch.Where(m => m.DispatchID == DispatchID).Select(m => new {
Price = m.Price
}).Single();
Price = (int)list.Price;
}
catch (Exception)
{
throw;
}
return Json(Price, JsonRequestBehavior.AllowGet);
}
public ActionResult SelectDispatch(int DispatchID)//查询派工结算方式金额
{
var Price = 0;
try
{
var list = myModels.SYS_Dispatch.Where(m => m.DispatchID == DispatchID).Select(m => new {
Price = m.Price
}).Single();
Price = (int)list.Price;
}
catch (Exception)
{
throw;
}
return Json(Price, JsonRequestBehavior.AllowGet);
}
}
}