add final time information
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
<input type="submit" value="发送报名确认短信" class="btn btn-primary" asp-page-handler="Sign" />
|
||||
<input type="submit" value="发送确认短信" class="btn btn-primary" asp-page-handler="ResultAccept" />
|
||||
<input type="submit" value="发送时间选择短信" class="btn btn-primary" asp-page-handler="TimeSelect" />
|
||||
<input type="submit" value="发送时间确认短信" class="btn btn-primary" asp-page-handler="TimeSet" />
|
||||
<input type="submit" value="发送拒绝短信" class="btn btn-primary" asp-page-handler="ResultReject" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
@@ -143,6 +143,21 @@ namespace _2021_backend.Pages.Message
|
||||
return Construct(PageId);
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostTimeSetAsync(int PageId)
|
||||
{
|
||||
var stu = Context.Students.ToList();
|
||||
foreach(var e in stu)
|
||||
{
|
||||
var t = Context.Sessions.Find(e.InterviewTime);
|
||||
if(t != null && t.Students.Find(s => s==e.Guid)!= Guid.Empty && e.Status == status.已选时间)
|
||||
{
|
||||
await Utils.TencentSMS.Send(Context, SMSType.TimeSet, e, Context.Users.Find(Guid.Parse(User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Sid).Value)).Name);
|
||||
e.Status = status.已确认时间;
|
||||
}
|
||||
}
|
||||
Context.SaveChanges();
|
||||
return Construct(PageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user