잉여장비목록 화면 추가(최효준s)
This commit is contained in:
86
Project/Controller/IoController.cs
Normal file
86
Project/Controller/IoController.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
public class IoController : BaseController
|
||||
{
|
||||
[HttpPost]
|
||||
public void Index([FromBody] string value)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// PUT api/values/5
|
||||
public void Put(int id, [FromBody] string value)
|
||||
{
|
||||
}
|
||||
|
||||
// DELETE api/values/5
|
||||
public void Delete(int id)
|
||||
{
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public string Test()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public HttpResponseMessage Index()
|
||||
{
|
||||
//로그인이 되어있지않다면 로그인을 가져온다
|
||||
MethodResult result;
|
||||
result = View();
|
||||
|
||||
var model = GetGlobalModel();
|
||||
var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
|
||||
|
||||
|
||||
|
||||
//기본값을 찾아서 없애줘야한다
|
||||
var contents = result.Content;
|
||||
|
||||
//공용값 적용
|
||||
ApplyCommonValue(ref contents);
|
||||
|
||||
var tabledata = string.Empty;
|
||||
for(int r = 0;r < 8; r++)
|
||||
{
|
||||
tabledata += "<tr>";
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
tabledata += $"<td>";
|
||||
tabledata += $"<div class=\"card text-white bg-secondary mb-1\" onclick=\"click_input({r},{i},this);\" id=\"di{r}{i}\">";
|
||||
tabledata += $"<div class=\"card-body\">";
|
||||
tabledata += $"<h5 class=\"card-title\">X{i.ToString("00")}</h5>";
|
||||
tabledata += $"<p class=\"card-text\">Start button</p>";
|
||||
tabledata += $"</div>"; ;
|
||||
tabledata += $"</div>";
|
||||
tabledata += $"</td>";
|
||||
}
|
||||
tabledata += "</tr>";
|
||||
}
|
||||
|
||||
contents = contents.Replace("{list}", tabledata);
|
||||
|
||||
//최종문자 적용
|
||||
result.Content = contents;
|
||||
|
||||
var resp = new HttpResponseMessage()
|
||||
{
|
||||
Content = new StringContent(
|
||||
result.Content,
|
||||
System.Text.Encoding.UTF8,
|
||||
"text/html")
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user