Skip to content

Commit

Permalink
Some change for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Qutubhaider committed May 7, 2022
1 parent bfe1255 commit b2cf6a0
Show file tree
Hide file tree
Showing 231 changed files with 35,392 additions and 7 deletions.
65 changes: 65 additions & 0 deletions DigiteonDatabase/DigiteonDatabase.sqlproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Name>DigiteonDatabase</Name>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>4.1</ProjectVersion>
<ProjectGuid>{13a63178-8108-4caf-8e18-125b33658bb1}</ProjectGuid>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider</DSP>
<OutputType>Database</OutputType>
<RootPath>
</RootPath>
<RootNamespace>DigiteonDatabase</RootNamespace>
<AssemblyName>DigiteonDatabase</AssemblyName>
<ModelCollation>1033, CI</ModelCollation>
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
<DeployToDatabase>True</DeployToDatabase>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetLanguage>CS</TargetLanguage>
<AppDesignerFolder>Properties</AppDesignerFolder>
<SqlServerVerification>False</SqlServerVerification>
<IncludeCompositeObjects>True</IncludeCompositeObjects>
<TargetDatabaseSet>True</TargetDatabaseSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
</PropertyGroup>
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
<ItemGroup>
<Folder Include="Properties" />
<Folder Include="dbo" />
<Folder Include="dbo\Stored Procedures" />
</ItemGroup>
<ItemGroup>
<Build Include="dbo\Stored Procedures\getUserByEmail.sql" />
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions DigiteonDatabase/dbo/Stored Procedures/getUserByEmail.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

