A_02_19 model(元来)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace YDMS.WebApp.Models
{
public class A_02_19ViewModel
{
/// <summary>
/// ユーザー情報リスト
/// </summary>
//public UserInfo[] UserList { get; set; }
public IList<UserInfo> UserList { get;set; }
/// <summary>
/// ユーザー情報
/// </summary>
public class UserInfo
{
/// <summary>
/// 社員番号
/// </summary>
public string EmployeeNum { get; set; }
/// <summary>
/// 姓
/// </summary>
public string Name1 { get; set; }
/// <summary>
/// 名
/// </summary>
public string Name2 { get; set; }
/// <summary>
/// 照査
/// </summary>
public bool IsCheck { get; set; }
/// <summary>
/// 承認
/// </summary>
public bool IsApprove { get; set; }
}
//データ行
public void InitUserData()
{
var test1 = new UserInfo
{
EmployeeNum = "00112722",
Name1 = "藤川",
Name2 = "愼二",
IsCheck = false,
IsApprove = false
};
var test2 = new UserInfo
{
EmployeeNum = "00113307",
Name1 = "袴田",
Name2 = "到",
IsCheck = false,
IsApprove = false
};
var test3 = new UserInfo
{
EmployeeNum = "03530083",
Name1 = "丸山",
Name2 = "智由",
IsCheck = false,
IsApprove = false
};
var test4 = new UserInfo
{
EmployeeNum = "30005338",
Name1 = "金子",
Name2 = "佳弘",
IsCheck = false,
IsApprove = false
};
UserList = new UserInfo[4];
UserList[0] = test1;
UserList[1] = test2;
UserList[2] = test3;
UserList[3] = test4;
}
}
}
A_02_19 view(元来)
@using Microsoft.AspNetCore.Mvc.Localization;
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@inject IHtmlLocalizer<Lang> Disp
@model YDMS.WebApp.Models.A_02_19ViewModel
<div id="pnl-user-select">
<h7 class="font-weight-bold"><strong>@Disp["select.user.title"]</strong></h7>
<ul class="font-small mb-1">
<li>@Disp["select.user.message02"]</li>
<li>@Disp["select.user.message03"]</li>
</ul>
<hr class="mb-2">
<table class="border-0 table w-100 mb-2">
<thead>
<tr>
<th class="text-center text-white w-40">@Disp["limit.name.user"]</th>
<th class="border-0 bg-white text-left">
<input type="text" name="limitTxt" size="25" value="*" onkeyup="" onblur="" class="text-monospace ml-3">
<input type="button" id="limitBtn" name="limitBtn" value=@Disp["btn.search"] class="ml-3 btn font-small">
</th>
</tr>
</thead>
</table>
<form method="post" action="../../sample/A_02_19_1">
<div class="d-flex justify-content-center mt-2">
<table class="table table-striped w-500-fix">
<thead>
<tr class="text-left">
<!-- NO. -->
<th>@Disp["table.no"]</th>
<!-- 社員番号 -->
<th>@Disp["table.employeeNumber"]</th>
<!-- 姓 -->
<th>@Disp["table.familyName"]</th>
<!-- 名 -->
<th>@Disp["table.firstName"]</th>
<!-- 照査者 -->
<th>@Disp["table.checker"]</th>
<!-- 承認者 -->
<th>@Disp["table.approver"]</th>
</tr>
</thead>
<tbody>
@{ var i = 0;
foreach (var item in Model.UserList)
{
<tr>
<td>@(i+1)</td>
<td>@item.EmployeeNum @Html.HiddenFor(m => m.UserList[i].EmployeeNum)</td>
<td class="text-nowrap">@item.Name1 @Html.HiddenFor(m => m.UserList[i].Name1)</td>
<td class="text-nowrap">@item.Name2 @Html.HiddenFor(m => m.UserList[i].Name2)</td>
<td class="text-center">
@Html.RadioButtonFor(m => m.UserList[0].IsCheck, item.IsCheck, new { @id = "Checker" + (i + 1) })
</td>
<td class="text-center">
@Html.RadioButtonFor(m => m.UserList[0].IsApprove, item.IsApprove, new { @id = "Approver" + (i + 1) })
</td>
</tr>
i++;
}
}
</tbody>
</table>
</div>
<div class="h-50-fix text-center">
<!-- ボタン -->
<input type="button" id="okBtn" name="okBtn" value=@Disp["btn.ok"] class="btn font-small" onclick="location.href=''">
<input type="button" id="cancelBtn" name="cancelBtn" value=@Disp["btn.cancel"] class="btn font-small" onclick="location.href='/F_02_03/A_02_17'">
</div>
</form>
</div>
<tr colspan="6" rowspan="6">
<select class="h-235-fix mt-2" name="SELECTDATA" size="10">
@{
foreach (var item in Model.UserList)
{
<option class="text-nowrap" value="">@item.EmployeeNum : @item.Name1 : @item.Name2 : @item.IsCheck : IsApprove</option>
}
}
</select>
</tr>
A_02_06 Model(元来)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace YDMS.WebApp.Models
{
public class A_02_06ViewModel
{
/// <summary>
/// 登録者情報リスト
/// </summary>
public IList<RegisterInfo> RegisterList { get; set; }
/// <summary>
/// 登録者情報
/// </summary>
public class RegisterInfo
{
/// <summary>
/// 社員番号
/// </summary>
public string EmployeeNum { get; set; }
/// <summary>
/// 姓
/// </summary>
public string Name1 { get; set; }
/// <summary>
/// 名
/// </summary>
public string Name2 { get; set; }
/// <summary>
/// 登録者
/// </summary>
public bool IsRegister { get; set; }
}
///////////////////////////////////////////////////////////////////
// データ行 //
///////////////////////////////////////////////////////////////////
public void InitRegisterData()
{
var test1 = new RegisterInfo
{
EmployeeNum = "00112722",
Name1 = "藤川",
Name2 = "愼二",
IsRegister = false
};
var test2 = new RegisterInfo
{
EmployeeNum = "00113307",
Name1 = "袴田",
Name2 = "到",
IsRegister = false
};
var test3 = new RegisterInfo
{
EmployeeNum = "03530083",
Name1 = "丸山",
Name2 = "智由",
IsRegister = false
};
var test4 = new RegisterInfo
{
EmployeeNum = "30005338",
Name1 = "金子",
Name2 = "佳弘",
IsRegister = false
};
RegisterList = new RegisterInfo[4];
RegisterList[0] = test1;
RegisterList[1] = test2;
RegisterList[2] = test3;
RegisterList[3] = test4;
}
}
}
A_02_06 View(元来)
@using Microsoft.AspNetCore.Mvc.Localization;
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@inject IHtmlLocalizer<Lang> Disp
@model YDMS.WebApp.Models.A_02_06ViewModel
<div id="pnl-register-select">
<h6 class="font-weight-bold"><strong>@Disp["select.register.title"]</strong></h6>
<ul class="font-small mb-1">
<li>@Disp["select.register.message01"]</li>
</ul>
<hr />
<form method="post" action="../../F_02_02/A_02_05">
<div class="d-flex justify-content-center mt-2">
<table class="table table-striped w-400-fix">
<thead class="text-nowrap">
<tr class="text-left">
<!-- NO. -->
<th>@Disp["table.no"]</th>
<!-- 社員番号 -->
<th>@Disp["table.employeeNumber"]</th>
<!-- 姓 -->
<th>@Disp["table.familyName"]</th>
<!-- 名 -->
<th>@Disp["table.firstName"]</th>
<!-- 登録者 -->
<th>@Disp["table.register"]</th>
</tr>
</thead>
<tbody>
@{ var i = 0;
foreach (var item in Model.RegisterList)
{
<tr>
<td>@(i + 1)</td>
<td>@item.EmployeeNum @Html.HiddenFor(m => m.RegisterList[i].EmployeeNum)</td>
<td class="text-nowrap">@Html.Raw(item.Name1) @Html.HiddenFor(m => m.RegisterList[i].Name1)</td>
<td class="text-nowrap">@Html.Raw(item.Name2) @Html.HiddenFor(m => m.RegisterList[i].Name2)</td>
<td class="text-center">
@Html.RadioButtonFor(m => m.RegisterList[0].IsRegister, item.IsRegister, new { @id = "Register" + (i + 1) })
</td>
</tr>
i++;
}
}
</tbody>
</table>
</div>
<div class="text-center">
<!-- ボタン -->
<input type="submit" value="@Disp["btn.ok"]" name="@Disp["btn.ok"]" class="btn">
<input type="button" value="@Disp["btn.cancel"]" name="@Disp["btn.cancel"]" class="btn ml-3">
</div>
</form>
</div>
2022年1月31日月曜日
臨時代码复制粘贴
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