diff --git a/.swp b/.swp
deleted file mode 100644
index 3131ad0..0000000
Binary files a/.swp and /dev/null differ
diff --git a/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/DesignTimeBuild/.dtbcache b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/DesignTimeBuild/.dtbcache
new file mode 100644
index 0000000..13b0aab
Binary files /dev/null and b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/DesignTimeBuild/.dtbcache differ
diff --git a/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/.suo b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/.suo
new file mode 100644
index 0000000..6a6577d
Binary files /dev/null and b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/.suo differ
diff --git a/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/db.lock b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/db.lock
new file mode 100644
index 0000000..e69de29
diff --git a/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide
new file mode 100644
index 0000000..56758a8
Binary files /dev/null and b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide differ
diff --git a/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide-shm b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide-shm
new file mode 100644
index 0000000..f36cf14
Binary files /dev/null and b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide-shm differ
diff --git a/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide-wal b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide-wal
new file mode 100644
index 0000000..f39af3e
Binary files /dev/null and b/Anchal_Hora/CRUD_Operation/.vs/ConsoleApp1/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/Anchal_Hora/Readme.md b/Anchal_Hora/Readme.md
deleted file mode 100644
index 89d131f..0000000
--- a/Anchal_Hora/Readme.md
+++ /dev/null
@@ -1 +0,0 @@
-# Anchal Hora
\ No newline at end of file
diff --git a/Anchal_Hora/panel/.vs/WebApplicationPanel/DesignTimeBuild/.dtbcache b/Anchal_Hora/panel/.vs/WebApplicationPanel/DesignTimeBuild/.dtbcache
new file mode 100644
index 0000000..df152d3
Binary files /dev/null and b/Anchal_Hora/panel/.vs/WebApplicationPanel/DesignTimeBuild/.dtbcache differ
diff --git a/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/.suo b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/.suo
new file mode 100644
index 0000000..ffd4c35
Binary files /dev/null and b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/.suo differ
diff --git a/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/db.lock b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/db.lock
new file mode 100644
index 0000000..e69de29
diff --git a/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide
new file mode 100644
index 0000000..5b62b78
Binary files /dev/null and b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide differ
diff --git a/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide-shm b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide-shm
new file mode 100644
index 0000000..80e1dbe
Binary files /dev/null and b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide-shm differ
diff --git a/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide-wal b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide-wal
new file mode 100644
index 0000000..92fe5be
Binary files /dev/null and b/Anchal_Hora/panel/.vs/WebApplicationPanel/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/Anchal_Hora/panel/.vs/config/applicationhost.config b/Anchal_Hora/panel/.vs/config/applicationhost.config
new file mode 100644
index 0000000..51ca4c8
--- /dev/null
+++ b/Anchal_Hora/panel/.vs/config/applicationhost.config
@@ -0,0 +1,983 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Anchal_Hora/panel/Database/SQLQuery14.sql b/Anchal_Hora/panel/Database/SQLQuery14.sql
new file mode 100644
index 0000000..204f6fe
--- /dev/null
+++ b/Anchal_Hora/panel/Database/SQLQuery14.sql
@@ -0,0 +1,11 @@
+CREATE TABLE EmpInformation(SNo int primary key, Projectid VARCHAR(200) , name VARCHAR(500) ,email VARCHAR(200) UNIQUE , [PASSWORD] VARCHAR(200) , [ROLE] VARCHAR(500), ContactNo bigint, ProjectName VARCHAR(200) );
+
+INSERT INTO EmpInformation VALUES ('1', 'P1', 'Anchal','horaanchal@gmail.com', 'anchal', 'User1', '6656676878', 'Web development');
+INSERT INTO EmpInformation VALUES ('2', 'P1', 'Anjali','horaanjali@gmail.com', 'anjali', 'User2', '7867665676', 'Web development');
+INSERT INTO EmpInformation VALUES ('3', 'P2', 'Ankush','horaankush@gmail.com', 'ankush', 'User3', '6656566766', 'AI');
+INSERT INTO EmpInformation VALUES ('4', 'P2', 'Resham','horaresham@gmail.com', 'resham', 'User4', '8990876774','AI');
+INSERT INTO EmpInformation VALUES ('5', 'P1', 'Ansh','horaansh@gmail.com', 'ansh', 'Reporting Manager1', '7545347667', 'Web development');
+INSERT INTO EmpInformation VALUES ('6', 'P2', 'Aditya','horaaditya@gmail.com', 'aditya', 'Reporting Manager2', '6378656789', 'AI');
+INSERT INTO EmpInformation VALUES ('7','', 'Raghav','horaraghavl@gmail.com', 'raghav', 'Admin', '5653424789','');
+
+SELECT * from EmpInformation ;
diff --git a/Anchal_Hora/panel/Login.js b/Anchal_Hora/panel/Login.js
new file mode 100644
index 0000000..29074ad
--- /dev/null
+++ b/Anchal_Hora/panel/Login.js
@@ -0,0 +1,62 @@
+function login(){
+ document.getElementById("btn").addEventListener("click",postData)
+ function postData(){
+ var Sno=parseInt(document.getElementById("inputid").value);
+ var Username=document.getElementById("inputName").value;
+ var Email=document.getElementById("inputEmail").value;
+ var Password=document.getElementById("inputPassword").value;
+
+console.log(empLogin);
+api(empLogin);
+
+window.location.href = "./admin/index.html";
+
+};
+ var empLogin = {
+ "Sno":Sno,
+ "Name":Username,
+ "Email":Email,
+ "Password":Password
+ };
+
+ function parseJwt (token) {
+ var base64Url = token.split('.')[1];
+ var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
+ var jsonPayload = decodeURIComponent(atob(base64).split('').map(function(c) {
+ return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
+ }).join(''));
+
+ console.log(jsonPayload);
+ printToken(jsonPayload);
+ debugger;
+ return JSON.parse(jsonPayload);
+
+ }
+
+ function api(empLogin){
+ let json = empLogin;
+ //sendHTTPReq('POST', "http://localhost:51391/api/Panel", json).then(x => func() );
+ var xhr= new XMLHttpRequest();
+ var url="http://localhost:51391/api/Login";
+ xhr.open('POST', url,true);
+ xhr.responseType='json';
+ xhr.setRequestHeader('Content-type','application/json');
+ console.log(JSON.stringify(json));
+ xhr.onload = () => {
+ console.log(xhr.response);
+ let jwtToken = {} ;
+ jwtToken = xhr.response;
+ parseJwt(jwtToken);
+ debugger;
+ };
+ xhr.onerror = (err) =>{
+ console.log(err);
+ };
+ xhr.send(JSON.stringify(json));
+}
+ //debugger;
+
+}
+function printToken(jsonPayload){
+ console.log(jsonPayload);
+}
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel.sln b/Anchal_Hora/panel/WebApplicationPanel.sln
new file mode 100644
index 0000000..0f6340b
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.1000
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplicationPanel", "WebApplicationPanel\WebApplicationPanel.csproj", "{EC1659EB-707D-416C-8BD0-AD72DD2CCE40}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EC1659EB-707D-416C-8BD0-AD72DD2CCE40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EC1659EB-707D-416C-8BD0-AD72DD2CCE40}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EC1659EB-707D-416C-8BD0-AD72DD2CCE40}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EC1659EB-707D-416C-8BD0-AD72DD2CCE40}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {6291CE64-2D3B-4B27-BB96-989FDEF68E3B}
+ EndGlobalSection
+EndGlobal
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Controllers/LoginController.cs b/Anchal_Hora/panel/WebApplicationPanel/Controllers/LoginController.cs
new file mode 100644
index 0000000..f6faaff
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Controllers/LoginController.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.IdentityModel.Tokens.Jwt;
+using System.Linq;
+using System.Security.Claims;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+using Microsoft.IdentityModel.Tokens;
+using WebApplicationPanel.DbModels;
+
+// For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
+
+namespace WebappAPItype.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+
+ public class LoginController : Controller
+ {
+ private panelContext _panelcontext;
+ private IConfiguration _config;
+ private panelContext _panelContext;
+
+ public LoginController(IConfiguration config, panelContext panelcontext)
+
+ {
+ _panelcontext = panelcontext;
+ _config = config;
+ }
+
+ [HttpPost]
+ public IActionResult Login([FromBody] EmpInformation login)
+ {
+ IActionResult response = Unauthorized();
+ var user = AuthenticateUser(login);
+
+ if (user != null)
+ {
+ var tokenString = GenerateJSONWebToken(user);
+ response = Ok(new { token = tokenString });
+ }
+
+ return response;
+ }
+
+ private object GenerateJSONWebToken(object user)
+ {
+ throw new NotImplementedException();
+ }
+
+ private string GenerateJSONWebToken(EmpInformation userInfo)
+ {
+ var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_config["Jwt:Key"]));
+ var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);
+ var claims = new[] {
+ new Claim("Name", userInfo.Name),
+ new Claim("Email", userInfo.Email),
+ new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString())
+ };
+
+
+ var token = new JwtSecurityToken(_config["Jwt:Issuer"],
+ _config["Jwt:Issuer"],
+ claims,
+ expires: DateTime.Now.AddMinutes(120),
+ signingCredentials: credentials);
+
+ return new JwtSecurityTokenHandler().WriteToken(token);
+ }
+
+ private EmpInformation AuthenticateUser(EmpInformation login)
+ {
+ EmpInformation user = _panelcontext.EmpInformation.Where(u => u.Sno == login.Sno && u.Password == login.Password).FirstOrDefault();
+ if (user != null)
+ {
+ user = new EmpInformation { Email = user.Email, Name=user.Name };
+ }
+ return user;
+ }
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Controllers/Panel.cs b/Anchal_Hora/panel/WebApplicationPanel/Controllers/Panel.cs
new file mode 100644
index 0000000..ce96ef7
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Controllers/Panel.cs
@@ -0,0 +1,10 @@
+namespace WebApplicationPanel.Controllers
+{
+ internal class Panel
+ {
+ public int Sno { get; internal set; }
+ public int Username { get; internal set; }
+ public string Emailid { get; internal set; }
+ public string Password { get; internal set; }
+ }
+}
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Controllers/PanelController.cs b/Anchal_Hora/panel/WebApplicationPanel/Controllers/PanelController.cs
new file mode 100644
index 0000000..1456693
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Controllers/PanelController.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Http;
+using System.Configuration;
+using Microsoft.AspNetCore.Mvc;
+using WebApplicationPanel.DbModels;
+using WebappAPItype.CustomModels;
+using Microsoft.Extensions.Configuration;
+
+namespace WebApplicationPanel.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+
+
+ public class PanelController : ControllerBase
+ {
+ panelContext _panelContext;
+
+ public PanelController(panelContext panelContext)
+ {
+ _panelContext = panelContext;
+ }
+ [HttpPost]
+ public IActionResult Createpanel([FromBody]PanelRequest panelRequest)
+ {
+ EmpInformation panel = new EmpInformation();
+ panel.Sno = panelRequest.Sno;
+ panel.Name = panelRequest.Name;
+ panel.Email = panelRequest.Email;
+ panel.Password = panelRequest.Password;
+
+ _panelContext.EmpInformation.Add(panel);
+ _panelContext.SaveChanges();
+ return Ok("Employee Added");
+
+ }
+
+ [HttpGet]
+ public IActionResult Get()
+ {
+ List output = _panelContext.EmpInformation.ToList();
+ return Ok(output);
+ }
+ [HttpGet("{id}")]
+
+ public ActionResult Get(int id)
+ {
+ EmpInformation output = _panelContext.EmpInformation.Find(id);
+ if (output == null)
+ {
+ return NotFound();
+ }
+ return Ok(output);
+ }
+
+
+ [HttpPut("{id}")]
+
+ public IActionResult Put(int id, [FromBody]PanelRequest panelRequest)
+ {
+ EmpInformation panel = _panelContext.EmpInformation.Find(id);
+ panel.Email = panelRequest.Email;
+ panel.Name = panelRequest.Name;
+ panel.Password = panelRequest.Password;
+ // _panelContext.EmpInformation.Update(panel);
+ _panelContext.SaveChanges();
+ return Ok("Employee updated");
+
+ }
+
+ [HttpDelete("{id}")]
+
+ public ActionResult Delete(int id)
+ {
+ EmpInformation output = _panelContext.EmpInformation.Where(x => x.Sno == id).FirstOrDefault();
+ if (output == null)
+ {
+ return NotFound();
+ }
+ //EmpInformation e = new EmpInformation { Sno = id };
+
+ _panelContext.EmpInformation.Remove(output);
+ _panelContext.SaveChanges();
+ return Ok("Employee Deleted");
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Controllers/deleteController.cs b/Anchal_Hora/panel/WebApplicationPanel/Controllers/deleteController.cs
new file mode 100644
index 0000000..241721b
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Controllers/deleteController.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using WebApplicationPanel.CustomModels;
+using WebApplicationPanel.DbModels;
+
+namespace WebApplicationPanel.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class deleteController : Controller
+ {
+ panelContext _panelContext;
+
+ //private object panelContext;
+ //private object panel;
+
+ public deleteController(panelContext panelContext)
+ {
+ _panelContext = panelContext;
+ }
+ [HttpDelete("{id}")]
+
+ public ActionResult Delete(int id)
+ {
+ EmpInformation output = _panelContext.EmpInformation.Where(x => x.Sno == id).FirstOrDefault();
+ if (output == null)
+ {
+ return NotFound();
+ }
+ //EmpInformation e = new EmpInformation { Sno = id };
+
+ _panelContext.EmpInformation.Remove(output);
+ _panelContext.SaveChanges();
+ return Ok("Employee Deleted");
+ }
+ }
+}
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Controllers/getController.cs b/Anchal_Hora/panel/WebApplicationPanel/Controllers/getController.cs
new file mode 100644
index 0000000..bb0cb95
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Controllers/getController.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using WebApplicationPanel.DbModels;
+
+namespace WebApplicationPanel.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class getController : Controller
+ {
+ panelContext _panelContext;
+
+ //private object panelContext;
+ //private object panel;
+
+ public getController(panelContext panelContext)
+ {
+ _panelContext = panelContext;
+ }
+ [HttpGet]
+ public IActionResult Get()
+ {
+ List output = _panelContext.EmpInformation.ToList();
+ return Ok(output);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Controllers/postController.cs b/Anchal_Hora/panel/WebApplicationPanel/Controllers/postController.cs
new file mode 100644
index 0000000..c5af2fa
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Controllers/postController.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using WebApplicationPanel.CustomModels;
+using WebApplicationPanel.DbModels;
+
+namespace WebApplicationPanel.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class postController : Controller
+ {
+ panelContext _panelContext;
+
+ //private object panelContext;
+ //private object panel;
+
+ public postController(panelContext panelContext)
+ {
+ _panelContext = panelContext;
+ }
+ [HttpPost]
+ public IActionResult Addpanel([FromBody]PostRequest postRequest)
+ {
+ EmpInformation panel = new EmpInformation();
+ panel.Sno = postRequest.Sno;
+ panel.Name = postRequest.Name;
+ panel.Email = postRequest.Email;
+ panel.Password = postRequest.Password;
+ _panelContext.EmpInformation.Add(panel);
+ _panelContext.SaveChanges();
+ return Ok("Employee Added");
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Controllers/updateController.cs b/Anchal_Hora/panel/WebApplicationPanel/Controllers/updateController.cs
new file mode 100644
index 0000000..fbb98f6
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Controllers/updateController.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using WebappAPItype.CustomModels;
+using WebApplicationPanel.CustomModels;
+using WebApplicationPanel.DbModels;
+
+namespace WebApplicationPanel.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class updateController : Controller
+ {
+ panelContext _panelContext;
+
+ //private object panelContext;
+ //private object panel;
+
+ public updateController(panelContext panelContext)
+ {
+ _panelContext = panelContext;
+ }
+ [HttpPut("{id}")]
+
+ public IActionResult Put(int id, [FromBody]UpdateRequest updateRequest)
+ {
+ EmpInformation panel = _panelContext.EmpInformation.Find(id);
+ panel.Sno = updateRequest.Sno;
+ panel.Name = updateRequest.Name;
+ panel.Email = updateRequest.Email;
+ panel.Password = updateRequest.Password;
+ _panelContext.EmpInformation.Update(panel);
+ _panelContext.SaveChanges();
+ return Ok("Employee updated");
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/CustomModels/PanelRequest.cs b/Anchal_Hora/panel/WebApplicationPanel/CustomModels/PanelRequest.cs
new file mode 100644
index 0000000..cfc6e0d
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/CustomModels/PanelRequest.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace WebappAPItype.CustomModels
+{
+ public class PanelRequest
+ {
+ public int Sno { get; set; }
+ public string Projectid { get; set; }
+ public string Name { get; set; }
+ public string Email { get; set; }
+ public string Password { get; set; }
+ public string Role { get; set; }
+ public long? ContactNo { get; set; }
+ public string ProjectName { get; set; }
+
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/CustomModels/postRequest.cs b/Anchal_Hora/panel/WebApplicationPanel/CustomModels/postRequest.cs
new file mode 100644
index 0000000..1e24a13
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/CustomModels/postRequest.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace WebApplicationPanel.CustomModels
+{
+ public class PostRequest
+ {
+ public int Sno { get; set; }
+ public string Name { get; set; }
+ public string Email { get; set; }
+ public string Password { get; set; }
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/CustomModels/updateRequest.cs b/Anchal_Hora/panel/WebApplicationPanel/CustomModels/updateRequest.cs
new file mode 100644
index 0000000..1aeb395
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/CustomModels/updateRequest.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace WebappAPItype.CustomModels
+{
+ public class UpdateRequest
+ {
+ public int Sno { get; set; }
+ public string Name { get; set; }
+ public string Email { get; set; }
+ public string Password { get; set; }
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/DbModels/EmpInformation.cs b/Anchal_Hora/panel/WebApplicationPanel/DbModels/EmpInformation.cs
new file mode 100644
index 0000000..f87d085
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/DbModels/EmpInformation.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace WebApplicationPanel.DbModels
+{
+ public partial class EmpInformation
+ {
+ public int Sno { get; set; }
+ public string Projectid { get; set; }
+ public string Name { get; set; }
+ public string Email { get; set; }
+ public string Password { get; set; }
+ public string Role { get; set; }
+ public long? ContactNo { get; set; }
+ public string ProjectName { get; set; }
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/DbModels/panelContext.cs b/Anchal_Hora/panel/WebApplicationPanel/DbModels/panelContext.cs
new file mode 100644
index 0000000..79de404
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/DbModels/panelContext.cs
@@ -0,0 +1,69 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata;
+
+namespace WebApplicationPanel.DbModels
+{
+ public partial class panelContext : DbContext
+ {
+ //public panelContext()
+ //{
+ //}
+
+ public panelContext(DbContextOptions options)
+ : base(options)
+ {
+ }
+
+ public virtual DbSet EmpInformation { get; set; }
+ public object Panel { get; internal set; }
+
+ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+ {
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.Sno);
+
+ entity.HasIndex(e => e.Email)
+ .HasName("UQ__EmpInfor__AB6E61641E5DAFB2")
+ .IsUnique();
+
+ entity.Property(e => e.Sno)
+ .HasColumnName("SNo")
+ .ValueGeneratedNever();
+
+ entity.Property(e => e.Email)
+ .HasColumnName("email")
+ .HasMaxLength(200)
+ .IsUnicode(false);
+
+ entity.Property(e => e.Name)
+ .HasColumnName("name")
+ .HasMaxLength(500)
+ .IsUnicode(false);
+
+ entity.Property(e => e.Password)
+ .HasColumnName("PASSWORD")
+ .HasMaxLength(200)
+ .IsUnicode(false);
+
+ entity.Property(e => e.ProjectName)
+ .HasMaxLength(200)
+ .IsUnicode(false);
+
+ entity.Property(e => e.Projectid)
+ .HasMaxLength(200)
+ .IsUnicode(false);
+
+ entity.Property(e => e.Role)
+ .HasColumnName("ROLE")
+ .HasMaxLength(500)
+ .IsUnicode(false);
+ });
+ }
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Program.cs b/Anchal_Hora/panel/WebApplicationPanel/Program.cs
new file mode 100644
index 0000000..af91566
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Program.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Logging;
+
+namespace WebApplicationPanel
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ CreateWebHostBuilder(args).Build().Run();
+ }
+
+ public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
+ WebHost.CreateDefaultBuilder(args)
+ .UseStartup();
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Properties/launchSettings.json b/Anchal_Hora/panel/WebApplicationPanel/Properties/launchSettings.json
new file mode 100644
index 0000000..933b95e
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Properties/launchSettings.json
@@ -0,0 +1,30 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:51391",
+ "sslPort": 0
+ }
+ },
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "api/values",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "WebApplicationPanel": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "launchUrl": "api/values",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "https://localhost:5001;http://localhost:5000"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/Startup.cs b/Anchal_Hora/panel/WebApplicationPanel/Startup.cs
new file mode 100644
index 0000000..13a8fb4
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/Startup.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Authentication.JwtBearer;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.HttpsPolicy;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using Microsoft.IdentityModel.Tokens;
+
+namespace WebappAPItype
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
+ .AddJwtBearer(options =>
+ {
+ options.TokenValidationParameters = new TokenValidationParameters
+ {
+ ValidateIssuer = true,
+ ValidateAudience = true,
+ ValidateLifetime = true,
+ ValidateIssuerSigningKey = true,
+ ValidIssuer = Configuration["Jwt:Issuer"],
+ ValidAudience = Configuration["Jwt:Issuer"],
+ IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(Configuration["Jwt:Key"]))
+ };
+ });
+ services.AddMvc();
+ services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
+ services.AddDbContext(o => o.UseSqlServer(Configuration["ConnectionString"]));
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
+ {
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+ else
+ {
+ app.UseHsts();
+ }
+
+ app.UseCors(builder =>
+ builder.AllowAnyHeader()
+ .AllowAnyMethod()
+ .AllowAnyOrigin());
+ app.UseAuthentication();
+ app.UseHttpsRedirection();
+ app.UseMvc();
+ app.UseCookiePolicy();
+
+ }
+ }
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/WebApplicationPanel.csproj b/Anchal_Hora/panel/WebApplicationPanel/WebApplicationPanel.csproj
new file mode 100644
index 0000000..1700837
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/WebApplicationPanel.csproj
@@ -0,0 +1,18 @@
+
+
+
+ netcoreapp2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Anchal_Hora/panel/WebApplicationPanel/WebApplicationPanel.csproj.user b/Anchal_Hora/panel/WebApplicationPanel/WebApplicationPanel.csproj.user
new file mode 100644
index 0000000..4a4f2e9
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/WebApplicationPanel.csproj.user
@@ -0,0 +1,13 @@
+
+
+
+ MvcControllerEmptyScaffolder
+ root/Controller
+ 600
+ True
+ False
+ True
+
+ False
+
+
\ No newline at end of file
diff --git a/Anchal_Hora/panel/WebApplicationPanel/appsettings.Development.json b/Anchal_Hora/panel/WebApplicationPanel/appsettings.Development.json
new file mode 100644
index 0000000..3760cf0
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/appsettings.Development.json
@@ -0,0 +1,10 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Debug",
+ "System": "Information",
+ "Microsoft": "Information"
+ }
+ },
+ "ConnectionString": "server=CYG366\\SQLEXPRESS; database=panel; Trusted_Connection=True;"
+}
diff --git a/Anchal_Hora/panel/WebApplicationPanel/appsettings.json b/Anchal_Hora/panel/WebApplicationPanel/appsettings.json
new file mode 100644
index 0000000..70a4cd3
--- /dev/null
+++ b/Anchal_Hora/panel/WebApplicationPanel/appsettings.json
@@ -0,0 +1,7 @@
+{
+ "Jwt": {
+ "Key": "ThisismySecretKey",
+ "Issuer": "Test.com"
+ },
+ "ConnectionString": "server=CYG366\\SQLEXPRESS; database=panel; Trusted_Connection=True;"
+}
diff --git a/Anchal_Hora/panel/admin/create.html b/Anchal_Hora/panel/admin/create.html
new file mode 100644
index 0000000..744dc08
--- /dev/null
+++ b/Anchal_Hora/panel/admin/create.html
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+ Manage admin
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Anchal_Hora/panel/admin/delete.html b/Anchal_Hora/panel/admin/delete.html
new file mode 100644
index 0000000..b0c73b9
--- /dev/null
+++ b/Anchal_Hora/panel/admin/delete.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+ Manage user
+
+
+
+
+
+
+
+