CREATE PROCEDURE getUserByEmail(
@stUserEmail NVARCHAR(200)
)
AS
BEGIN
SELECT U.inUserId,U.unUserId,U.inStatus,U.inRole,U.stEmail,U.stMobile,U.stPassword,U.stUsername
FROM tblUser U
WHERE U.stEmail=@stUserEmail
END
14 changes: 11 additions & 3 deletions DigiteonWeb.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
# Visual Studio Version 16
VisualStudioVersion = 16.0.31321.278
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigiteonWeb", "DigiteonWeb\DigiteonWeb.csproj", "{4E474439-C8B0-4FFA-B1A3-F80BCF1E71D1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DigiteonWeb", "DigiteonWeb\DigiteonWeb.csproj", "{4E474439-C8B0-4FFA-B1A3-F80BCF1E71D1}"
EndProject
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "DigiteonDatabase", "DigiteonDatabase\DigiteonDatabase.sqlproj", "{13A63178-8108-4CAF-8E18-125B33658BB1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -15,6 +17,12 @@ Global
{4E474439-C8B0-4FFA-B1A3-F80BCF1E71D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E474439-C8B0-4FFA-B1A3-F80BCF1E71D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E474439-C8B0-4FFA-B1A3-F80BCF1E71D1}.Release|Any CPU.Build.0 = Release|Any CPU
{13A63178-8108-4CAF-8E18-125B33658BB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13A63178-8108-4CAF-8E18-125B33658BB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13A63178-8108-4CAF-8E18-125B33658BB1}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{13A63178-8108-4CAF-8E18-125B33658BB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13A63178-8108-4CAF-8E18-125B33658BB1}.Release|Any CPU.Build.0 = Release|Any CPU
{13A63178-8108-4CAF-8E18-125B33658BB1}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
17 changes: 17 additions & 0 deletions DigiteonWeb/Areas/Admin/Controllers/DashboardController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace DigiteonWeb.Areas.Admin.Controllers
{
[Authorize(AuthenticationSchemes = CookieAuthenticationDefaults.AuthenticationScheme)]
[Area("Admin")]

public class DashboardController : Controller
{
public IActionResult Index()
{
return View("~/Areas/Admin/Views/Dashboard/Dashboard.cshtml");
}
}
}
21 changes: 21 additions & 0 deletions DigiteonWeb/Areas/Admin/Controllers/TrainingController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace DigiteonWeb.Areas.Admin.Controllers
{
[Authorize(AuthenticationSchemes = CookieAuthenticationDefaults.AuthenticationScheme)]
[Area("Admin")]
public class TrainingController : Controller
{
public IActionResult Index()
{
return View("~/Areas/Admin/Views/Training/Training.cshtml");
}

public IActionResult Detail()
{
return View("~/Areas/Admin/Views/Training/TrainingDeatils.cshtml");
}
}
}
27 changes: 27 additions & 0 deletions DigiteonWeb/Areas/Admin/Views/Dashboard/Dashboard.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@{
Layout = "_LayoutAdmin";
ViewBag.Title = "Dashboard";
}
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
<h4 class="mb-sm-0">Dashboard</h4>

<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item active">Dashboard</li>
</ol>
</div>

</div>
</div>
</div>
<!-- end page title -->


@section Scripts {
<!-- apexcharts js -->
<script src="~/assets/libs/apexcharts/apexcharts.min.js"></script>
<script src="~/assets/js/pages/dashboard.init.js"></script>
}
90 changes: 90 additions & 0 deletions DigiteonWeb/Areas/Admin/Views/Training/Training.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@{
Layout = "_LayoutAdmin";
ViewBag.Title = "Training";
var loTableHeaders = new[]
{
new {Id="1", Visible=true, Title="Start Date", Sort = true, dbColName = "dtStartDate", CssClass = "w40 text-center"},
new {Id="2", Visible=true, Title="End Date", Sort = true, dbColName = "dtEndDate", CssClass = "w40 text-center"},
new {Id="3", Visible=true, Title="Location", Sort = true, dbColName = "stLocation", CssClass = "w40 text-center"},
new {Id="4", Visible=true, Title="Language", Sort = true, dbColName = "stLanguage", CssClass = "w40 text-center"},
new {Id="5", Visible=true, Title="Course Name", Sort = true, dbColName = "stCourseName", CssClass = "w40 text-center"},
new {Id="", Visible=true, Title="Action", Sort = false, dbColName = "", CssClass = "w40 text-center"}
};
}
<!-- start page title -->
<div class="container-fluid">
<!-- start page title -->
<div class="row">
<div class="col-8">
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
<h4 class="mb-sm-0">Manage Training</h4>
</div>
</div>
<div class="col-4" style="float:right;">
<a class="btn btn-info" style="float: right;" asp-area="Admin" asp-controller="Training" asp-action="Detail">Add Training</a>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">

<div id="datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">

<div class="row"><div class="col-sm-12 col-md-6"><div class="dataTables_length" id="datatable_length"><label>Show <select name="datatable_length" aria-controls="datatable" class="custom-select custom-select-sm form-control form-control-sm form-select form-select-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> entries</label></div></div><div class="col-sm-12 col-md-6"><div id="datatable_filter" class="dataTables_filter"><label>Search:<input type="search" id="txtDepartmentName" class="form-control form-control-sm" placeholder="" aria-controls="datatable"></label></div></div></div><div class="row">

<div class="col-sm-12" id="DepartmentList">
<table id="datatable" class="table table-bordered dt-responsive nowrap dataTable no-footer dtr-inline" style="border-collapse: collapse; border-spacing: 0px; width: 100%;" role="grid" aria-describedby="datatable_info">
<thead>
<tr role="row">
@{
int lsSortIndex = 0;
string lsSortOrder = "";
@foreach (var loHeader in loTableHeaders.Where(x => x.Visible == true))
{
<th class="@loHeader.CssClass" id="@loHeader.Id">
@if (loHeader.Sort)
{
string lsSrtOrder = loHeader.Id.Equals(lsSortIndex) ? (lsSortOrder.Equals("asc") ? "desc" : "asc") : "asc";
string lsSortingClass = loHeader.Id.Equals(lsSortIndex) ? (lsSortOrder.Equals("asc") ? "sorting" : "sorting_desc") : "";
<a onclick="sort('@loHeader.Id',this);" href="Javascript:void(0);">@loHeader.Title</a>
}
else
@loHeader.Title

</th>
}
}
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="d-flex flex-column flex-md-row justify-content-center justify-content-md-between mx-0 pagination_wrap">
<div class="dataTables_paginate paging_full_numbers clearfix text-center">
<div class="pagination" id="paginationList">
</div>
</div>
</div>
</div>
</div>
</div>

</div>

</div>
</div>

<input id="hdnPageNoListPanel" type="hidden" value="1" />
@section Scripts {
<script src="~/Scripts/Common/Common.js" asp-append-version="true"></script>
<script type="text/javascript">
var msGetDepartmentDataList = '@Url.Action("GetDepartmentList")';
$(document).ready(function () {
getDepartmentData();
});
</script>
<script src="~/Scripts/Department/DepartmentList.js" asp-append-version="true"></script>
}
69 changes: 69 additions & 0 deletions DigiteonWeb/Areas/Admin/Views/Training/TrainingDeatils.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@model DigiteonWeb.Models.TrainingDetail
@{
Layout = "_LayoutAdmin";
ViewBag.Title = "Training";
}
<div class="container-fluid">
<!-- start page title -->
<div class="row">
<div class="col-8">
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
<h4 class="mb-sm-0">Add Training</h4>
</div>
</div>
<div class="col-4" style="float:right;">
<a class="btn btn-danger" style="float: right;" asp-area="Admin" asp-controller="Training" asp-action="Index">Back</a>
</div>
</div>

<div class="row">
<div class="col-xl-6">
<div class="card">
<div class="card-body">
<form asp-action="SaveTraining" asp-controller="Training" asp-area="Admin" class="custom-validation" novalidate="">
<div class="mb-3">
<label class="form-label">Start Date</label>
<input type="date" asp-for="dtStartDate" class="form-control" placeholder="Start Date">
<span class="text-danger" asp-validation-for="dtStartDate"></span>
</div>
<div class="mb-3">
<label class="form-label">Start End</label>
<input type="date" asp-for="dtEndDate" class="form-control" placeholder="Start End">
<span class="text-danger" asp-validation-for="dtEndDate"></span>
</div>
<div class="mb-3">
<label class="form-label">Location</label>
<input type="text" asp-for="stLocation" class="form-control" placeholder="Location">
<span class="text-danger" asp-validation-for="stLocation"></span>
</div>
<div class="mb-3">
<label class="form-label">Language</label>
<input type="text" asp-for="stLanguage" class="form-control" placeholder="Language">
<span class="text-danger" asp-validation-for="stLanguage"></span>
</div>
<div class="mb-3">
<label class="form-label">Course Name</label>
<input type="text" asp-for="stCourseName" class="form-control" placeholder="Course Name">
<span class="text-danger" asp-validation-for="stCourseName"></span>
</div>
<div>
<div>
<button type="submit" class="btn btn-primary waves-effect waves-light me-1">
Submit
</button>
<a class="btn btn-secondary waves-effect" asp-area="Admin" asp-controller="Department" asp-action="Index">
Cancel
</a>
</div>
</div>
<input type="hidden" asp-for="inTrainingId" />
<input type="hidden" asp-for="unTrainingId" />
</form>
</div>
</div>
</div>
</div>
</div>
@section Scripts {
<partial name="_ValidationScriptsPartial.cshtml" />
}
5 changes: 5 additions & 0 deletions DigiteonWeb/Areas/Admin/Views/Training/_TrainingList.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}
3 changes: 3 additions & 0 deletions DigiteonWeb/Areas/Admin/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@using DigiteonWeb
@using DigiteonWeb.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Loading

0 comments on commit b2cf6a0

Please sign in to comment.