출근부 사용자 목록 수정

This commit is contained in:
chi
2022-02-15 09:32:39 +09:00
parent fdda87b48b
commit 6226bc2953
13 changed files with 131 additions and 47 deletions

View File

@@ -85,13 +85,14 @@ namespace Project
}
public MethodResult View()
public MethodResult View(bool nosubdir=false)
{
var config = RequestContext.Configuration;
if (config != null)
{
var routeData = config.Routes.GetRouteData(Request).Values.ToList();
var name_ctrl = routeData[0].Value.ToString();
if (nosubdir) name_ctrl = string.Empty;
var name_action = routeData[1].Value.ToString();
return View(name_ctrl, name_action);
}
@@ -101,6 +102,7 @@ namespace Project
}
}
public static void ApplyCommonValue(ref string contents)
{

View File

@@ -10,6 +10,36 @@ namespace Project
{
public class ResourceController : BaseController
{
//[HttpGet]
//public HttpResponseMessage Index()
//{
// //로그인이 되어있지않다면 로그인을 가져온다
// MethodResult result;
// result = View(true);
// var model = GetGlobalModel();
// var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
// //기본값을 찾아서 없애줘야한다
// var contents = result.Content;
// //공용값 적용
// ApplyCommonValue(ref contents);
// //최종문자 적용
// result.Content = contents;
// var resp = new HttpResponseMessage()
// {
// Content = new StringContent(
// result.Content,
// System.Text.Encoding.UTF8,
// "text/html")
// };
// return resp;
//}
[HttpGet]
public HttpResponseMessage file()
{
@@ -77,6 +107,17 @@ namespace Project
}
HttpContent resultContent = null;
if (v_resource.isEmpty() && v_ext.isEmpty())
{
v_resource = "index";
v_ext = "html";
isBinary = false;
content_type = "text/html";
}
var file = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", v_path, v_subdir, v_resource + "." + v_ext);
if (isBinary)

View File

@@ -832,4 +832,11 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets" Condition="Exists('..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets'))" />
</Target>
</Project>

View File

@@ -12,7 +12,7 @@ namespace Project.OWIN
{
public class Startup
{
public void Configuration(IAppBuilder appBuilder)
public void Configuration(IAppBuilder app)
{
// Configure Web API for Self-Host
HttpConfiguration config = new HttpConfiguration();
@@ -45,9 +45,9 @@ namespace Project.OWIN
config.Routes.Add("cssRoute", cssRoute);
config.Routes.Add("defaultRoute", defaultRoute);
appBuilder.UseStaticFiles();
appBuilder.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
appBuilder.UseWebApi(config);
app.UseStaticFiles();
app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
app.UseWebApi(config);
//appBuilder.UseFileServer(new FileServerOptions

View File

@@ -138,6 +138,7 @@ namespace Project
// Start OWIN host
try
{
WebApp.Start<OWIN.Startup>(url: "http://127.0.0.1:9000");
Console.WriteLine("start webapp");
Pub.log.AddI("웹지원 서버 준비 완료");

View File

@@ -10,6 +10,7 @@
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.7" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.7" targetFramework="net452" />
<package id="Microsoft.AspNetCore.Components.WebAssembly.Server" version="6.0.2" targetFramework="net46" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net46" />
<package id="Microsoft.Owin" version="4.2.0" targetFramework="net46" />
<package id="Microsoft.Owin.Cors" version="4.2.0" targetFramework="net46" />