все иок контейнеры
This commit is contained in:
parent
2ed6bcf352
commit
caefaf8068
@ -1,6 +1,30 @@
|
||||
using VeterinaryBusinessLogic.BusinessLogic;
|
||||
using VeterinaryContracts.BusinessLogicContracts;
|
||||
using VeterinaryContracts.StorageContracts;
|
||||
using VeterinaryDatabaseImplement.Implements;
|
||||
using Microsoft.OpenApi.Models;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddTransient<IDoctorStorage, DoctorStorage>();
|
||||
builder.Services.AddTransient<IPetStorage, PetStorage>();
|
||||
builder.Services.AddTransient<IDrugStorage, DrugStorage>();
|
||||
builder.Services.AddTransient<IVisitStorage, VisitStorage>();
|
||||
builder.Services.AddTransient<IOwnerStorage, OwnerStorage>();
|
||||
builder.Services.AddTransient<IServiceStorage, ServiceStorage>();
|
||||
builder.Services.AddTransient<IMedicationStorage, MedicationStorage>();
|
||||
builder.Services.AddTransient<IPurchaseStorage, PurchaseStorage>();
|
||||
|
||||
|
||||
builder.Services.AddTransient<IDoctorLogic, DoctorLogic>();
|
||||
builder.Services.AddTransient<IPetLogic, PetLogic>();
|
||||
builder.Services.AddTransient<IDrugLogic, DrugLogic>();
|
||||
builder.Services.AddTransient<IVisitLogic, VisitLogic>();
|
||||
builder.Services.AddTransient<IOwnerLogic, OwnerLogic>();
|
||||
builder.Services.AddTransient<IServiceLogic, ServiceLogic>();
|
||||
builder.Services.AddTransient<IMedicationLogic, MedicationLogic>();
|
||||
builder.Services.AddTransient<IPurchaseLogic, PurchaseLogic>();
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
|
@ -1,13 +0,0 @@
|
||||
namespace VeterinaryRestApi
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
@using VetClinicContracts.ViewModels;
|
||||
@using VeterinaryContracts.ViewModels;
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "UpdateMedicine";
|
||||
ViewData["Title"] = "UpdateMedication";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
@ -11,7 +11,7 @@
|
||||
<div class="row">
|
||||
<div class="col-4">Медикамент:</div>
|
||||
<div class="col-8">
|
||||
<select id="medicine" name="medicine" class="form-control" asp-items="@(new SelectList(@ViewBag.Medicines, "Id", "MedicineName"))"></select>
|
||||
<select id="medication" name="medication" class="form-control" asp-items="@(new SelectList(@ViewBag.Medications, "Id", "MedicationName"))"></select>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<select id="animal" name="animal" class="form-control" asp-items="@(new SelectList(@ViewBag.Animals, "Id", "AnimalName"))"></select>
|
||||
@ -47,14 +47,14 @@
|
||||
{
|
||||
<script>
|
||||
function check() {
|
||||
var medicine = $('#medicine').val();
|
||||
if (medicine) {
|
||||
var medication = $('#medication').val();
|
||||
if (medication) {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "/Home/GetMedicine",
|
||||
data: { medicineId: medicine },
|
||||
url: "/Home/GetMedication",
|
||||
data: { medicationId: medication },
|
||||
success: function (result) {
|
||||
$('#name').val(result.item1.medicineName);
|
||||
$('#name').val(result.item1.medicationName);
|
||||
$('#price').val(result.item1.price);
|
||||
$('#table-elements').html(result.item2);
|
||||
}
|
||||
@ -62,7 +62,7 @@
|
||||
};
|
||||
}
|
||||
check();
|
||||
$('#medicine').on('change', function () {
|
||||
$('#medication').on('change', function () {
|
||||
check();
|
||||
});
|
||||
</script>
|
||||
|
@ -6,5 +6,5 @@
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"IPAddress": "http://localhost:5025/"
|
||||
"IPAddress": "http://localhost:5156/"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user