Commit a98768ba authored by hasan khaddour's avatar hasan khaddour

fix s

parent f402feed
...@@ -21,7 +21,7 @@ namespace WebPresentation.Controllers ...@@ -21,7 +21,7 @@ namespace WebPresentation.Controllers
protected readonly IMapper _mapper; protected readonly IMapper _mapper;
protected readonly IService<TDto> _service; protected readonly IService<TDto> _service;
private Func<TDto, bool> _criteriaProtected; private Func<TDto, bool> _criteriaProtected;
protected Func<TDto, bool> _criteria { protected Func<TDto, bool> criteria {
get { get {
if (_criteriaProtected == null) { if (_criteriaProtected == null) {
_criteriaProtected = GetCriteria(); _criteriaProtected = GetCriteria();
...@@ -77,7 +77,7 @@ namespace WebPresentation.Controllers ...@@ -77,7 +77,7 @@ namespace WebPresentation.Controllers
TDto DetailDto = await _service.GetDetails((int)id); TDto DetailDto = await _service.GetDetails((int)id);
if (DetailDto is null) if (DetailDto is null)
return View("NotFound"); return View("NotFound");
if (_criteria(DetailDto)) if (criteria(DetailDto))
{ {
TVModel model = _mapper.Map<TVModel>(DetailDto); TVModel model = _mapper.Map<TVModel>(DetailDto);
return View(model); return View(model);
...@@ -92,7 +92,7 @@ namespace WebPresentation.Controllers ...@@ -92,7 +92,7 @@ namespace WebPresentation.Controllers
TDto DetailDto = await _service.GetDetails(id); TDto DetailDto = await _service.GetDetails(id);
if (DetailDto == null || !_criteria(DetailDto)) if (DetailDto == null || !criteria(DetailDto))
{ {
return PartialView("PartialNotFound"); return PartialView("PartialNotFound");
} }
...@@ -105,7 +105,7 @@ namespace WebPresentation.Controllers ...@@ -105,7 +105,7 @@ namespace WebPresentation.Controllers
{ {
TDto DetailDto = await _service.GetDetails(id); TDto DetailDto = await _service.GetDetails(id);
if (DetailDto == null || !_criteria(DetailDto)) if (DetailDto == null || !criteria(DetailDto))
{ {
return PartialView("PartialNotFound"); return PartialView("PartialNotFound");
} }
...@@ -125,7 +125,7 @@ namespace WebPresentation.Controllers ...@@ -125,7 +125,7 @@ namespace WebPresentation.Controllers
{ {
TDto tModel = await _service.GetDetails((int)id); TDto tModel = await _service.GetDetails((int)id);
if (tModel == null || !_criteria(tModel)) if (tModel == null || !criteria(tModel))
{ {
return PartialView("PartialNotFound"); return PartialView("PartialNotFound");
} }
...@@ -149,13 +149,20 @@ namespace WebPresentation.Controllers ...@@ -149,13 +149,20 @@ namespace WebPresentation.Controllers
return PartialView("PartialNotFound"); return PartialView("PartialNotFound");
} }
TDto dto ; TDto dto ;
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
try try
{ {
dto = _mapper.Map<TDto>(viewModel); dto = _mapper.Map<TDto>(viewModel);
if (dto == null || !criteria(dto))
{
return PartialView("PartialNotFound");
}
dto = _service.Update(dto); dto = _service.Update(dto);
} }
...@@ -184,7 +191,7 @@ namespace WebPresentation.Controllers ...@@ -184,7 +191,7 @@ namespace WebPresentation.Controllers
{ {
TDto dto = _mapper.Map<TDto>(viewModel); TDto dto = _mapper.Map<TDto>(viewModel);
if (viewModel == null || !_criteria(dto)) if (viewModel == null || !criteria(dto))
{ {
return PartialView(viewModel); return PartialView(viewModel);
} }
...@@ -211,7 +218,7 @@ namespace WebPresentation.Controllers ...@@ -211,7 +218,7 @@ namespace WebPresentation.Controllers
else else
{ {
TDto model = await _service.GetDetails((int)id); TDto model = await _service.GetDetails((int)id);
if (model is null || !_criteria(model)) if (model is null || !criteria(model))
return Ok(new { message = "No Data Found ", result = "Faild" }); return Ok(new { message = "No Data Found ", result = "Faild" });
return Ok(new { message = "Succed", result = model }); return Ok(new { message = "Succed", result = model });
......
...@@ -59,7 +59,7 @@ namespace WebPresentation.Controllers ...@@ -59,7 +59,7 @@ namespace WebPresentation.Controllers
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
[ImageLoadFilter] [ImageLoadFilter]
public async Task<IActionResult> Edit(int id, [FromForm] PatientViewModel viewModel) public IActionResult Edit(int id, [FromForm] PatientViewModel viewModel)
{ {
if (id != viewModel.Id) if (id != viewModel.Id)
{ {
...@@ -99,7 +99,7 @@ namespace WebPresentation.Controllers ...@@ -99,7 +99,7 @@ namespace WebPresentation.Controllers
} }
[Authorize(Roles = "patient")] [Authorize(Roles = "patient")]
public async Task<IActionResult> Details(int? id ) { public async Task<IActionResult> Details() {
var t = await getCurrentPatient(); var t = await getCurrentPatient();
return View(t); return View(t);
......
...@@ -75,7 +75,7 @@ namespace WebPresentation.Controllers ...@@ -75,7 +75,7 @@ namespace WebPresentation.Controllers
try try
{ {
var medical = await _medicalStateService.GetDetails(medicalStateMedicine.MedicalStateId); var medical = await _medicalStateService.GetDetails(medicalStateMedicine.MedicalStateId);
if(!_criteria(medical)) if(!criteria(medical))
return Ok(new { message = "You try to add a medicine for other patient and this is wrong , you shouldn't add a medicine for others", result = "faild" }); return Ok(new { message = "You try to add a medicine for other patient and this is wrong , you shouldn't add a medicine for others", result = "faild" });
var medicalStateMedicineModel = _mapper.Map<MedicalStateMedicineDTO>(medicalStateMedicine); var medicalStateMedicineModel = _mapper.Map<MedicalStateMedicineDTO>(medicalStateMedicine);
...@@ -103,7 +103,7 @@ namespace WebPresentation.Controllers ...@@ -103,7 +103,7 @@ namespace WebPresentation.Controllers
try try
{ {
var medical = await _medicalStateService.GetDetails(medicalStateMedicine.MedicalStateId); var medical = await _medicalStateService.GetDetails(medicalStateMedicine.MedicalStateId);
if (!_criteria(medical)) if (!criteria(medical))
return Ok(new { message = "You try to Reomve a medicine for other patient and this is wrong , you shouldn't remove a medicine for others maybe this kill him", result = "faild" }); return Ok(new { message = "You try to Reomve a medicine for other patient and this is wrong , you shouldn't remove a medicine for others maybe this kill him", result = "faild" });
_medicineService.RemoveFromMedicalState(medicalStateMedicineModel); _medicineService.RemoveFromMedicalState(medicalStateMedicineModel);
...@@ -152,8 +152,7 @@ namespace WebPresentation.Controllers ...@@ -152,8 +152,7 @@ namespace WebPresentation.Controllers
{ {
var u = _patientService.GetByUserId(GetUserId()).Result.Id; var u = _patientService.GetByUserId(GetUserId()).Result.Id;
_criteria = p => p.PatientId == u; return p => p.PatientId == u; ;
return _criteria;
} }
} }
......
...@@ -38,7 +38,7 @@ namespace WebPresentation.Controllers ...@@ -38,7 +38,7 @@ namespace WebPresentation.Controllers
{ {
await _ingredientService.RemoveFromMedicine(medicineIngredientModel); await _ingredientService.RemoveFromMedicine(medicineIngredientModel);
return Ok(new { message = "The Ingredient Removed Successfully", result = "add" }); return Ok(new { message = "add" , result = "The Ingredient Removed Successfully" });
} }
catch (DomainException e) catch (DomainException e)
{ {
...@@ -53,7 +53,7 @@ namespace WebPresentation.Controllers ...@@ -53,7 +53,7 @@ namespace WebPresentation.Controllers
try try
{ {
await _ingredientService.AddToMedicine(medicineIngredientModel); await _ingredientService.AddToMedicine(medicineIngredientModel);
return Ok(new { message = "The Ingredient Added Successfully", result = "add" }); return Ok(new { message = "add" , result = "The Ingredient Added Successfully" });
} }
catch (DomainException e ) { catch (DomainException e ) {
......
using Microsoft.AspNetCore.Http; using ApplicationDomain.Exceptions;
using Microsoft.AspNetCore.Http;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -23,6 +24,12 @@ namespace WebPresentation.Midlewares ...@@ -23,6 +24,12 @@ namespace WebPresentation.Midlewares
{ {
await _next(httpContext); await _next(httpContext);
} }
catch (DomainException ex)
{
httpContext.Response.Redirect("/Home/Error");
}
catch (Exception ex) catch (Exception ex)
{ {
...@@ -32,7 +39,8 @@ namespace WebPresentation.Midlewares ...@@ -32,7 +39,8 @@ namespace WebPresentation.Midlewares
private static Task HandleExceptionAsync(HttpContext context, Exception exception) private static Task HandleExceptionAsync(HttpContext context, Exception exception)
{ {
context.Response.Redirect("/Home/Error"); //log it then redirect
context.Response.Redirect("/Home/Error");
return Task.CompletedTask; return Task.CompletedTask;
} }
......
...@@ -17,6 +17,7 @@ using ApplicationDomain.Abstraction; ...@@ -17,6 +17,7 @@ using ApplicationDomain.Abstraction;
using ApplicationDomain.Repositories; using ApplicationDomain.Repositories;
using ApplicationCore.DTOs; using ApplicationCore.DTOs;
using ApplicationCore.Mapper; using ApplicationCore.Mapper;
using WebPresentation.Midlewares;
using System; using System;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using ApplicationCore.Mappere; using ApplicationCore.Mappere;
...@@ -165,11 +166,13 @@ namespace WebPresentation ...@@ -165,11 +166,13 @@ namespace WebPresentation
} }
else else
{ {
app.UseExceptionHandler("/Home/Error"); app.UseMiddleware<ExceptionHandler>();
// app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts(); app.UseHsts();
} }
// app.UseStatusCodePagesWithRedirects();
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseStaticFiles(); app.UseStaticFiles();
app.UseRouting(); app.UseRouting();
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -8,6 +9,8 @@ namespace WebPresentation.ViewModels ...@@ -8,6 +9,8 @@ namespace WebPresentation.ViewModels
{ {
public class IngredientViewModel : BaseViewModel public class IngredientViewModel : BaseViewModel
{ {
[Required]
[MinLength(4)]
public String Name { get; set; } public String Name { get; set; }
public String Description { get; set; } public String Description { get; set; }
......
...@@ -7,13 +7,19 @@ namespace WebPresentation.ViewModels ...@@ -7,13 +7,19 @@ namespace WebPresentation.ViewModels
{ {
public class MedicineViewModel : BaseViewModel , IImageForm public class MedicineViewModel : BaseViewModel , IImageForm
{ {
[Required]
[Display(Name ="Trade Name ")] [Display(Name ="Trade Name ")]
public String TradeName { get; set; } public String TradeName { get; set; }
[Required]
[Display(Name = "Scintific Name ")] [Display(Name = "Scintific Name ")]
public String ScintificName { get; set; } public String ScintificName { get; set; }
[Required]
[Display(Name = "Manufacture Name ")] [Display(Name = "Manufacture Name ")]
public String ManufactureName { get; set; } public String ManufactureName { get; set; }
[Required]
[Display(Name = "Side Effect")] [Display(Name = "Side Effect")]
public String SideEffect { get; set; } public String SideEffect { get; set; }
public String Description { get; set; } public String Description { get; set; }
......
@model WebPresentation.ViewModels.ChangePasswordViewModel @model WebPresentation.ViewModels.ChangePasswordViewModel
<section class="page-section py-5"> <style>
<form asp-action="ChangePassword" method="post">
<div class="form-group"> .separator {
<label asp-for="CurrentPassword"></label> border-right: 1px solid #dfdfe0;
<input asp-for="CurrentPassword" class="form-control" /> }
<span asp-validation-for="CurrentPassword" class="text-danger"></span>
</div> .icon-btn-save {
<div class="form-group"> padding-top: 0;
<label asp-for="NewPassword"></label> padding-bottom: 0;
<input asp-for="NewPassword" class="form-control" /> }
<span asp-validation-for="NewPassword" class="text-danger"></span>
</div> .input-group {
<div class="form-group"> margin-bottom: 10px;
<label asp-for="ConfirmPassword"></label> }
<input asp-for="ConfirmPassword" class="form-control" />
<span asp-validation-for="ConfirmPassword" class="text-danger"></span> .btn-save-label {
position: relative;
left: -12px;
display: inline-block;
padding: 6px 12px;
background: rgba(0,0,0,0.15);
border-radius: 3px 0 0 3px;
}
</style>
<section class="page-section ">
<form asp-action="ChangePassword" class=py-5 method="post">
<div class="container bootstrap snippets bootdey">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6 col-md-offset-2">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-th"></span>
Change password
</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6 separator social-login-box">
<br>
<img alt="" class="img-thumbnail" src="/img/portfolio/Denide.png">
</div>
<div style="margin-top:80px;" class="col-xs-6 col-sm-6 col-md-6 login-box">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">
<span class="glyphicon glyphicon-lock"></span>
</div>
<input asp-for="CurrentPassword" class="form-control" type="password" placeholder="Current Password">
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-log-in"></span></div>
<input asp-for="NewPassword" class="form-control" type="password" placeholder="New Password">
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-log-in"></span></div>
<input asp-for="ConfirmPassword" class="form-control" type="password" placeholder="New Password">
</div>
</div>
</div>
</div>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6"></div>
<div class="col-xs-6 col-sm-6 col-md-6">
<button class="btn icon-btn-save btn-success" type="submit">
<span class="btn-save-label"><i class="glyphicon glyphicon-floppy-disk"></i></span>save
</button>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<button type="submit" class="btn btn-primary">Change Password</button> </div>
</form> </form>
</section> </section>
@section Scripts { @section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");} @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
ViewData["userName"] = Model.User.FirstName + " " + Model.User.LastName; ViewData["userName"] = Model.User.FirstName + " " + Model.User.LastName;
ViewData["title"] = "Edit"; ViewData["title"] = "Details";
ViewBag.Avatar = Model.User.Avatar; ViewBag.Avatar = Model.User.Avatar;
ViewData["Controller"] = "Home"; ViewData["Controller"] = "Home";
......
...@@ -4,55 +4,142 @@ ...@@ -4,55 +4,142 @@
ViewData["Title"] = "Edit"; ViewData["Title"] = "Edit";
} }
<style>
.account-settings .user-profile {
margin: 0 0 1rem 0;
padding-bottom: 1rem;
text-align: center;
}
<section class="page-section"> .account-settings .user-profile .user-avatar {
<div class="container py-5"> margin: 0 0 1rem 0;
<div class="row justify-content-center"> }
<div class="">
<div class="card shadow-sm">
<div class="card-body">
<form asp-action="Edit" class="row g-3" enctype="multipart/form-data">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="col-md-6">
<label asp-for="BIO" class="form-label">Patient Personal info</label>
<input asp-for="BIO" class="form-control" />
<span asp-validation-for="BIO" class="text-danger"></span>
</div>
<div class="col-md-6"> .account-settings .user-profile .user-avatar img {
<label asp-for="User.FirstName" class="form-label"></label> width: 90px;
<input asp-for="User.FirstName" class="form-control" /> height: 90px;
<span asp-validation-for="User.FirstName" class="text-danger"></span> -webkit-border-radius: 100px;
</div> -moz-border-radius: 100px;
border-radius: 100px;
}
.account-settings .user-profile h5.user-name {
margin: 0 0 0.5rem 0;
}
<div class="col-md-6"> .account-settings .user-profile h6.user-email {
<label asp-for="User.LastName" class="form-label"></label> margin: 0;
<input asp-for="User.LastName" class="form-control" /> font-size: 0.8rem;
<span asp-validation-for="User.LastName" class="text-danger"></span> font-weight: 400;
</div> }
.account-settings .about {
margin: 1rem 0 0 0;
font-size: 0.8rem;
text-align: center;
}
.card {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border: 0;
margin-bottom: 1rem;
}
<div class="col-12"> .form-control {
<label asp-for="ImageFile" class="form-label">Image File</label> border: 1px solid #596280;
<input type="file" asp-for="ImageFile" class="form-control" /> -webkit-border-radius: 2px;
<span asp-validation-for="ImageFile" class="text-danger"></span> -moz-border-radius: 2px;
border-radius: 2px;
font-size: .825rem;
}
</style>
<section class="page-section ">
<form asp-action="Edit" enctype="multipart/form-data">
<div class="container">
<div asp-validation-summary="ModelOnly" class="row gutters border-1">
<div class="col-xl-3 col-lg-3 col-md-12 col-sm-12 col-12">
<div class="card h-100">
<div class="card-body">
<div class="account-settings">
<div class="user-profile">
<div class="user-avatar">
<img src="/img/@Model.User.Avatar" alt="@Model.User.FirstName">
</div>
<h5 class="user-name">@Model.User.FirstName @Model.User.LastName </h5>
<h6 class="user-email">@Model.User.Email </h6>
</div>
<div class="about">
<h5 class="mb-2 text-primary">About</h5>
<p>@Model.BIO</p>
</div>
</div> </div>
</div>
</div>
</div>
<div class="col-xl-9 col-lg-9 col-md-12 col-sm-12 col-12">
<div class="card h-100">
<div class="card-body">
<div class="row gutters">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<h6 class="mb-3 text-primary">Personal Details</h6>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label asp-for="User.FirstName" class="form-label"></label>
<input asp-for="User.FirstName" class="form-control" />
<span asp-validation-for="User.FirstName" class="text-danger"></span>
<div class="col-12 mt-4"> </div>
<input type="hidden" asp-for="Id" /> </div>
<input type="hidden" asp-for="User.Id" /> <div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<input type="hidden" asp-for="UserId" /> <div class="form-group">
<button type="submit" class="btn btn-primary">Save</button> <label asp-for="User.LastName" class="form-label"></label>
<input placeholder="@Model.User.LastName" asp-for="User.LastName" class="form-control" />
<span asp-validation-for="User.LastName" class="text-danger"></span>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label asp-for="User.PhoneNumber" class="form-label"></label>
<input asp-for="User.PhoneNumber" class="form-control" />
<span asp-validation-for="User.PhoneNumber" class="text-danger"></span>
</div>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="">
<label asp-for="ImageFile" class="form-label"></label>
<input asp-for="ImageFile" class="form-control" />
</div>
</div>
</div>
<div class="row gutters">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<h6 class="mb-3 text-primary">More Info</h6>
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">
<div class="form-group">
<label asp-for="BIO" class="form-label"></label>
<textarea asp-for="BIO" rows="4" class="form-control " ></textarea>
</div>
</div>
</div> </div>
</form> <div class="row gutters">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="text-right">
<a type="button" asp-action="Index" asp-controller="Home" class="btn btn-secondary">Cancel</a>
<button type="button" id="submit" name="submit" class="btn btn-primary">Update</button>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </form>
</section> </section>
@section Scripts { @section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");} @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="container py-5"> <div class="container ">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col "> <div class="col ">
<div class=" shadow-lg p-3 mb-5 bg-white rounded"> <div class=" p-3 bg-white rounded">
<div class=""> <div class="">
<hr /> <hr />
<form asp-action="Create" method="post"> <form asp-action="Create" method="post">
...@@ -37,14 +37,13 @@ ...@@ -37,14 +37,13 @@
</div> </div>
<div class="text-center"> <div class="text-center">
<button type="submit" class="btn btn-primary btn-lg">Create</button> <button type="submit" class="btn btn-primary mr-4 btn">Create</button>
<button type="button" class="btn btn-secondary ml-4" data-dismiss="modal">Close</button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="text-center">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<div class="d-flex"> <div class="d-flex">
<button class="btn btn-warning btn-edit m-1" data-id="@item.Id">Edit</button> <button class="btn btn-warning btn-edit m-1" data-id="@item.Id">Edit</button>
<button class="btn btn-danger btn-delete m-1" data-id="@item.Id">Delete</button> <button class="btn btn-danger btn-delete m-1" data-id="@item.Id">Delete</button>
<a asp-action="Details" asp-route-id="@item.Id" class="m-1 btn btn-info text-info " title="Details">Details</a> <a asp-action="Details" asp-route-id="@item.Id" class="m-1 btn btn-info " >Details</a>
</div> </div>
</td> </td>
</tr> </tr>
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<h5>Your Medicines in this case:</h5> <h5>Your Medicines in this case:</h5>
<hr class="mt-0 "> <hr class="mt-0 ">
<div class="row p-4"> <div class="row p-4">
<div class="table-responsive">
<table id="Ingredients_" class="table table-bordered table-hover"> <table id="Ingredients_" class="table table-bordered table-hover">
<thead class="thead-light"> <thead class="thead-light">
<tr> <tr>
...@@ -94,6 +95,8 @@ ...@@ -94,6 +95,8 @@
} }
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
<hr /> <hr />
<div class="row pt-1"> <div class="row pt-1">
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
<div class="container mt-5"> <div class="container mt-5">
<div class="row mb-4"> <div class="row mb-4">
<div class="col text-center"> <div class="col text-center">
do you have a new Medical case ? <h4>
<button class="btn btn-success ml-2 btn-create" >Create</button> do you have a new Medical case ?
</h4> <button class="btn btn-success ml-2 btn-create" data-controller="MedicalState">Create</button>
</div> </div>
</div> </div>
......
...@@ -23,22 +23,22 @@ ...@@ -23,22 +23,22 @@
<button class="btn btn-danger btn-delete" data-id="@Model.Id">Delete</button> <button class="btn btn-danger btn-delete" data-id="@Model.Id">Delete</button>
</div> </div>
<div class="col-8"> <div class="col-8">
<div class="card-body p-4"> <div class=" p-4">
<h6>Information:</h6> <h6 class="text-center">Information</h6>
<hr class="mt-0 mb-4"> <hr class="mt-0 mb-4">
<div class="row pt-1"> <div class="row pt-1">
<div class="col mb-3"> <div class="col-12 mb-3">
<h6> <h6>
Description : <span class="text-muted">@Model.Description</span> Description : <span class="text-muted">@Model.Description</span>
</h6> </h6>
</div> </div>
<div class="col-12 row mb-3"> <div class="col-12 row mb-3">
<h6 class="col"> <h6 class="col-6">
Type : <span class="text-muted">@Model.MedicineType?.TypeName</span> Type : <span class="text-muted">@Model.MedicineType?.TypeName</span>
</h6> </h6>
<h6 class="col text-muted">Dosage : <span class="text-muted">@Model.Dosage</span></h6> <h6 class="col-6">Dosage : <span class="text-muted">@Model.Dosage</span></h6>
<h6 class="col text-muted">Price : <span class="text-muted">@Model.Price</span></h6> <h6 class="col-6">Price : <span class="text-muted">@Model.Price</span></h6>
</div> </div>
</div> </div>
...@@ -46,55 +46,58 @@ ...@@ -46,55 +46,58 @@
</div> </div>
<div class="col-12 p-3"> <div class="col-12 p-3">
<h6>Ingredients : </h6> <h6 class="text-center">Ingredients </h6>
<hr class="mt-0 mb-4"> <hr class="">
<div class="row pt-1 p-3"> <div class="row pt-1 p-3">
<table id="Ingredients_" class=" p-4 table table-bordered"> <div class="table-responsive">
<thead class="thead-light"> <table id="Ingredients_" class="table table-bordered">
<tr> <thead>
<td>#</td>
<td>Name</td>
<td>Description</td>
<td>Ratio</td>
<td>Manage</td>
</tr>
</thead>
<tbody>
@if (Model.MedicineIngredients.Count == 0)
{
<tr> <tr>
<td></td> <td>#</td>
<td></td> <td>Name</td>
<td></td> <td>Description</td>
<td></td> <td>Ratio</td>
<td></td> <td>Manage</td>
</tr> </tr>
</thead>
<tbody>
@if (Model.MedicineIngredients.Count == 0)
{
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
} }
@foreach (var ing in Model.MedicineIngredients) @foreach (var ing in Model.MedicineIngredients)
{ {
<tr class=" mb-3"> <tr class=" mb-3">
<td>@(a+=1)</td> <td>@(a+=1)</td>
<td>@ing.Ingredient.Name</td> <td>@ing.Ingredient.Name</td>
<td>@ing.Ingredient.Description</td> <td>@ing.Ingredient.Description</td>
<td>@ing.Ratio</td> <td>@ing.Ratio</td>
<td> <td>
<button class="btn btn-danger" ondblclick='DeleteConfirm("Delete Confirm", "Are you sure you want to delete @ing.Ingredient.Name From this medicine", "ReomveIngredient",@ing.IngredientId)'>Delete</button> <button class="btn btn-danger" ondblclick='DeleteConfirm("Delete Confirm", "Are you sure you want to delete @ing.Ingredient.Name From this medicine", "ReomveIngredient",@ing.IngredientId)'>Delete</button>
</td> </td>
</tr> </tr>
} }
</tbody>
</table> </tbody>
</table>
</div>
</div> </div>
<hr /> <hr />
<div class="row pt-1"> <div class="row pt-1">
<div class="col-6 mb-3"> <div class="col-4 offset-1 mb-3">
<a asp-action="Index">Back to List</a> <a class="btn btn-primary" asp-action="Index">Back to List</a>
</div> </div>
<div class="col-6 mb-3"> <div class="col-4 mb-3">
<button class="btn btn-primary" onclick="fetchAll()">Get All Ingredients </button> <button class="btn btn-primary" onclick="fetchAll()">Get All Ingredients </button>
</div> </div>
...@@ -215,7 +218,7 @@ ...@@ -215,7 +218,7 @@
row.innerHTML = ` row.innerHTML = `
<td>${medicine.ingredient.name}</td> <td>${medicine.ingredient.name}</td>
<td>${medicine.ingredient.description}</td> <td>${medicine.ingredient.description}</td>
${ medicine.ratio} <td>${ medicine.ratio}</td>
<td> <td>
<button <button
...@@ -284,7 +287,7 @@ ...@@ -284,7 +287,7 @@
if (response.ok) { if (response.ok) {
let result = await response.json(); let result = await response.json();
updateIngredients(); updateIngredients();
showToast(result.message, result.result); showToast(result.result, result.message);
} else { } else {
console.error('Error:', response.statusText); console.error('Error:', response.statusText);
showToast('Failed to add medicine', 'Error'); showToast('Failed to add medicine', 'Error');
...@@ -334,8 +337,9 @@ ...@@ -334,8 +337,9 @@
if (response.ok) { if (response.ok) {
let result = await response.json(); let result = await response.json();
showToast(result.message, result.result);
updateIngredients(); updateIngredients();
showToast(result.result, result.message);
} else { } else {
......
@{ @Model String
@{
ViewData["Title"] = "Error"; ViewData["Title"] = "Error";
var c = "An error occurred while processing your request.";
if (! (Model== "" || Model is null )) {
c = Model;
}
} }
<h1 class="text-danger">Error.</h1> <h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2> <h2 class="text-danger">@c</h2>
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
<meta name="description" content="" /> <meta name="description" content="" />
<meta name="author" content="" /> <meta name="author" content="" />
<title>DashBoard - @ViewData["Title"]</title> <title>DashBoard - @ViewData["Title"]</title>
@*<link href="https://cdn.jsdelivr.net/npm/simple-datatables@7.1.2/dist/style.min.css" rel="stylesheet" />*@
<link href="/css/styles.css" rel="stylesheet" /> <link href="/css/styles.css" rel="stylesheet" />
<link href="/favicon.png" rel="icon"> <link href="/favicon.png" rel="icon">
@* <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>*@ <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<!-- Custom fonts for this theme --> <!-- Custom fonts for this theme -->
<link href="~/fonts/css/all.min.css" rel="stylesheet" type="text/css"> <link href="~/fonts/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="~/favicon.png" rel="icon" /> <link href="~/favicon.png" rel="icon" />
<!-- Theme CSS --> <!-- Theme CSS -->
<link href="~/css/freelancer.css" rel="stylesheet"> <link href="~/css/freelancer.css" rel="stylesheet">
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
</a> </a>
<div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion"> <div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav"> <nav class="sb-sidenav-menu-nested nav">
<a class="nav-link btn-create" data-Controller="Patients">Add Patient </a>
<a class="nav-link" asp-controller="Patients" asp-action="Index">ALL Patients </a> <a class="nav-link" asp-controller="Patients" asp-action="Index">ALL Patients </a>
</nav> </nav>
...@@ -94,8 +95,9 @@ ...@@ -94,8 +95,9 @@
</a> </a>
<div class="collapse" id="ing" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion"> <div class="collapse" id="ing" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav"> <nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" asp-controller="Ingredient" asp-action="Create">Add Ingredient </a> <a class="nav-link btn-create" data-Controller="Ingredient" >Add Ingredient </a>
<a class="nav-link" asp-controller="Ingredient" asp-action="Index">ALL Ingredients </a> <a class="nav-link" asp-controller="Ingredient" asp-action="Index">ALL Ingredients </a>
</nav> </nav>
</div> </div>
...@@ -107,7 +109,7 @@ ...@@ -107,7 +109,7 @@
</a> </a>
<div class="collapse" id="cPages" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion"> <div class="collapse" id="cPages" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav"> <nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" asp-controller="Medicine" asp-action="Create">Add Medicine </a> <a class="nav-link btn-create" data-Controller="Medicine">Add Medicine </a>
<a class="nav-link" asp-controller="Medicine" asp-action="Index">ALL Medicines </a> <a class="nav-link" asp-controller="Medicine" asp-action="Index">ALL Medicines </a>
</nav> </nav>
</div> </div>
...@@ -213,8 +215,13 @@ ...@@ -213,8 +215,13 @@
}); });
}); });
$('.btn-create').on('click', function () { $('.btn-create').on('click', function () {
var controller = `@ViewData["Controller"]`; var controller = `@ViewData["Controller"]`;
debugger
var id = $(this).data('controller');
if(id)
controller = id;
$('#modal-create').find('.modal-content').load(`/${controller}/create/` ); $('#modal-create').find('.modal-content').load(`/${controller}/create/` );
$('#modal-create').modal('show'); $('#modal-create').modal('show');
}); });
......
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Ingredient\Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3302db48136fd4ef2e2cf1b555107dde6de5327d" #pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Ingredient\Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b738139b3e92349f64647c3d57c377ddd7479488"
// <auto-generated/> // <auto-generated/>
#pragma warning disable 1591 #pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Ingredient_Index), @"mvc.1.0.view", @"/Views/Ingredient/Index.cshtml")] [assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Ingredient_Index), @"mvc.1.0.view", @"/Views/Ingredient/Index.cshtml")]
...@@ -46,14 +46,13 @@ using System; ...@@ -46,14 +46,13 @@ using System;
#line default #line default
#line hidden #line hidden
#nullable disable #nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"3302db48136fd4ef2e2cf1b555107dde6de5327d", @"/Views/Ingredient/Index.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"b738139b3e92349f64647c3d57c377ddd7479488", @"/Views/Ingredient/Index.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4a2f5fee0d7223f937b9f0309fc3b9062263e26d", @"/Views/_ViewImports.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4a2f5fee0d7223f937b9f0309fc3b9062263e26d", @"/Views/_ViewImports.cshtml")]
public class Views_Ingredient_Index : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<IEnumerable<IngredientViewModel>> public class Views_Ingredient_Index : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<IEnumerable<IngredientViewModel>>
{ {
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Details", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Details", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("m-1 btn btn-info text-info "), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("m-1 btn btn-info "), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("title", new global::Microsoft.AspNetCore.Html.HtmlString("Details"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("name", "_ValidationScriptsPartial", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("name", "_ValidationScriptsPartial", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
#pragma warning disable 0649 #pragma warning disable 0649
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext;
...@@ -177,7 +176,7 @@ using System; ...@@ -177,7 +176,7 @@ using System;
#line hidden #line hidden
#nullable disable #nullable disable
WriteLiteral("\">Delete</button>\r\n "); WriteLiteral("\">Delete</button>\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "3302db48136fd4ef2e2cf1b555107dde6de5327d9498", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "b738139b3e92349f64647c3d57c377ddd74794889142", async() => {
WriteLiteral("Details"); WriteLiteral("Details");
} }
); );
...@@ -201,7 +200,6 @@ using System; ...@@ -201,7 +200,6 @@ using System;
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
...@@ -235,13 +233,13 @@ using System; ...@@ -235,13 +233,13 @@ using System;
"); ");
DefineSection("Scripts", async() => { DefineSection("Scripts", async() => {
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("partial", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "3302db48136fd4ef2e2cf1b555107dde6de5327d12647", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("partial", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "b738139b3e92349f64647c3d57c377ddd747948812208", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper>(); __Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper);
__Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper.Name = (string)__tagHelperAttribute_3.Value; __Microsoft_AspNetCore_Mvc_TagHelpers_PartialTagHelper.Name = (string)__tagHelperAttribute_2.Value;
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
......
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Shared\Error.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c4eee3f4993d74b115dec849687defce31fb03ba" #pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Shared\Error.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "f93d6f0fc50405e0bb699d6e3ffddb42778818ad"
// <auto-generated/> // <auto-generated/>
#pragma warning disable 1591 #pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Shared_Error), @"mvc.1.0.view", @"/Views/Shared/Error.cshtml")] [assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Shared_Error), @"mvc.1.0.view", @"/Views/Shared/Error.cshtml")]
...@@ -46,7 +46,7 @@ using System; ...@@ -46,7 +46,7 @@ using System;
#line default #line default
#line hidden #line hidden
#nullable disable #nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c4eee3f4993d74b115dec849687defce31fb03ba", @"/Views/Shared/Error.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"f93d6f0fc50405e0bb699d6e3ffddb42778818ad", @"/Views/Shared/Error.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4a2f5fee0d7223f937b9f0309fc3b9062263e26d", @"/Views/_ViewImports.cshtml")] [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4a2f5fee0d7223f937b9f0309fc3b9062263e26d", @"/Views/_ViewImports.cshtml")]
public class Views_Shared_Error : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> public class Views_Shared_Error : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{ {
...@@ -55,13 +55,33 @@ using System; ...@@ -55,13 +55,33 @@ using System;
{ {
#nullable restore #nullable restore
#line 1 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Shared\Error.cshtml" #line 1 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Shared\Error.cshtml"
Write(Model);
#line default
#line hidden
#nullable disable
WriteLiteral(" String\r\n");
#nullable restore
#line 2 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Shared\Error.cshtml"
ViewData["Title"] = "Error"; ViewData["Title"] = "Error";
var c = "An error occurred while processing your request.";
if (! (Model== "" || Model is null )) {
c = Model;
}
#line default
#line hidden
#nullable disable
WriteLiteral("\r\n<h1 class=\"text-danger\">Error.</h1>\r\n<h2 class=\"text-danger\">");
#nullable restore
#line 11 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Shared\Error.cshtml"
Write(c);
#line default #line default
#line hidden #line hidden
#nullable disable #nullable disable
WriteLiteral("\r\n<h1 class=\"text-danger\">Error.</h1>\r\n<h2 class=\"text-danger\">An error occurred while processing your request.</h2>\r\n"); WriteLiteral("</h2>\r\n");
} }
#pragma warning restore 1998 #pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment