372 lines
12 KiB
Plaintext
372 lines
12 KiB
Plaintext
@page
|
||
@model _2021_backend.Pages.Students.DetailsModel
|
||
|
||
@{
|
||
ViewData["Title"] = "Details";
|
||
}
|
||
|
||
<h1>@Html.DisplayFor(model=> Model.Student.Name)</h1>
|
||
|
||
<div>
|
||
<h4>详细信息</h4>
|
||
<hr />
|
||
<dl class="row">
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Name)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Name)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Stuid)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Stuid)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Sex)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Sex)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Grade)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Grade)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Major)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Major)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Email)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Email)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Tel)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Tel)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.Status)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.Status)
|
||
</dd>
|
||
<dt class="col-sm-2">
|
||
@Html.DisplayNameFor(model => model.Student.RegisterTime)
|
||
</dt>
|
||
<dd class="col-sm-10">
|
||
@Html.DisplayFor(model => model.Student.RegisterTime)
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<h5>此人的最终得分 : @Html.DisplayFor(model => model.Student.Score)</h5>
|
||
<form method="post" class="form-inline m-2">
|
||
<input type="hidden" asp-for="Student.Guid" />
|
||
<div class="mb-2">
|
||
操作
|
||
</div>
|
||
<div class="mb-2">
|
||
<input type="submit" value="通过" class="btn btn-info" style="margin:5px" asp-page-handler="Accept" />
|
||
</div>
|
||
<div class="mb-2">
|
||
<input type="submit" value="拒绝" class="btn btn-danger" style="margin:5px" asp-page-handler="Reject" />
|
||
</div>
|
||
<div class="mb-2">
|
||
给他打分
|
||
<input asp-for="score" class="form-control"/>
|
||
<input type="submit" value="打" class="btn btn-warning" style="margin:5px" asp-page-handler="Rank" />
|
||
</div>
|
||
</form>
|
||
<br />
|
||
|
||
<h4>
|
||
看看大家怎么说
|
||
</h4>
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<th> @Html.DisplayNameFor(model => model.CommentSample.Operator)</th>
|
||
<th> @Html.DisplayNameFor(model => model.CommentSample.Content)</th>
|
||
<th> @Html.DisplayNameFor(model => model.CommentSample.AddTime)</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach (var cmt in Model.CurComments)
|
||
{
|
||
<tr>
|
||
@{
|
||
var usr = Model.Context.Users.Find(cmt.Operator);
|
||
<td>
|
||
@Html.DisplayFor(model => usr.Name)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(model => cmt.Content)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(model => cmt.AddTime)
|
||
</td>
|
||
}
|
||
</tr>
|
||
|
||
}
|
||
</tbody>
|
||
</table>
|
||
|
||
<h4>
|
||
添加评论
|
||
</h4>
|
||
<form method="post">
|
||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||
<div class="form-group">
|
||
<textarea asp-for="NewComment" class="form-control" rows="5"></textarea>
|
||
<span asp-validation-for="NewComment" class="text-danger"></span>
|
||
</div>
|
||
<div class="form-group">
|
||
<input type="hidden" asp-for="Student.Guid" />
|
||
<input type="submit" value="→" class="btn btn-primary btn-sm" />
|
||
</div>
|
||
</form>
|
||
<br />
|
||
|
||
<h4>
|
||
场次
|
||
</h4>
|
||
|
||
<h4>
|
||
最终场次 : @{
|
||
if (Model.Interviewtime == null)
|
||
{
|
||
<div class="text-danger">尚未确定活动场次</div>
|
||
<hr />
|
||
}
|
||
else
|
||
{
|
||
<div class="text-info">
|
||
@{
|
||
var val = Model.Interviewtime.Place + " " + Model.Interviewtime.Day.ToString("MM月dd日") + " " + Model.Interviewtime.BeginTime.ToString("hh:mm");
|
||
@Html.DisplayFor(model => val)
|
||
}
|
||
</div>
|
||
}
|
||
}
|
||
</h4>
|
||
<table class="table">
|
||
<thead>
|
||
<tr >
|
||
<th>地点</th>
|
||
<th>日期</th>
|
||
<th>时间</th>
|
||
<th>总容量</th>
|
||
<th>剩余人数</th>
|
||
<th>操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@for (int i = 0; i < Model.Student.Timelist.Count; i++)
|
||
{
|
||
var it = Model.Student.Timelist[i];
|
||
var dt = Model.Context.Sessions.Find(it);
|
||
if (dt.Capacity > dt.Students.Count || dt.Students.Contains(Model.Student.Guid))
|
||
{
|
||
<tr>
|
||
<td>
|
||
@{
|
||
|
||
@Html.DisplayFor(model => dt.Place)
|
||
}
|
||
</td>
|
||
<td>
|
||
@{
|
||
var s1 = dt.Day.ToString("MM-dd");
|
||
@Html.DisplayFor(model => s1)
|
||
}
|
||
</td>
|
||
<td>
|
||
@{
|
||
var s2 = dt.BeginTime.ToString("hh-mm");
|
||
@Html.DisplayFor(model => s2)
|
||
}
|
||
</td>
|
||
<td>
|
||
@{
|
||
var s4 = dt.Capacity.ToString();
|
||
@Html.DisplayFor(model => s4)
|
||
}
|
||
</td>
|
||
|
||
<td>
|
||
@{
|
||
var num = (dt.Capacity - dt.Students.Count()).ToString();
|
||
@Html.DisplayFor(model => num)
|
||
}
|
||
</td>
|
||
<td>
|
||
<form method="post" class="form-inline">
|
||
<input type="hidden" asp-for="Student.Guid" />
|
||
<a asp-page="/Sessions/Edit" asp-route-id="@it.ToString()" class="btn btn-sm btn-primary">场次详情</a>
|
||
<input type="submit" asp-page-handler="Select" asp-route-stu="@Model.Student.Guid" asp-route-time="@it.ToString()" class="btn btn-sm btn-warning" value="选择这个" />
|
||
</form>
|
||
</td>
|
||
</tr>
|
||
}
|
||
}
|
||
</tbody>
|
||
</table>
|
||
<h4>
|
||
Ta的短信
|
||
</h4>
|
||
<form method="post">
|
||
<input type="hidden" asp-for="Student.Guid" />
|
||
<input type="submit" value="拉取5天内的回复短信" class="btn btn-primary" asp-page-handler="Pull" />
|
||
<input type="submit" value="发送报名确认短信" class="btn btn-primary" asp-page-handler="Sign" />
|
||
<input type="submit" value="发送活动场次确认短信" class="btn btn-primary" asp-page-handler="Time" />
|
||
<input type="submit" value="发送场次选择短信" class="btn btn-primary" asp-page-handler="SelectTime" />
|
||
<input type="submit" value="发送活动结果短信" class="btn btn-primary" asp-page-handler="Result" />
|
||
</form>
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<th>
|
||
发送时间
|
||
</th>
|
||
<th>
|
||
短信类型
|
||
</th>
|
||
<th>
|
||
短信内容
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach (var msg in Model.Messages)
|
||
{
|
||
<tr>
|
||
<td>
|
||
@{
|
||
var str = msg.SendTime.ToString("MM-dd hh:mm:ss");
|
||
@Html.DisplayFor(it => str)
|
||
}
|
||
</td>
|
||
<td>
|
||
@{
|
||
var s = Enum.GetName(typeof(_2021_backend.Models.SMSType), msg.Type);
|
||
@Html.DisplayFor(it=> s)
|
||
}
|
||
</td>
|
||
<td>
|
||
@{
|
||
string s2 = "";
|
||
foreach (var e in msg.Data)
|
||
{
|
||
if (!string.IsNullOrEmpty(e)) s2 += " " + e;
|
||
}
|
||
@Html.DisplayFor(it => s2)
|
||
}
|
||
|
||
</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
|
||
</table>
|
||
<h4>
|
||
Ta的提交记录
|
||
</h4>
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Name)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Stuid)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Sex)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Yard)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Grade)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Major)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Email)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Tel)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.Address)
|
||
</th>
|
||
<th>
|
||
@Html.DisplayNameFor(model => model.SubmissionSample.SubmitTime)
|
||
</th>
|
||
<th>
|
||
Operation
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach (var item in Model.Student.Submissions)
|
||
{
|
||
var sub = Model.Context.Submissions.Find(item);
|
||
<tr>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Name)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Stuid)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Sex)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Yard)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Grade)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Major)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Email)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Tel)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.Address)
|
||
</td>
|
||
<td>
|
||
@Html.DisplayFor(modelItem => sub.SubmitTime)
|
||
</td>
|
||
<td>
|
||
<a asp-page="/Submissions/Edit" asp-route-strid="@sub.Guid">Edit</a> |
|
||
<a asp-page="/Submissions/Details" asp-route-strid="@sub.Guid">Details</a>
|
||
</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
<div>
|
||
<a asp-page="./Edit" asp-route-idstr="@Model.Student.Guid">编辑信息</a> |
|
||
<a asp-page="./Index">返回列表</a>
|
||
</div>
|