目录
1、 SettlementfactoryController
1.1、 结算出厂
1.2、 审核
1.3、 反审核
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 SettlementfactoryController : Controller
{
// GET: MechanicsManagment/Settlementfactory
Models.QXQPEntities myModels = new Models.QXQPEntities();
public ActionResult Settlement()//结算出厂
{
return View();
}
public ActionResult ToAudit(int ReceptionID)//审核
{
try
{
var list = myModels.PW_Reception.Where(m => m.ReceptionID == ReceptionID).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);
}
public ActionResult ToNotAudit(int ReceptionID)//反审核
{
try
{
var list = myModels.PW_Reception.Where(m => m.ReceptionID == ReceptionID).Single();
list.ToAudit = false;
myModels.Entry(list).State = System.Data.Entity.EntityState.Modified;
myModels.SaveChanges();
}
catch (Exception)
{
return Json(false, JsonRequestBehavior.AllowGet);
}
return Json(true, JsonRequestBehavior.AllowGet);
}