fix
This commit is contained in:
parent
89b1399fb8
commit
d05d582122
@ -10,7 +10,7 @@ namespace UniversityDataBaseImplemet
|
|||||||
{
|
{
|
||||||
if (optionsBuilder.IsConfigured == false)
|
if (optionsBuilder.IsConfigured == false)
|
||||||
{
|
{
|
||||||
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=UniversityCourseWork;Username=postgres;Password=0000");
|
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=UniversityCourseWork;Username=postgres;Password=123");
|
||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,13 @@ const errorDivShell = document.getElementById("error-div-shell");
|
|||||||
students = []
|
students = []
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
const studentsResponse = $.ajax({
|
$.ajax({
|
||||||
url: `/student/getallbyuser`,
|
url: "/student/getallbyuser",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
contentType: "json"
|
contentType: "json"
|
||||||
|
}).done((result) => {
|
||||||
|
students = result;
|
||||||
});
|
});
|
||||||
students = studentsResponse;
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const correctData = () => {
|
const correctData = () => {
|
||||||
@ -21,6 +22,7 @@ const correctData = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
|
console.log(students)
|
||||||
var validStudentCard = true
|
var validStudentCard = true
|
||||||
if (nameInput.value === "") {
|
if (nameInput.value === "") {
|
||||||
errorDivShell.style.gridTemplateRows = "1fr";
|
errorDivShell.style.gridTemplateRows = "1fr";
|
||||||
@ -41,7 +43,7 @@ const validate = () => {
|
|||||||
students.forEach((student) => {
|
students.forEach((student) => {
|
||||||
if (student.studentCard === parseInt(studCardInput.value)) {
|
if (student.studentCard === parseInt(studCardInput.value)) {
|
||||||
errorDivShell.style.gridTemplateRows = "1fr";
|
errorDivShell.style.gridTemplateRows = "1fr";
|
||||||
errorP.innerHTML = "Заполните поле 'Дата рождения'";
|
errorP.innerHTML = "Заполните поле 'Номер студенческого билета' правильными данными, возможно пользователь с таким номером уже есть";
|
||||||
validStudentCard = false;
|
validStudentCard = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user