Commit 12bda7d1 authored by Mihrali ŞEKER's avatar Mihrali ŞEKER
Browse files

Initial commit

parents
@page "/projeekle"
@inherits GorevekleBase
<table class="table" style="width:50%;border:3px solid black;background: rgba(178, 238, 238, 0.897);box-shadow: 0 0 25px rgb(12, 12, 12);float:right;position:relative">
<thead>
<tr>
<th>Proje ID</th>
<th>Proje Adı</th>
<th>Proje Baslangıc</th>
<th>Proje Bitis</th>
<th>Bolum</th>
<th>Proje Durum</th>
</tr>
</thead>
<tbody style="overflow: scroll;">
@foreach(var prj in projes)
{
<tr style="height:80px">
<td>@prj.proje_id</td>
<td>@prj.proje_adi</td>
<td>@prj.proje_baslangic</td>
<td>@prj.proje_bitis</td>
<td>@prj.bolum_id</td>
<td>@prj.proje_durum</td>
</tr>
}
</tbody>
</table>
<div id="div2">
<div id="projediv">
<h2>Yeni Proje Ekle</h2>
<div class="textbox2">
<p id="p1">Proje Ekle</p>
<input @bind:event="oninput" @bind="Proje">
</div>
<div class="textbox2">
<p id="p2">Bitis Tarihi</p>
<input type="date" id="trh" value="Bitistarih" @onchange="tarihal">
</div>
<input id="projebtn" type="button" @onclick="projeekle" value="Ekle">
</div>
<div id="projediv2">
<h2>Projeyi Güncelle</h2>
<div class="textbox2">
<p id="p1">Proje ID</p>
<input @bind:event="oninput" @bind="Projesid">
</div>
<div class="textbox2">
<p id="p2">Yeni Proje</p>
<input @bind:event="oninput" @bind="YeniProje">
</div>
<input id="projebtn" type="button" @onclick="projeguncelle" value="Guncelle">
</div>
</div>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components;
using System.Diagnostics;
using System.Globalization;
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
using Microsoft.JSInterop;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Net.Http;
using System.Data.SqlClient;
using System.Data;
using static Todo.Pages.LoginCheck;
namespace Todo.Pages
{
public class Projes2{
public int proje_id{get;set;}
public string proje_adi{get;set;}
public string proje_baslangic{get;set;}
public string proje_bitis{get;set;}
public int bolum_id{get;set;}
public int proje_durum{get;set;}
}
public class GorevekleBase:ComponentBase
{
[Inject]
public NavigationManager NavigationManager { get; set; }
public string Proje{get;set;}
public DateTime Bitistarih{get;set;}
public string tarihstr{get;set;}
public List<Projes2> projes=new List<Projes2>();
public string Projesid{get;set;}
public string YeniProje{get;set;}
protected override async Task OnInitializedAsync()
{
if(Loginclass.m1=="NULL" && Loginclass.m2=="NULL")
{
NavigationManager.NavigateTo("/");
}
else
{
projes.Clear();
projes=Projegoster();
}
}
public void projeekle()
{
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
SqlCommand cmd = baglanti.CreateCommand();
cmd.CommandText = "insert into proje(proje_adi,proje_bitis,bolum_id) values('"+Proje+"','"+tarihstr+"',"+Loginclass.bolum_id_tut+")";
Console.WriteLine(cmd.CommandText);
baglanti.Open();
cmd.ExecuteNonQuery();
baglanti.Close();
OnInitializedAsync();
}
public void projeguncelle()
{
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
SqlCommand cmd = baglanti.CreateCommand();
cmd.CommandText = "update proje set proje_adi='"+YeniProje+"' where proje_id="+Projesid+"";
Console.WriteLine(cmd.CommandText);
baglanti.Open();
cmd.ExecuteNonQuery();
baglanti.Close();
OnInitializedAsync();
}
public async Task tarihal(ChangeEventArgs e)
{
tarihstr=e.Value.ToString();
Console.WriteLine(tarihstr);
}
public List<Projes2> Projegoster(){
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
string sql = "select *from Proje";
SqlDataAdapter daps= new SqlDataAdapter (sql,baglanti);
DataSet dsps = new DataSet();
try
{
daps.Fill(dsps, "projes");
for (int i = 0; i < dsps.Tables[0].Rows.Count; i++)
{
Projes2 pm = new Projes2();
pm.proje_id = Int32.Parse(dsps.Tables[0].Rows[i]["proje_id"].ToString());
pm.proje_adi = dsps.Tables[0].Rows[i]["proje_adi"].ToString();
pm.proje_baslangic = dsps.Tables[0].Rows[i]["proje_baslangic"].ToString();
pm.proje_bitis = dsps.Tables[0].Rows[i]["proje_bitis"].ToString();
pm.bolum_id = Int32.Parse(dsps.Tables[0].Rows[i]["bolum_id"].ToString());
pm.proje_durum = Int32.Parse(dsps.Tables[0].Rows[i]["proje_durum"].ToString());
projes.Add(pm);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return projes;
}
}
}
\ No newline at end of file
@page "/register"
<div id="dis-div">
<div class="register-div">
<h1>Register</h1>
<div class="textbox">
<span class="material-icons">account_circle</span>
<input class="input-1" type="text" @bind="register_name" @bind:event="oninput" placeholder="Enter First Name" required>
</div>
<div class="textbox">
<span class="material-icons">account_circle</span>
<input class="input-1" type="text" @bind="register_lastname" @bind:event="oninput" placeholder="Enter Last Name" required>
</div>
<div class="textbox">
<span class="material-icons">email</span>
<input class="input-1" type="email" @bind="register_email" @bind:event="oninput" placeholder="Enter Email" required>
</div>
<div class="textbox">
<span class="material-icons">lock</span>
<input class="input-1" type="password" @bind="register_password" @bind:event="oninput" id="password2" placeholder="Enter Password" maxlength="8" required>
</div>
<input class="submit-2" type="button" @onclick="registergiris" value="Register">
</div>
<div id="regcallback">
<p id="pp">Başarıyla Kayıt Oldun</p>
</div>
<div id="regcallback2">
<p id="pp">Bu maile ait hesap zaten var</p>
</div>
<div id="regcallback3">
<p id="pp">Kayıt Basarisiz lütfen alanları doldurunuz</p>
</div>
<button id="logindon" onclick="window.location.href='/'">Logine Dön</button>
</div>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components;
using System.Diagnostics;
using System.Globalization;
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
using Microsoft.JSInterop;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Net.Http;
using System.Data.SqlClient;
using System.Data;
using Todo.Pages;
namespace Todo.Pages
{
public partial class Register
{
[Inject]
IJSRuntime JSRuntime { get; set; }
public string register_name{get;set;}="";
public string register_lastname{get;set;}="";
public string register_email{get;set;}="";
public string register_password{get;set;}="";
public void registergiris(){
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
SqlCommand cmd = baglanti.CreateCommand();
cmd.CommandText ="exec user_register '"+register_name+"','"+register_lastname+"','"+register_email+"','"+register_password+"',@result OUTPUT";
SqlParameter outputParam = cmd.Parameters.Add("@result", SqlDbType.Int);
outputParam.Direction = ParameterDirection.Output;
if(register_name == "" || register_lastname == "" || register_email == "" || register_password == "")
{
JSRuntime.InvokeVoidAsync("JSRegCallback3");
}
else{
baglanti.Open();
cmd.ExecuteNonQuery();
if(outputParam.Value.ToString()=="1")
{
JSRuntime.InvokeVoidAsync("JSRegCallback2");
}
else if(outputParam.Value.ToString()=="2")
{
JSRuntime.InvokeVoidAsync("JSRegCallback");
}
baglanti.Close();
Console.WriteLine(outputParam.Value.ToString());
}
}
}
}
\ No newline at end of file
@page "/todo"
@inherits SirkettodoBase
@using static Todo.Pages.LoginCheck
<table class="table" style="width:auto;position:relative;float:left;border:3px solid black">
<thead>
<tr>
<th>Görev ID</th>
<th>Görev</th>
<th>Bölüm</th>
<th>Görev Tamamlama</th>
</tr>
</thead>
<tbody>
@{
Boolean kontrol;
}
@foreach(var atm in atama2)
{
@if(atm.user_id.ToString() == Loginclass.kisi_id_tut){
<tr>
@foreach(var grv2 in gorev3)
{
@if(atm.gorev_id==grv2.gorev_id)
{
<td>@grv2.gorev_id</td>
<td>@grv2.gorev</td>
}
}
@foreach(var blm2 in bolum3)
{
@if(atm.bolum_id==blm2.bolum_id)
{
<td>@blm2.bolum_adi</td>
}
}
@if(atm.gorev_durum==0)
{
kontrol=false;
}
else
{
kontrol=true;
}
<td ><input type="checkbox" @onchange="eventArgs => { GorevGuncelle(atm.atama_id, eventArgs.Value); }" checked="@kontrol"/></td>
</tr>
}
}
</tbody>
</table>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components;
using System.Diagnostics;
using System.Globalization;
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
using Microsoft.JSInterop;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Net.Http;
using System.Data.SqlClient;
using System.Data;
using static Todo.Pages.LoginCheck;
namespace Todo.Pages
{
public class Users3
{
public int user_id { get; set; }
public string isim { get; set; }
public string soyisim { get; set; }
public string email { get; set; }
public string sifre { get; set; }
public string kayit_tarihi { get; set; }
public int rol_id { get; set; }
public int bolum_id { get; set; }
public bool kisi_aktiflik { get; set; }
}
public class GorevAtama2
{
public int atama_id{get;set;}
public int user_id{get;set;}
public int gorev_id{get;set;}
public int bolum_id{get;set;}
public int gorev_durum{get;set;}
}
public class Gorevs3{
public int gorev_id{get;set;}
public int proje_id{get;set;}
public string gorev {get;set;}
public int bolum_id{get;set;}
public int gorev_durum{get;set;}
}
public class Bolums3{
public int bolum_id{get;set;}
public string bolum_adi {get;set;}
}
public class Projes4
{
public int proje_id {get;set;}
public string proje_adi {get;set;}
public string proje_baslangic {get;set;}
public string proje_bitis {get;set;}
public int bolum_id{get;set;}
public bool proje_durum{get;set;}
}
public class SirkettodoBase:ComponentBase
{
[Inject]
public NavigationManager NavigationManager { get; set; }
public List<Projes4> proje3=new List<Projes4>();
public List<Gorevs3> gorev3=new List<Gorevs3>();
public List<Bolums3> bolum3=new List<Bolums3>();
public List<GorevAtama2> atama2= new List<GorevAtama2>();
public List<Users3> user3=new List<Users3>();
protected override async Task OnInitializedAsync()
{
if(Loginclass.m1=="NULL" && Loginclass.m2=="NULL")
{
NavigationManager.NavigateTo("/");
}
else
{
proje3.Clear();
gorev3.Clear();
bolum3.Clear();
user3.Clear();
atama2.Clear();
proje3=Projegetir2();
gorev3=Gorevgetir2();
bolum3=BolumGetir2();
user3=Usergoster2();
atama2=Gorevatamagetir2();
}
}
public void GorevGuncelle(int GorevID, object checkedValue)
{
bool newIsDone=(bool)checkedValue?true:false;
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
Console.WriteLine(newIsDone);
SqlCommand komut=baglanti.CreateCommand();
foreach(var atama in atama2){
if(atama.atama_id == GorevID){
if(atama.gorev_durum==1)
{
atama.gorev_durum=0;
komut.CommandText = "update gorev_ata set gorev_durum=0 where atama_id="+GorevID+"";
}
else
{
atama.gorev_durum=1;
komut.CommandText = "update gorev_ata set gorev_durum=1 where atama_id="+GorevID+"";
}
Console.WriteLine(komut.CommandText);
baglanti.Open();
komut.ExecuteNonQuery();
baglanti.Close();
break;
}
}
}
public List<GorevAtama2> Gorevatamagetir2(){
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
string sql = "select *from gorev_ata";
SqlDataAdapter daps= new SqlDataAdapter (sql,baglanti);
DataSet dsps = new DataSet();
try
{
daps.Fill(dsps, "atama2");
for (int i = 0; i < dsps.Tables[0].Rows.Count; i++)
{
GorevAtama2 pm = new GorevAtama2();
pm.atama_id = Int32.Parse(dsps.Tables[0].Rows[i]["atama_id"].ToString());
pm.user_id = Int32.Parse(dsps.Tables[0].Rows[i]["user_id"].ToString());
pm.gorev_id = Int32.Parse(dsps.Tables[0].Rows[i]["gorev_id"].ToString());
pm.bolum_id = Int32.Parse(dsps.Tables[0].Rows[i]["bolum_id"].ToString());
pm.gorev_durum = Int32.Parse(dsps.Tables[0].Rows[i]["gorev_durum"].ToString());
atama2.Add(pm);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return atama2;
}
public List<Users3> Usergoster2(){
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
string sql = "select *from users";
SqlDataAdapter daps= new SqlDataAdapter (sql,baglanti);
DataSet dsps = new DataSet();
try
{
daps.Fill(dsps, "user3");
for (int i = 0; i < dsps.Tables[0].Rows.Count; i++)
{
Users3 pm = new Users3();
pm.user_id = Int32.Parse(dsps.Tables[0].Rows[i]["user_id"].ToString());
pm.isim = dsps.Tables[0].Rows[i]["isim"].ToString();
pm.soyisim = dsps.Tables[0].Rows[i]["soyisim"].ToString();
pm.email = dsps.Tables[0].Rows[i]["email"].ToString();
pm.rol_id = Int32.Parse(dsps.Tables[0].Rows[i]["rol_id"].ToString());
pm.bolum_id = Int32.Parse(dsps.Tables[0].Rows[i]["bolum_id"].ToString());
user3.Add(pm);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return user3;
}
public List<Gorevs3> Gorevgetir2(){
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
string sql = "select *from Gorev";
SqlDataAdapter daps= new SqlDataAdapter (sql,baglanti);
DataSet dsps = new DataSet();
try
{
daps.Fill(dsps, "gorev3");
for (int i = 0; i < dsps.Tables[0].Rows.Count; i++)
{
Gorevs3 pm = new Gorevs3();
pm.gorev_id = Int32.Parse(dsps.Tables[0].Rows[i]["gorev_id"].ToString());
pm.proje_id = Int32.Parse(dsps.Tables[0].Rows[i]["proje_id"].ToString());
pm.gorev = dsps.Tables[0].Rows[i]["gorev"].ToString();
pm.bolum_id = Int32.Parse(dsps.Tables[0].Rows[i]["bolum_id"].ToString());
pm.gorev_durum = Int32.Parse(dsps.Tables[0].Rows[i]["gorev_durum"].ToString());
gorev3.Add(pm);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return gorev3;
}
public List<Bolums3> BolumGetir2(){
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
string sql = "select *from Bolum";
SqlDataAdapter daps= new SqlDataAdapter (sql,baglanti);
DataSet dsps = new DataSet();
try
{
daps.Fill(dsps, "bolum3");
for (int i = 0; i < dsps.Tables[0].Rows.Count; i++)
{
Bolums3 pm = new Bolums3();
pm.bolum_id = Int32.Parse(dsps.Tables[0].Rows[i]["bolum_id"].ToString());
pm.bolum_adi = dsps.Tables[0].Rows[i]["bolum_adi"].ToString();
bolum3.Add(pm);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return bolum3;
}
public List<Projes4> Projegetir2(){
string db = @"workstation id=blazortodos.mssql.somee.com;packet size=4096;user id=latral4_SQLLogin_1;pwd=516swqticy;data source=blazortodos.mssql.somee.com;persist security info=False;initial catalog=blazortodos";
SqlConnection baglanti = new SqlConnection(db);
string sql = "select *from Proje";
SqlDataAdapter daps= new SqlDataAdapter (sql,baglanti);
DataSet dsps = new DataSet();
try
{
daps.Fill(dsps, "proje3");
for (int i = 0; i < dsps.Tables[0].Rows.Count; i++)
{
Projes4 pm = new Projes4();
pm.proje_id = Int32.Parse(dsps.Tables[0].Rows[i]["proje_id"].ToString());
pm.proje_adi = dsps.Tables[0].Rows[i]["proje_adi"].ToString();
pm.proje_baslangic = dsps.Tables[0].Rows[i]["proje_baslangic"].ToString();
pm.proje_bitis = dsps.Tables[0].Rows[i]["proje_bitis"].ToString();
pm.bolum_id = Int32.Parse(dsps.Tables[0].Rows[i]["bolum_id"].ToString());
proje3.Add(pm);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return proje3;
}
}
}
@page "/"
@namespace Todo.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = "_Layout";
}
<title>Blazoruygulama</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<component type="typeof(App)" render-mode="ServerPrerendered" />
<script src="~/js/Admin.js"></script>
@using Microsoft.AspNetCore.Components.Web
@namespace Todo.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="css/site.css" rel="stylesheet" />
<link href="Todo.styles.css" rel="stylesheet" />
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>
<body>
@RenderBody()
<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
</environment>
<environment include="Development">
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.server.js"></script>
</body>
</html>
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Todo.Data;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<WeatherForecastService>();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// 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.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
app.Run();
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:49347",
"sslPort": 44378
}
},
"profiles": {
"Todo": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7207;http://localhost:5298",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
@inherits LayoutComponentBase
@using static Todo.Pages.LoginCheck
<PageTitle>Admin</PageTitle>
<div class="page">
@if(Loginclass.m1 != "NULL"){
<div class="sidebar" >
<NavMenu />
</div>
}
<main>
<article class="content px-4">
@Body
</article>
</main>
</div>
.page {
position: relative;
display: flex;
flex-direction: column;
}
main {
flex: 1;
}
.sidebar {
background: linear-gradient(250deg, rgb(0, 12, 125) 20%, #aeb249 100%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
}
.top-row a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
}
.top-row.auth {
justify-content: space-between;
}
.top-row a, .top-row .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
@using static Todo.Pages.LoginCheck
<div class="top-row ps-3 navbar navbar-dark">
@if(Loginclass.rol_id_tut=="0"){
<div class="container-fluid">
<a class="navbar-brand">Admin</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
}
@if(Loginclass.rol_id_tut=="1"){
<div class="container-fluid">
<a class="navbar-brand">Baskan</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
}
@if(Loginclass.rol_id_tut=="2"){
<div class="container-fluid">
<a class="navbar-brand">Genel</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
}
</div>
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<nav class="flex-column">
@if(Loginclass.rol_id_tut=="0"){
<div class="nav-item px-3">
<NavLink class="nav-link" href="Admin" Match="NavLinkMatch.All">
<span class="oi oi-plus" aria-hidden="true"></span> Admin İşlemleri
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="bolum" style="font-size:13px">
<span class="oi oi-plus" aria-hidden="true"></span> Bölüm Ekle Guncelle
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="/" Match="NavLinkMatch.All">
<span class="oi oi-account-logout" aria-hidden="true"></span> Çıkış
</NavLink>
</div>
}
@if(Loginclass.rol_id_tut=="1"){
<div class="nav-item px-3">
<NavLink class="nav-link" href="projeekle" Match="NavLinkMatch.All">
<span class="oi oi-plus" aria-hidden="true"></span> Proje Ekle
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="gorevekleata" Match="NavLinkMatch.All">
<span class="oi oi-plus" aria-hidden="true"></span> Gorev Ekle Ata
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="gorevguncelle" Match="NavLinkMatch.All">
<span class="oi oi-plus" aria-hidden="true"></span> Gorev Guncelle
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="/" Match="NavLinkMatch.All">
<span class="oi oi-account-logout" aria-hidden="true"></span> Çıkış
</NavLink>
</div>
}
@if(Loginclass.rol_id_tut=="2"){
<div class="nav-item px-3">
<NavLink class="nav-link" href="todo" Match="NavLinkMatch.All">
<span class="oi oi-plus" aria-hidden="true"></span> Gorevlerim
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="/" Match="NavLinkMatch.All">
<span class="oi oi-account-logout" aria-hidden="true"></span> Çıkış
</NavLink>
</div>
}
</nav>
</div>
@code {
private bool collapseNavMenu = true;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}
.navbar-toggler {
background-color: rgba(255, 255, 255, 0.1);
}
.top-row {
height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}
.navbar-brand {
font-size: 1.1rem;
}
.oi {
width: 2rem;
font-size: 1.1rem;
vertical-align: text-top;
top: -2px;
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}
.nav-item:first-of-type {
padding-top: 1rem;
}
.nav-item:last-of-type {
padding-bottom: 1rem;
}
.nav-item ::deep a {
color: #d7d7d7;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
}
.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.25);
color: white;
}
.nav-item ::deep a:hover {
background-color: rgba(255,255,255,0.1);
color: white;
}
@media (min-width: 641px) {
.navbar-toggler {
display: none;
}
.collapse {
/* Never collapse the sidebar for wide screens */
display: block;
}
}
<div class="alert alert-secondary mt-4">
<span class="oi oi-pencil me-2" aria-hidden="true"></span>
<strong>@Title</strong>
<span class="text-nowrap">
Please take our
<a target="_blank" class="font-weight-bold link-dark" href="https://go.microsoft.com/fwlink/?linkid=2149017">brief survey</a>
</span>
and tell us what you think.
</div>
@code {
// Demonstrates how a parent component can supply parameters
[Parameter]
public string? Title { get; set; }
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
</ItemGroup>
</Project>
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Todo
@using Todo.Shared
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
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