Serverseitig: 10 Benutzer Scoring Serverseiting reimplementiert
This commit is contained in:
@ -32,17 +32,17 @@
|
||||
@if (Status == true)
|
||||
{
|
||||
<span class ="fontsizeInf">@Localizer["Zugesagt"]</span><br />
|
||||
<p><button class="btn btn-danger" @onclick="Absage">@Localizer["Absagen"]</button></p>
|
||||
<p><button class="btn btn-danger" @onclick="Reject">@Localizer["Absagen"]</button></p>
|
||||
} else
|
||||
{
|
||||
<span class="fontsizeInf"> @Localizer["Abgesagt"]</span><br />
|
||||
<p><button class="btn btn-success" @onclick="Zusage">@Localizer["Zusagen"]</button></p>
|
||||
<p><button class="btn btn-success" @onclick="Accept">@Localizer["Zusagen"]</button></p>
|
||||
}
|
||||
</p>
|
||||
} else {
|
||||
<div class="buttons">
|
||||
<button class="btn btn-success" @onclick="Zusage">@Localizer["Zusagen"]</button>
|
||||
<button class="btn btn-danger" @onclick="Absage">@Localizer["Absagen"]</button>
|
||||
<button class="btn btn-success" @onclick="Accept">@Localizer["Zusagen"]</button>
|
||||
<button class="btn btn-danger" @onclick="Reject">@Localizer["Absagen"]</button>
|
||||
</div>
|
||||
}
|
||||
@foreach (User u in _users)
|
||||
@ -70,9 +70,6 @@
|
||||
new Resource { ResourceType = ResourceType.Stylesheet, Url = ModulePath() + "Module.css" }
|
||||
};
|
||||
|
||||
// private ElementReference form;
|
||||
// private bool validated = false;
|
||||
|
||||
private int _id;
|
||||
private string _name;
|
||||
private string _description;
|
||||
@ -85,7 +82,7 @@
|
||||
private List<Profile> _profiles = new List<Profile>();
|
||||
private Dictionary<string, string> _settings;
|
||||
|
||||
private List<User> _users = new List<User>() {new User() {DisplayName = "Hello"}, new User() {DisplayName = "World"}};
|
||||
private List<User> _users = new List<User>();
|
||||
|
||||
private async Task SendResponse(bool response)
|
||||
{
|
||||
@ -114,12 +111,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
private async void Zusage()
|
||||
private async void Accept()
|
||||
{
|
||||
await SendResponse(true);
|
||||
}
|
||||
|
||||
private async void Absage()
|
||||
private async void Reject()
|
||||
{
|
||||
await SendResponse(false);
|
||||
}
|
||||
@ -128,6 +125,8 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
_id = Int32.Parse(PageState.QueryString["id"]);
|
||||
|
||||
if(PageState.User != null) {
|
||||
_profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId);
|
||||
var user = await UserService.GetUserAsync(PageState.User.UserId, PageState.Site.SiteId);
|
||||
@ -135,10 +134,10 @@
|
||||
{
|
||||
_settings = user.Settings;
|
||||
}
|
||||
_users = await EventRegistrationService.GetRecommendedResponses(_id, ModuleState.ModuleId);
|
||||
_users.ForEach(u => Console.WriteLine(u.UserId));
|
||||
}
|
||||
|
||||
_id = Int32.Parse(PageState.QueryString["id"]);
|
||||
|
||||
|
||||
Event currentEvent;
|
||||
Response rsvp;
|
||||
(currentEvent, rsvp) = await EventRegistrationService.GetEventDetails(_id, ModuleState.ModuleId);
|
||||
|
||||
Reference in New Issue
Block a user