Commit f1d6f3f9 authored by hasan khaddour's avatar hasan khaddour

add microsoft identity

parent 59e4e13a
......@@ -11,6 +11,7 @@ namespace ApplicationCore.Entities
public String Name { get; set; }
public String Description { get; set; }
public int Price { get; set; }
public String Image { get; set; }
public int Dosage { get; set; }
public Category Category { get; set; }
public MedicineType MedicineType { get; set; }
......
......@@ -16,12 +16,42 @@ namespace ApplicationCore.Services.MedicineService
{
_medicineUnitOfWork = medicineUnitOfWork;
}
public IEnumerable<Medicine> GetAllMedicines() {
return _medicineUnitOfWork.Entity.GetAll(
p => p.Category
, p => p.Ingredients
, p => p.Patients
);
}
public void AddMedicine(Medicine medicine) {
_medicineUnitOfWork.Entity.Insert(medicine);
_medicineUnitOfWork.Save();
}
public void AddMedicineIngredient(int medicineId ,Ingredient ingredient ) {
var s =_medicineUnitOfWork.Entity.GetById(medicineId, p => p.Ingredients);
s.Ingredients.Add(ingredient);
_medicineUnitOfWork.Entity.Update(s);
_medicineUnitOfWork.Save();
}
public Medicine Update(Medicine medicine) {
var r=_medicineUnitOfWork.Entity.Update(medicine);
_medicineUnitOfWork.Save();
return r;
}
public Medicine GetMedicineDetails(int id)
{
return _medicineUnitOfWork.Entity.GetById(id , i => i.MedicineIngredients , i => i.Ingredients );
return _medicineUnitOfWork.Entity.GetById(id , i => i.MedicineIngredients , i => i.Ingredients,c => c.Category );
}
public void Delete(int id) {
_medicineUnitOfWork.Entity.Delete(id);
_medicineUnitOfWork.Save();
}
}
}
......@@ -25,10 +25,10 @@ namespace ApplicationCore.Services.PatientService
return _patientUnitOfWork.Entity.GetById(patientId, p => p.Medicines).Medicines.AsEnumerable();
}
public Medicine GetMedicineDetails(int id)
public Medicine GetMedicineDetails(int id, params Expression<Func<Medicine, object>>[] includeProperties)
{
return _medicineUnitOfWork.Entity.GetById(id, i => i.MedicineIngredients, i => i.Ingredients);
return _medicineUnitOfWork.Entity.GetById(id,includeProperties);
}
public IEnumerable<Patient> getAll(params Expression<Func<Patient, object>>[] includeProperties) {
......
using ApplicationCore.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.ViewModel
{
public class PatientMedicineViewModel
{
public IEnumerable<Patient> Patients { get; set; }
public IEnumerable<Medicine> Medicines { get; set; }
}
}
......@@ -7,9 +7,9 @@ using System.Threading.Tasks;
namespace ApplicationCore.ViewModel
{
public class PateintMedicineViewModel
public class PatientMedicinesViewModel
{
public Patient Patien { get; set; }
public Patient Patient { get; set; }
public IEnumerable<Medicine> Medicines { get; set; }
......
using Microsoft.EntityFrameworkCore.Migrations;
namespace Infrastructure.Migrations
{
public partial class addMedicineImage : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Image",
table: "Medicines",
type: "nvarchar(max)",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Image",
table: "Medicines");
}
}
}
......@@ -69,6 +69,9 @@ namespace Infrastructure.Migrations
b.Property<int>("Dosage")
.HasColumnType("int");
b.Property<string>("Image")
.HasColumnType("nvarchar(max)");
b.Property<int?>("MedicineTypeId")
.HasColumnType("int");
......
faf0a986b979cd5e6d273cd4569afdb74234f6d3
16668239acb0b8ba1b3fb234af1679c89ab8ecd0
......@@ -3,8 +3,18 @@
@{
ViewData["Title"] = "Access denied";
}
<header>
<h1 class="text-danger">@ViewData["Title"]</h1>
<p class="text-danger">You do not have access to this resource.</p>
</header>
<section class="page-section container">
<div class="blankslate col-6 offset-3 p-5">
<img class="blankslate-top-img"style="max-height:300px ; max-width:300px" src="/img/portfolio/Denide.png" />
<div class="blankslate-body">
<h4>You don't have access to this issue</h4>
<p>
Accessing the dashboard page required Admin permission.
</p>
</div>
<div class="blankslate-actions">
<button class="btn btn-default" type="button">Logout</button>
<a class="btn btn-primary" type="" role="button" asp-controller="Home">Go Home</a>
</div>
</div>
</section>
\ No newline at end of file
......@@ -6,79 +6,71 @@
}
<h1>@ViewData["Title"]</h1>
<div class="row">
<div class="col-md-4">
<section>
<form id="account" method="post">
<h4>Use a local account to log in.</h4>
<hr />
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Input.Email"></label>
<input asp-for="Input.Email" class="form-control" />
<span asp-validation-for="Input.Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Input.Password"></label>
<input asp-for="Input.Password" class="form-control" />
<span asp-validation-for="Input.Password" class="text-danger"></span>
</div>
<div class="form-group">
<div class="checkbox">
<label asp-for="Input.RememberMe">
<input asp-for="Input.RememberMe" />
@Html.DisplayNameFor(m => m.Input.RememberMe)
</label>
<section class=" page-section bg-primary" style="background-color: #9A616D;">
<div class="container py-5 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col col-xl-10">
<div class="card" style="border-radius: 1rem;">
<div class="row g-0">
<div class="col-md-6 col-lg-5 d-none d-md-block">
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-login-form/img1.webp"
alt="login form" class="img-fluid" style="border-radius: 1rem 0 0 1rem;" />
</div>
<div class="col-md-6 col-lg-7 d-flex align-items-center">
<div class="card-body p-4 p-lg-5 text-black">
<form method="post">
<div class="d-flex align-items-center mb-3 pb-1">
<i class="fas fa-cubes fa-2x me-3" style="color: #ff6219;"></i>
<span class="h1 fw-bold mb-0">Logo</span>
</div>
<h5 class="fw-normal mb-3 pb-3" style="letter-spacing: 1px;">Sign into your account</h5>
<div data-mdb-input-init class="form-outline mb-4">
<input type="email" id="form2Example17" asp-for="Input.Email" class="form-control form-control-lg" />
<label class="form-label" asp-for="Input.Email">Email address</label>
</div>
<div data-mdb-input-init class="form-outline mb-4">
<input type="password" asp-for="Input.Password" class="form-control form-control-lg" />
<label class="form-label" asp-for="Input.Password">Password</label>
<span asp-validation-for="Input.Password" class="text-danger"></span>
</div>
<div data-mdb-input-init class="form-outline mb-4">
<div class="checkbox">
<label asp-for="Input.RememberMe">
<input asp-for="Input.RememberMe" />
@Html.DisplayNameFor(m => m.Input.RememberMe)
</label>
</div>
</div>
<div class="pt-1 mb-4">
<button data-mdb-button-init data-mdb-ripple-init class="btn btn-dark btn-lg btn-block" role="submit">Login</button>
</div>
<a id="forgot-password" class="small text-muted" asp-page="./ForgotPassword">Forgot your password?</a>
<p class="mb-5 pb-lg-2" style="color: #393f81;">
Don't have an account? <a style="color: #393f81;" asp-page="./Register" asp-route-returnUrl="@Model.ReturnUrl">
Register Here
</a>
</p>
<a href="#!" class="small text-muted">Terms of use.</a>
<a href="#!" class="small text-muted">Privacy policy</a>
</form>
</div>
</div>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Log in</button>
</div>
<div class="form-group">
<p>
<a id="forgot-password" asp-page="./ForgotPassword">Forgot your password?</a>
</p>
<p>
<a asp-page="./Register" asp-route-returnUrl="@Model.ReturnUrl">Register as a new user</a>
</p>
<p>
<a id="resend-confirmation" asp-page="./ResendEmailConfirmation">Resend email confirmation</a>
</p>
</div>
</form>
</section>
</div>
<div class="col-md-6 col-md-offset-2">
<section>
<h4>Use another service to log in.</h4>
<hr />
@{
if ((Model.ExternalLogins?.Count ?? 0) == 0)
{
<div>
<p>
There are no external authentication services configured. See <a href="https://go.microsoft.com/fwlink/?LinkID=532715">this article</a>
for details on setting up this ASP.NET application to support logging in via external services.
</p>
</div>
}
else
{
<form id="external-account" asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" method="post" class="form-horizontal">
<div>
<p>
@foreach (var provider in Model.ExternalLogins)
{
<button type="submit" class="btn btn-primary" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">@provider.DisplayName</button>
}
</p>
</div>
</form>
}
}
</section>
</div>
</div>
</div>
</div>
</section>
@section Scripts {
<partial name="_ValidationScriptsPartial" />
......
using ApplicationCore.Entities;
using ApplicationCore.Interfaces;
using ApplicationCore.Services.MedicineService;
using ApplicationCore.Services.PatientService;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
......@@ -14,18 +15,27 @@ using WebPresentation.Models;
namespace WebPresentation.Controllers
{
[Authorize]
public class HomeController : Controller
{
private readonly PatientService _patientService;
private readonly MedicineService _medicineService;
private readonly UserManager<User> _userManager;
private readonly User _user;
private readonly Patient _patient;
public HomeController(UserManager<User> userManager,IUnitOfWork<Patient> patientUnitOfWork, IUnitOfWork<Medicine> medicineUnitOfWork)
{
_userManager = userManager;
_patientService = new PatientService(patientUnitOfWork,medicineUnitOfWork);
// var userid = _userManager.GetUserAsync(User);
_medicineService = new MedicineService(medicineUnitOfWork);
_user = _userManager.Users.FirstOrDefault();
_patient = _patientService.getAll(u => u.User, u => u.Medicines).Where(u => u.User.Id == _user.Id).FirstOrDefault();
}
[Authorize]
public IActionResult Index()
{
var userId = _userManager.GetUserId(User);
......@@ -37,7 +47,7 @@ namespace WebPresentation.Controllers
}
public IActionResult MedicineDetails(int id ) {
var s = _patientService.GetMedicineDetails(id);
var s = _patientService.GetMedicineDetails(id, i => i.MedicineIngredients, i => i.Ingredients , i => i.Category );
return View(s);
}
public IActionResult Privacy()
......@@ -45,7 +55,9 @@ namespace WebPresentation.Controllers
return View();
}
public IActionResult MedicinesGalary(int id) {
return View(_medicineService.GetAllMedicines());
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
......
using ApplicationCore.Entities;
using ApplicationCore.Interfaces;
using ApplicationCore.Services.MedicineService;
using ApplicationCore.Services.PatientService;
using ApplicationCore.ViewModel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
namespace WebPresentation.Controllers
{
[Authorize(Roles ="Admin")]
public class MedicineController : Controller
{
private readonly MedicineService _medicineService;
private readonly PatientService _patientService;
public MedicineController(IUnitOfWork<Patient> patientUnitOfWork, IUnitOfWork<Medicine> medicineUnitOfWork)
{
_medicineService = new MedicineService( medicineUnitOfWork);
_patientService = new PatientService(patientUnitOfWork,medicineUnitOfWork);
}
public IActionResult Index()
{
var s = new PatientMedicineViewModel
{
Patients = _patientService.getAll(),
Medicines = _medicineService.GetAllMedicines()
};
return View(s);
}
public IActionResult Details(int? id)
{
if (id == null)
{
return NotFound();
}
var medicine = _medicineService.GetMedicineDetails((int)id);
if (medicine == null)
{
return NotFound();
}
return View(medicine);
}
// GET: Projects/Create
public IActionResult Create()
{
return View();
}
// POST: Projects/Create
// To protect from overposting attacks, enable the specific properties you want to bind to.
// For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Create(Medicine medicine, int id)
{
if (ModelState.IsValid)
{
_medicineService.AddMedicine(medicine);
return RedirectToAction(nameof(Index));
}
return View(medicine);
}
// GET: Projects/Edit/5
public IActionResult Edit(int? id)
{
if (id == null)
{
return NotFound();
}
var medicine = _medicineService.GetMedicineDetails((int)id);
if (medicine == null)
{
return NotFound();
}
return View(medicine);
}
// POST: Projects/Edit/5
// To protect from overposting attacks, enable the specific properties you want to bind to.
// For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Edit(int id,Medicine medicine)
{
if (id != medicine.Id)
{
return NotFound();
}
if (ModelState.IsValid)
{
try
{
_medicineService.Update(medicine);
}
catch (DbUpdateConcurrencyException)
{/*
if (!_medicineService.projectExists(project.Id))
{
return NotFound();
}
else
{
throw;
}
*/
}
return RedirectToAction(nameof(Index));
}
return View(medicine);
}
// GET: Projects/Delete/5
public IActionResult Delete(int id)
{
var project = _medicineService.GetMedicineDetails(id);
if (project == null)
{
return NotFound();
}
return View(project);
}
// POST: Projects/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public IActionResult DeleteConfirmed(int id)
{
_medicineService.Delete(id);
return RedirectToAction(nameof(Index));
}
}
}
......@@ -4,5 +4,9 @@
<_SelectedScaffolderID>IdentityScaffolder</_SelectedScaffolderID>
<_SelectedScaffolderCategoryPath>root/Identity</_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ViewDialogWidth>800</WebStackScaffolding_ViewDialogWidth>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
<View_SelectedScaffolderID>RazorViewEmptyScaffolder</View_SelectedScaffolderID>
<View_SelectedScaffolderCategoryPath>root/Common/MVC/View</View_SelectedScaffolderCategoryPath>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -8,6 +8,6 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Data Source=.\\sqlexpress;Initial Catalog=portfolio ;Integrated Security=True"
"DefaultConnection": "Data Source=.\\sqlexpress;Initial Catalog=portfoilo ;Integrated Security=True"
}
}
......@@ -8,6 +8,6 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Data Source=.\\sqlexpress;Initial Catalog=portfolio ;Integrated Security=True"
"DefaultConnection": "Data Source=.\\sqlexpress;Initial Catalog=portfoilo ;Integrated Security=True"
}
}
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Areas\Identity\Pages\Account\AccessDenied.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "51703e521ebe79ffdaf52eb053830c6a91582181"
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Areas\Identity\Pages\Account\AccessDenied.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "582bf0c7425cf1f8ff23de17db010cc3a0a070ed"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Areas_Identity_Pages_Account_AccessDenied), @"mvc.1.0.razor-page", @"/Areas/Identity/Pages/Account/AccessDenied.cshtml")]
......@@ -47,11 +47,36 @@ using WebPresentation.Areas.Identity.Pages.Account;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"51703e521ebe79ffdaf52eb053830c6a91582181", @"/Areas/Identity/Pages/Account/AccessDenied.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"582bf0c7425cf1f8ff23de17db010cc3a0a070ed", @"/Areas/Identity/Pages/Account/AccessDenied.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"74967318c7317c7253bd4196f40076c74014696d", @"/Areas/Identity/Pages/_ViewImports.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"977f1c84f7a8193eb9ad216a7d0b0ff5aebaa5b6", @"/Areas/Identity/Pages/Account/_ViewImports.cshtml")]
public class Areas_Identity_Pages_Account_AccessDenied : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
{
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn btn-primary"), 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("type", new global::Microsoft.AspNetCore.Html.HtmlString(""), 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("role", new global::Microsoft.AspNetCore.Html.HtmlString("button"), 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("asp-controller", "Home", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden
#pragma warning disable 0649
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext;
#pragma warning restore 0649
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner();
#pragma warning disable 0169
private string __tagHelperStringValueBuffer;
#pragma warning restore 0169
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager
{
get
{
if (__backed__tagHelperScopeManager == null)
{
__backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope);
}
return __backed__tagHelperScopeManager;
}
}
private global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper;
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
......@@ -63,15 +88,37 @@ using WebPresentation.Areas.Identity.Pages.Account;
#line default
#line hidden
#nullable disable
WriteLiteral("\r\n<header>\r\n <h1 class=\"text-danger\">");
#nullable restore
#line 8 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Areas\Identity\Pages\Account\AccessDenied.cshtml"
Write(ViewData["Title"]);
#line default
#line hidden
#nullable disable
WriteLiteral("</h1>\r\n <p class=\"text-danger\">You do not have access to this resource.</p>\r\n</header>\r\n");
WriteLiteral(@"<section class=""page-section container"">
<div class=""blankslate col-6 offset-3 p-5"">
<img class=""blankslate-top-img""style=""max-height:300px ; max-width:300px"" src=""/img/portfolio/Denide.png"" />
<div class=""blankslate-body"">
<h4>You don't have access to this issue</h4>
<p>
Accessing the dashboard page required Admin permission.
</p>
</div>
<div class=""blankslate-actions"">
<button class=""btn btn-default"" type=""button"">Logout</button>
");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "582bf0c7425cf1f8ff23de17db010cc3a0a070ed6193", async() => {
WriteLiteral("Go Home");
}
);
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_3.Value;
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
{
await __tagHelperExecutionContext.SetOutputContentAsync();
}
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n </div>\r\n </div>\r\n</section>");
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
......
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c437d36f6f1c412b5698c77620fd73c27400a1c6"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Home_MedicinesGalary), @"mvc.1.0.view", @"/Views/Home/MedicinesGalary.cshtml")]
namespace AspNetCore
{
#line hidden
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
#nullable restore
#line 1 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using WebPresentation;
#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using WebPresentation.Models;
#line default
#line hidden
#nullable disable
#nullable restore
#line 3 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using ApplicationCore.Entities;
#line default
#line hidden
#nullable disable
#nullable restore
#line 5 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using System;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c437d36f6f1c412b5698c77620fd73c27400a1c6", @"/Views/Home/MedicinesGalary.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"afde39527760d3d287f4d84a4731a7fb9211e4e9", @"/Views/_ViewImports.cshtml")]
public class Views_Home_MedicinesGalary : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<IEnumerable<Medicine>>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
#nullable restore
#line 2 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
Write(ViewData["Title"]="Medicines Galary");
#line default
#line hidden
#nullable disable
WriteLiteral(@"
<section class=""page-section mt-5"">
<!-- Carousel wrapper -->
<div id=""carouselMultiItemExample""
data-mdb-carousel-init class=""carousel slide carousel-dark text-center""
data-mdb-ride=""carousel"">
<!-- Inner -->
<div class=""carousel-inner py-4"">
<!-- Single item -->
<div class=""carousel-item active"">
<div class=""container"">
<div class=""row"">
");
#nullable restore
#line 15 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
foreach(var item in Model) {
#line default
#line hidden
#nullable disable
WriteLiteral(" <div class=\"col-lg-4\">\r\n <div class=\"card m-3\">\r\n <img");
BeginWriteAttribute("src", " src=\"", 727, "\"", 759, 2);
WriteAttributeValue("", 733, "/img/portfolio/", 733, 15, true);
#nullable restore
#line 18 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
WriteAttributeValue("", 748, item.Image, 748, 11, false);
#line default
#line hidden
#nullable disable
EndWriteAttribute();
WriteLiteral(@"
class=""card-img-top ""style=""max-height:250px ; max-width:200px""
alt=""Waterfall"" />
<div class=""card-body"">
<h5 class=""card-title"">");
#nullable restore
#line 22 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
Write(item.Name);
#line default
#line hidden
#nullable disable
WriteLiteral("</h5>\r\n <p class=\"card-text\">\r\n ");
#nullable restore
#line 24 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
Write(item.Description);
#line default
#line hidden
#nullable disable
WriteLiteral(" \r\n <br />\r\n Price : ");
#nullable restore
#line 26 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
Write(item.Price);
#line default
#line hidden
#nullable disable
WriteLiteral(" <br />\r\n\r\n Type : ");
#nullable restore
#line 28 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
Write(item.MedicineType);
#line default
#line hidden
#nullable disable
WriteLiteral(@"
</p>
<a href=""#!"" data-mdb-ripple-init class=""btn btn-primary"">Add to my Profile</a>
</div>
</div>
</div>
");
#nullable restore
#line 35 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Home\MedicinesGalary.cshtml"
}
#line default
#line hidden
#nullable disable
WriteLiteral("\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div> \r\n <!-- Inner -->\r\n </div>\r\n <!-- Carousel wrapper -->\r\n</section>");
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<IEnumerable<Medicine>> Html { get; private set; }
}
}
#pragma warning restore 1591
......@@ -5,7 +5,6 @@
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
......@@ -30,11 +29,18 @@ using WebPresentation.Models;
#line 3 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using ApplicationCore.Entities;
#line default
#line hidden
#nullable disable
#nullable restore
#line 5 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using System;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d8ddb6bffa5a9b264bf8f89038bf03c234083fd3", @"/Views/Home/Privacy.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"9f9ba62c54857aa14fac232d9f5f8de0b6e6e9f1", @"/Views/_ViewImports.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"afde39527760d3d287f4d84a4731a7fb9211e4e9", @"/Views/_ViewImports.cshtml")]
public class Views_Home_Privacy : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 1998
......
......@@ -5,7 +5,6 @@
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
......@@ -30,11 +29,18 @@ using WebPresentation.Models;
#line 3 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using ApplicationCore.Entities;
#line default
#line hidden
#nullable disable
#nullable restore
#line 5 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using System;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c4eee3f4993d74b115dec849687defce31fb03ba", @"/Views/Shared/Error.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"9f9ba62c54857aa14fac232d9f5f8de0b6e6e9f1", @"/Views/_ViewImports.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"afde39527760d3d287f4d84a4731a7fb9211e4e9", @"/Views/_ViewImports.cshtml")]
public class Views_Shared_Error : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 1998
......
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9f9ba62c54857aa14fac232d9f5f8de0b6e6e9f1"
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "afde39527760d3d287f4d84a4731a7fb9211e4e9"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views__ViewImports), @"mvc.1.0.view", @"/Views/_ViewImports.cshtml")]
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
......@@ -33,7 +32,14 @@ using ApplicationCore.Entities;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"9f9ba62c54857aa14fac232d9f5f8de0b6e6e9f1", @"/Views/_ViewImports.cshtml")]
#nullable restore
#line 5 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\_ViewImports.cshtml"
using System;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"afde39527760d3d287f4d84a4731a7fb9211e4e9", @"/Views/_ViewImports.cshtml")]
public class Views__ViewImports : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 1998
......
9fdcc34d179e35301f9d9e89bd7d635d887ae873
87af980f554de7a3776e2681740d8dd0c51ce2b5
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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