This commit is contained in:
2026-04-02 18:22:18 +08:00
parent 37d0b928ec
commit 7998312785
11 changed files with 469 additions and 352 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.Ajax.Utilities;
using MINOM.COM.Utility;
using Model;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -14,6 +15,7 @@ using System.Web.Http;
/// </summary>
public class designerController : ApiController
{
private Model.ezEntities _db = new Model.ezEntities();
public designerController()
{
//
@@ -21,6 +23,19 @@ public class designerController : ApiController
//
}
[HttpPost]
[Route("api/tablet/GetActItem")]
public IHttpActionResult GetActItem([FromBody] dynamic data)
{
LogUtility log = new LogUtility();
var json = data;
string itemNum = (json == null || json.itemNum == null) ? "" : (string)json.itemNum;
int num = int.Parse(itemNum);
var item=_db.actItems.AsQueryable().Where(x => x.num == num).FirstOrDefault();
return Ok(new { result = "Y", data =item});
}
[HttpPost]
[Route("api/tablet/GetTabletElement")]
public IHttpActionResult GetTabletElement([FromBody] dynamic data)
@@ -131,6 +146,14 @@ public class designerController : ApiController
if (mode == "add")
{
object[] obj = new StyleDataAccess().AddStyle(ts, list);
if (obj[0].ToString() == "Y")
{
return Ok(new { result = "Y" });
}
else
{
return Ok(new { result = "N" });
}
}
return Ok();
}
@@ -188,8 +211,14 @@ public class designerController : ApiController
}
object[] obj = new StyleDataAccess().UpdateStyle(ts, list);
return Ok();
if (obj[0].ToString() == "Y")
{
return Ok(new { result = "Y" });
}
else
{
return Ok(new { result = "N" });
}
}
@@ -238,8 +267,14 @@ public class designerController : ApiController
tps.UTime = DateTime.Now.ToString("HHmmss");
object[] obj = new StyleDataAccess().AddTabletPaper(tps);
return Ok();
if (obj[0].ToString()=="Y")
{
return Ok(new { result = "Y" });
}
else
{
return Ok(new { result = "N"});
}
}
}