\Api\kriptitco\Views\Raspip\Index.cshtml

Return Back
@model kriptitco.Models.Kullanici;

@{
ViewData["Title"] = "RaspIp List";
}

<link rel="stylesheet" href="~/css/site.css"/>

@{
if (ViewData["RaspIpList"] != null)
{
var raspIpList = (List<Entities.RaspIp>) ViewData["RaspIpList"];
if (raspIpList.Count != 0)
{
<table>
<tr>
<td>Son IP Adres</td>
<td>---</td>
<td>---></td>
<td>@raspIpList.Last().IpAddress</td>
</tr>
<tr>
<td>Id</td>
<td>Kullanıcı Ad</td>
<td>Ip Adres</td>
<td>Tarih</td>
</tr>
@foreach (var raspIp in raspIpList)
{
<tr>
<td>@raspIp.Id</td>
<td>@raspIp.UserName</td>
<td>@raspIp.IpAddress</td>
<td>@raspIp.Tarih</td>
</tr>
}
</table>
}
}
else
{
<div class="center">
<img alt="Logo" src="~/img/logo-black.svg" width="30%"/>

@using (Html.BeginForm("Index", "Raspip", FormMethod.Post))
{
@Html.AntiForgeryToken()
<div class="form-group">
<label class="control-label">Kullanıcı Adı</label>
<br/>
<label>
@Html.TextBoxFor(k => k.KullaniciAd, new {@class = "form-control"})
</label>
<span class="text-danger"></span>
</div>
<div class="form-group">
<label class="control-label">Şifre</label>
<br/>
<label>
@Html.PasswordFor(k => k.Sifre, new {@class = "form-control"})
</label>
<span class="text-danger"></span>
</div>
<input type="submit" value="Listele" class="btn btn-primary"/>
}
</div>
}
}