Skip to content

Commit

Permalink
Fix Selector UI. NewAcademyProfile.razor
Browse files Browse the repository at this point in the history
  • Loading branch information
EzequielUrbina committed Jul 8, 2024
1 parent 2e4c57c commit e30c7a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
29 changes: 18 additions & 11 deletions Academy/NewAcademyProfile.razor
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@page "/academy/tariff-profiles/new"
@using wsmcbl.front.Accounting
@using wsmcbl.front.Controllers
@using wsmcbl.front.model.Secretary.Output


@inject AcademyController controller;
@inject AlertService alertService ;

<link rel="stylesheet" href="/css/Academy/NewAcademyProfile.css">

Expand All @@ -20,16 +22,16 @@
<div class="card-body">
<div class="row">
<div class="col">
<label style="display: inline-block; width: 150px;">Primer Nombre:</label>
<label style="display: inline-block; width: 200px;">Primer Nombre:</label>
<input type="text" class="form-control" style="margin-bottom: 10px" @bind="FirsName">

<label style="display: inline-block; width: 150px;">Segundo Nombre:</label>
<label style="display: inline-block; width: 200px;">Segundo Nombre:</label>
<input type="text" class="form-control" style="margin-bottom: 10px" @bind="SecondName">

<label style="display: inline-block; width: 150px;">Primer Apellido:</label>
<label style="display: inline-block; width: 200px;">Primer Apellido:</label>
<input type="text" class="form-control" style="margin-bottom: 10px" @bind="FirsSurName">

<label style="display: inline-block; width: 150px;">Segundo Apellido:</label>
<label style="display: inline-block; width: 200px;">Segundo Apellido:</label>
<input type="text" class="form-control" style="margin-bottom: 10px" @bind="SecondSurName">
</div>
</div>
Expand All @@ -38,18 +40,18 @@
<div class="col-6">
<div class="card-body">
<div class="col">
<label style="display: inline-block; width: 150px;">Tutor:</label>
<label style="display: inline-block; width: 200px;">Tutor:</label>
<input type="text" class="form-control" style="margin-bottom: 10px" @bind="Tutor">

<label style="display: inline-block; width: 150px;">Sexo:</label>
<select id="sexo" style="margin: 0px" @onchange="GetSexo">
<label style="display: inline-block; width: 200px;">Sexo:</label>
<select id="sexo" class="form-control" style="margin: 0px" @onchange="GetSexo">
@foreach (var option in sexo)
{
<option value="@option">@option</option>
}
</select>

<label style="display: inline-block; width: 150px; margin-top: 15px">Fecha de Nacimiento</label>
<label style="display: inline-block; width: 200px; margin-top: 15px">Fecha de Nacimiento</label>
<input id="fechaNacimiento" type="date" class="form-control p1" placeholder="11/02/2001" @bind="Birthday">
</div>
</div>
Expand Down Expand Up @@ -111,8 +113,13 @@

var result = await controller.PostNewStudent(NewStudent);

if (result = true)
{
await alertService.AlertSuccess("Agregado Exitosamente", "El estudiante fue registrado correctamente");
}
else
{
await alertService.AlertError("Error", "El estudiante no puedo ser registrado.");
}
}



}
2 changes: 1 addition & 1 deletion Controllers/AcademyController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task<bool> PostNewStudent(StudentEntityDto student)
throw new Exception($"Error al obtener los datos de la API: {response.ReasonPhrase}");
}

return true;
return false;
}


Expand Down

0 comments on commit e30c7a2

Please sign in to comment.