You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.1 KiB
C#
75 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using Estsh.Web.Service;
|
|
using System.Collections;
|
|
using System.Data;
|
|
using Estsh.Web.Util;
|
|
using Estsh.Web.Models;
|
|
|
|
namespace Estsh.Core.Web.Controllers
|
|
{
|
|
|
|
public class SwapSNInfoController : Controller
|
|
{
|
|
private SwapSNInfoService service = new SwapSNInfoService();
|
|
/// <summary>
|
|
/// 判断库存合格证条码是否存在
|
|
/// </summary>
|
|
/// <param name="serial_number">库存合格证条码</param>
|
|
/// <returns></returns>
|
|
public ActionResult ExistSn(string serial_number)
|
|
{
|
|
bool resultbool = false;
|
|
try
|
|
{
|
|
resultbool = service.ExistSn(serial_number);
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
Hashtable result = new Hashtable();
|
|
result.Add("status", resultbool);
|
|
return Json(result, JsonRequestBehavior.AllowGet);
|
|
}
|
|
|
|
|
|
public string GetAuditSwapFlag()
|
|
{
|
|
|
|
string result = service.GetAuditSwapFlag();
|
|
return result;
|
|
}
|
|
public ActionResult UpdateTable(string oldSN, string newSN)
|
|
{
|
|
UserInfo loginUser = (UserInfo)Session["loginedUser"];
|
|
|
|
string flag = GetAuditSwapFlag();
|
|
string result = service.UpdateTable(oldSN, newSN, flag, loginUser.empId);
|
|
return Json(result, JsonRequestBehavior.AllowGet);
|
|
}
|
|
|
|
|
|
public ActionResult GetSwapDataList(string sn, string remarkFlag, bool fuzzyQuery, Pager pager, String direction, String sort)
|
|
{
|
|
Hashtable para = new Hashtable(3);
|
|
para.Add("@newSN", sn);
|
|
para.Add("@oldSN", sn);
|
|
para.Add("@remarkFlag", remarkFlag);
|
|
|
|
Hashtable result = new Hashtable();
|
|
result.Add("pager.pageNo", pager.pageNo);
|
|
ArrayList list = service.GetSwapDataList(para, fuzzyQuery);
|
|
result.Add("sort", sort);
|
|
result.Add("direction", direction);
|
|
|
|
return Json(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
} |