diff --git a/AbhishekSharma Week3/Backend/MyFirst/mvnw b/AbhishekSharma Week3/Backend/MyFirst/mvnw new file mode 100644 index 0000000..5551fde --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/AbhishekSharma Week3/Backend/MyFirst/mvnw.cmd b/AbhishekSharma Week3/Backend/MyFirst/mvnw.cmd new file mode 100644 index 0000000..e5cfb0a --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/AbhishekSharma Week3/Backend/MyFirst/pom.xml b/AbhishekSharma Week3/Backend/MyFirst/pom.xml new file mode 100644 index 0000000..15bc4c2 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/pom.xml @@ -0,0 +1,89 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.0.9.BUILD-SNAPSHOT + + + com.example + MyFirst + 0.0.1-SNAPSHOT + MyFirst + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework + spring-web + + + org.springframework.boot + spring-boot-starter-web + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + src/main/resources + true + + + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/main/java/Repository/RepositoryImplementation.java b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/Repository/RepositoryImplementation.java new file mode 100644 index 0000000..c2d7428 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/Repository/RepositoryImplementation.java @@ -0,0 +1,62 @@ +package Repository; + +import java.sql.Statement; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class RepositoryImplementation { + + public static void main(String[] args) + { + Connection conn=null; + try { + String dbURL="jdbc:sqlserver://DESKTOP-95D75UP;databaseName=HRMS"; + String user="sa"; + conn=DriverManager.getConnection(dbURL,user,"Abhishek"); + if(conn!=null) + { + Statement stmt=conn.createStatement(); + + + + String query1="create table PersonsTest1(\r\n"+ + "PersonID int,\r\n" + + "LastName varchar(255),\r\n" + + "FirstName varchar(255),\r\n" + + "Address varchar(255),\r\n"+ + "City varchar(255),\r\n" + + ");"; + + + stmt.execute(query1); + String query2="Insert Into PersonsTest1 values('123','Sharma','Abhishek','ABC Colony','Delhi')"; + stmt.execute(query2); + String SQL="select * from PersonsTest1;"; + ResultSet rs=stmt.executeQuery(SQL); + while(rs.next()) + { + System.out.println(rs.getString("PersonID")+":"+ rs.getString("FirstName")+rs.getString("LastName")); + } + } + } + catch(Exception se) { + se.printStackTrace(); + } + finally { + if(conn!=null) { + + try { + conn.close(); + } + catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + } +} + diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/main/java/com/example/Myfirst/SpringBootRest2Application.java b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/com/example/Myfirst/SpringBootRest2Application.java new file mode 100644 index 0000000..cac6a27 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/com/example/Myfirst/SpringBootRest2Application.java @@ -0,0 +1,13 @@ +package com.example.Myfirst; + + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication(scanBasePackages = {"com.example.Myfirst"}) +public class SpringBootRest2Application { + public static void main(String[] args) { + SpringApplication.run(SpringBootRest2Application.class, args); + } +} + diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/EmployeeDetails.java b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/EmployeeDetails.java new file mode 100644 index 0000000..f994388 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/EmployeeDetails.java @@ -0,0 +1,81 @@ +package week3; + +public class EmployeeDetails { + + String EmployeeId; + String FirstName; + String LastName; + String DesignationId; + String EmailId; + String Contact; + String AddressLine1; + String AddressLine2; + String City; + String Country; + + + public String getEmployeeId() { + return EmployeeId; + } + public void setEmployeeId(String employeeId) { + EmployeeId = employeeId; + } + + public String getFirstName() { + return FirstName; + } + public void setFirstName(String firstName) { + FirstName = firstName; + } + public String getLastName() { + return LastName; + } + public void setLastName(String lastName) { + LastName = lastName; + } + public String getDesignationId() { + return DesignationId; + } + public void setDesignationId(String designationId) { + DesignationId = designationId; + } + public String getEmailId() { + return EmailId; + } + public void setEmailId(String emailId) { + EmailId = emailId; + } + public String getContact() { + return Contact; + } + public void setContact(String contact) { + Contact = contact; + } + public String getAddressLine1() { + return AddressLine1; + } + public void setAddressLine1(String addressLine1) { + AddressLine1 = addressLine1; + } + public String getAddressLine2() { + return AddressLine2; + } + public void setAddressLine2(String addressLine2) { + AddressLine2 = addressLine2; + } + public String getCity() { + return City; + } + public void setCity(String city) { + City = city; + } + public String getCountry() { + return Country; + } + public void setCountry(String country) { + Country = country; + } + + + +} diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/EmployeeRegistration.java b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/EmployeeRegistration.java new file mode 100644 index 0000000..dd273b1 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/EmployeeRegistration.java @@ -0,0 +1,105 @@ +package week3; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +public class EmployeeRegistration { + + public List EmployeeRecords; + private static EmployeeRegistration EmpReg=null; + public EmployeeRegistration() { + EmployeeRecords= new ArrayList(); + } + public static EmployeeRegistration getInstance() { + if(EmpReg==null) { + EmpReg = new EmployeeRegistration(); + return EmpReg; + + } + return EmpReg; + + } + + public void add(EmployeeDetails Emp) { + EmployeeRecords.add(Emp); + } + + public String UpdateEmployee(EmployeeDetails Emp) { + for(int i=0;i getEmployeeRecords() { + Connection conn=null; + try { + String dbURL="jdbc:sqlserver://DESKTOP-95D75UP;databaseName=HRMS"; + String user="sa"; + conn=DriverManager.getConnection(dbURL,user,"Abhishek"); + if(conn!=null) + { + Statement stmt=conn.createStatement(); + + + + String query1="select * from EmployeeRegistration "; + + stmt.execute(query1); + + String query2="Insert Into PersonsTest1 values('123','Sharma','Abhishek','ABC Colony','Delhi')"; + stmt.execute(query2); + String SQL="select * from PersonsTest1;"; + ResultSet rs=stmt.executeQuery(SQL); + while(rs.next()) + { + System.out.println(rs.getString("PersonID")+":"+ rs.getString("FirstName")+rs.getString("LastName")); + } + } + } + catch(Exception se) { + se.printStackTrace(); + } + finally { + if(conn!=null) { + + try { + conn.close(); + } + catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + + return EmployeeRecords; + } + } + + diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/StoreEmployeeDetails.java b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/StoreEmployeeDetails.java new file mode 100644 index 0000000..c86d776 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3/StoreEmployeeDetails.java @@ -0,0 +1,101 @@ +package week3; +import java.util.List; + + + + +public class StoreEmployeeDetails { + + String StoreEmployeeId; + String StoreFirstName; + String StoreLastName; + String StoreDesignationId; + String StoreEmailId; + String StoreContact; + String StoreAddressLine1; + String StoreAddressLine2; + String StoreCity; + String StoreCountry; + + public List EmployeeRecords; + + public String getStoreEmployeeId() { + return StoreEmployeeId; + } + public void setStoreEmployeeId(String storeEmployeeId) { + StoreEmployeeId = storeEmployeeId; + } + public String getStoreFirstName() { + return StoreFirstName; + } + public void setStoreFirstName(String storeFirstName) { + StoreFirstName = storeFirstName; + } + public String getStoreLastName() { + return StoreLastName; + } + public void setStoreLastName(String storeLastName) { + StoreLastName = storeLastName; + } + public String getStoreDesignationId() { + return StoreDesignationId; + } + public void setStoreDesignationId(String storeDesignationId) { + StoreDesignationId = storeDesignationId; + } + public String getStoreEmailId() { + return StoreEmailId; + } + public void setStoreEmailId(String storeEmailId) { + StoreEmailId = storeEmailId; + } + public String getStoreContact() { + return StoreContact; + } + public void setStoreContact(String storeContact) { + StoreContact = storeContact; + } + public String getStoreAddressLine1() { + return StoreAddressLine1; + } + public void setStoreAddressLine1(String storeAddressLine1) { + StoreAddressLine1 = storeAddressLine1; + } + public String getStoreAddressLine2() { + return StoreAddressLine2; + } + public void setStoreAddressLine2(String storeAddressLine2) { + StoreAddressLine2 = storeAddressLine2; + } + public String getStoreCity() { + return StoreCity; + } + public void setStoreCity(String storeCity) { + StoreCity = storeCity; + } + public String getStoreCountry() { + return StoreCountry; + } + public void setStoreCountry(String storeCountry) { + StoreCountry = storeCountry; + } + + + private static StoreEmployeeDetails EmpReg=null; + public static StoreEmployeeDetails getInstance() { + + if(EmpReg==null) { + EmpReg = new StoreEmployeeDetails(); + return EmpReg; + + } + return EmpReg; + } + + public void add(EmployeeDetails Emp) { + EmployeeRecords.add(Emp); + } + + } + + diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3Controllers/EmployeeDetailsController.java b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3Controllers/EmployeeDetailsController.java new file mode 100644 index 0000000..1d55b59 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/main/java/week3Controllers/EmployeeDetailsController.java @@ -0,0 +1,202 @@ +package week3Controllers; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + + + +import week3.EmployeeDetails; +import week3.EmployeeRegistration; +import week3.StoreEmployeeDetails; + +@CrossOrigin (origins = "*") + +@Controller +public class EmployeeDetailsController { + + + EmployeeRegistration EmpReg=new EmployeeRegistration(); + EmployeeDetails emp1=new EmployeeDetails(); + StoreEmployeeDetails EmpDetails=new StoreEmployeeDetails(); + + + @RequestMapping(method = RequestMethod.POST, value="/register/Employee") + @ResponseBody + public EmployeeDetails EmployeeRecords(@RequestBody EmployeeDetails emp){ + + Connection conn=null; + try { + + String FirstName=emp.getFirstName(); + String LastName=emp.getLastName(); + String DesignationId=emp.getDesignationId(); + String EmailId=emp.getEmailId(); + String Contact=emp.getContact(); + String AddressLine1=emp.getAddressLine1(); + String AddressLine2=emp.getAddressLine2(); + String City=emp.getCity(); + String Country=emp.getCountry(); + + String dbURL="jdbc:sqlserver://DESKTOP-95D75UP;databaseName=HRMS";{ + String user="sa"; + conn=DriverManager.getConnection(dbURL,user,"Abhishek"); + if(conn!=null) + { + System.out.println("Connection Successful"); + + Statement stmt = conn.createStatement(); + + stmt.execute("Insert into EmployeeDetails values( \'" + FirstName +"\' ," + " \'"+ LastName +"\' ," + " \'"+DesignationId +"\' ," + " \'"+ EmailId +"\' ," + " \'"+ Contact +"\' ," + " \'"+ AddressLine1 +"\' ," + " \'"+AddressLine2 +"\' ," + " \'"+ City+"\' ," + " \'"+Country); + System.out.println("Done"); + ResultSet rs = stmt.executeQuery("SELECT * from EmployeeDetails where FirstName = \'" + FirstName + "\' ;"); + + emp1.setFirstName(rs.getString("FirstName")); + emp1.setLastName(rs.getString("LastName")); + emp1.setDesignationId(rs.getString("DesignationId")); + emp1.setEmailId(rs.getString("EmailId")); + emp1.setContact(rs.getString("Contact")); + emp1.setAddressLine1(rs.getString("AddressLine")); + emp1.setAddressLine2(rs.getString("AddressLine2")); + emp1.setCity(rs.getString("City")); + emp1.setCountry(rs.getString("Country")); + } + } +} + catch(Exception se) { + se.printStackTrace(); +} + + return emp; + } + + + + + + + + + @RequestMapping(method = RequestMethod.GET, value="/retreive/Employee") + @ResponseBody + public List getAllEmployees() { + List empRecords = new ArrayList(); + Connection conn = null; + try { + String dbURL = "jdbc:sqlserver://DESKTOP-95D75UP;databaseName=HRMS"; + String user = "sa"; + conn = DriverManager.getConnection(dbURL,user,"Abhishek" ); + if(conn != null ) { + + System.out.println("Connection Successful"); + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery("SELECT * from EmployeeDetails;"); + + while(rs.next()) { + EmployeeDetails emp1 = new EmployeeDetails(); + emp1.setFirstName(rs.getString("FirstName")); + emp1.setLastName(rs.getString("LastName")); + emp1.setDesignationId(rs.getString("DesignationId")); + emp1.setEmailId(rs.getString("EmailId")); + emp1.setContact(rs.getString("Contact")); + emp1.setAddressLine1(rs.getString("AddressLine1")); + emp1.setAddressLine2(rs.getString("AddressLine2")); + emp1.setCity(rs.getString("City")); + emp1.setCountry(rs.getString("Country")); + System.out.println(rs.getString("FirstName") + "," + rs.getString("LastName")+ "," + rs.getString("DesignationId")+ "," +rs.getString("EmailId") + "," + rs.getString("Contact")+ "," + rs.getString("AddressLine1")+ "," +rs.getString("AddressLine2") + "," + rs.getString("City")+ "," + rs.getInt("Country") ); + } + + } + } + catch(SQLException ex) { + ex.printStackTrace(); + } + return empRecords; + } + + + + @RequestMapping(method = RequestMethod.DELETE, value="api/employees/{id}") + @ResponseBody + public String deleteEmployee(@PathVariable("id") int id){ + Connection conn = null; + try { + + String dbURL = "jdbc:sqlserver://DESKTOP-95D75UP;databaseName=HRMS"; + String user = "sa"; + conn = DriverManager.getConnection(dbURL, user, "Abhishek" ); + if(conn != null ) { + + System.out.println("Connection Successful"); + Statement stmt = conn.createStatement(); + stmt.execute("Delete from EmployeeDetails where Employeeid = " + id + ";"); + + System.out.println("Deletion Successful"); + } + + } + catch(SQLException ex) { + ex.printStackTrace(); + } + return "Delete successful"; + } + + + + + @RequestMapping(method = RequestMethod.PUT, value="api/employees/{UpdateId}") + + @ResponseBody + public String UpdateEmployee(@PathVariable("UpdateId") int UpdateId,@RequestBody EmployeeDetails emp){ + + int id = UpdateId; + + + String FirstName=emp.getFirstName(); + String LastName=emp.getLastName(); + String DesignationId=emp.getDesignationId(); + String EmailId=emp.getEmailId(); + String Contact=emp.getContact(); + String AddressLine1=emp.getAddressLine1(); + String AddressLine2=emp.getAddressLine2(); + String City=emp.getCity(); + String Country=emp.getCountry(); + + Connection conn = null; + try { + + String dbURL = "jdbc:sqlserver://DESKTOP-95D75UP;databaseName=HRMS"; + String user = "sa"; + conn = DriverManager.getConnection(dbURL, user, "Abhishek" ); + if(conn != null ) { + + System.out.println("Connection Successful"); + + Statement stmt = conn.createStatement(); + stmt.executeQuery("Update EmployeeDetails where EmployeeId = " + id + " Set FirstName = \'" + FirstName + "\' , LastName = \' " + LastName + "\' , DesignationId = " + DesignationId + "\' , EmailId = \' " + EmailId + "\' , Contact = \' " + Contact + "\' , AddressLine1 = \' " + AddressLine1 + "\' , AddressLine2 = \' " + AddressLine2 + "\' , City = \' " + City + "\' , Country = \' " + Country +" ;"); + + } + + } + catch(SQLException ex) { + ex.printStackTrace(); + } + return "Update successful"; + + } + + + } + + diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/main/resources/application.properties b/AbhishekSharma Week3/Backend/MyFirst/src/main/resources/application.properties new file mode 100644 index 0000000..f5e755c --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=8083 + +spring.profiles.active=@spring.profiles.active@ \ No newline at end of file diff --git a/AbhishekSharma Week3/Backend/MyFirst/src/test/java/com/example/Myfirst/MyFirstApplicationTests.java b/AbhishekSharma Week3/Backend/MyFirst/src/test/java/com/example/Myfirst/MyFirstApplicationTests.java new file mode 100644 index 0000000..c6b3520 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/src/test/java/com/example/Myfirst/MyFirstApplicationTests.java @@ -0,0 +1,17 @@ +package com.example.Myfirst; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class MyFirstApplicationTests { + + @Test + public void contextLoads() { + } + +} + diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/MyFirst-0.0.1-SNAPSHOT.jar b/AbhishekSharma Week3/Backend/MyFirst/target/MyFirst-0.0.1-SNAPSHOT.jar new file mode 100644 index 0000000..9cbb06a Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/MyFirst-0.0.1-SNAPSHOT.jar differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/MyFirst-0.0.1-SNAPSHOT.jar.original b/AbhishekSharma Week3/Backend/MyFirst/target/MyFirst-0.0.1-SNAPSHOT.jar.original new file mode 100644 index 0000000..0cbb615 Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/MyFirst-0.0.1-SNAPSHOT.jar.original differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/classes/Repository/RepositoryImplementation.class b/AbhishekSharma Week3/Backend/MyFirst/target/classes/Repository/RepositoryImplementation.class new file mode 100644 index 0000000..b971207 Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/classes/Repository/RepositoryImplementation.class differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/classes/application.properties b/AbhishekSharma Week3/Backend/MyFirst/target/classes/application.properties new file mode 100644 index 0000000..f5e755c --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/classes/application.properties @@ -0,0 +1,3 @@ +server.port=8083 + +spring.profiles.active=@spring.profiles.active@ \ No newline at end of file diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/classes/com/example/Myfirst/SpringBootRest2Application.class b/AbhishekSharma Week3/Backend/MyFirst/target/classes/com/example/Myfirst/SpringBootRest2Application.class new file mode 100644 index 0000000..9f34ab2 Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/classes/com/example/Myfirst/SpringBootRest2Application.class differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/EmployeeDetails.class b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/EmployeeDetails.class new file mode 100644 index 0000000..a012d5a Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/EmployeeDetails.class differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/EmployeeRegistration.class b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/EmployeeRegistration.class new file mode 100644 index 0000000..91719eb Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/EmployeeRegistration.class differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/StoreEmployeeDetails.class b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/StoreEmployeeDetails.class new file mode 100644 index 0000000..1583f9c Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3/StoreEmployeeDetails.class differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3Controllers/EmployeeDetailsController.class b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3Controllers/EmployeeDetailsController.class new file mode 100644 index 0000000..c5e9f7c Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/classes/week3Controllers/EmployeeDetailsController.class differ diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/maven-archiver/pom.properties b/AbhishekSharma Week3/Backend/MyFirst/target/maven-archiver/pom.properties new file mode 100644 index 0000000..12a41d5 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/maven-archiver/pom.properties @@ -0,0 +1,4 @@ +#Created by Apache Maven 3.6.0 +groupId=com.example +artifactId=MyFirst +version=0.0.1-SNAPSHOT diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..7cd26d1 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,6 @@ +com\example\Myfirst\beans\StudentRegistration.class +com\example\Myfirst\SpringBootRest2Application.class +com\example\Myfirst\beans\Student.class +com\example\Myfirst\controllers\StudentRetrieveController.class +com\example\Myfirst\beans\StudentRegistrationReply.class +com\example\Myfirst\controllers\StudentRegistrationController.class diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..088bdb0 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,6 @@ +C:\Users\abhishek.sharma\eclipse-workspace\MyFirst\src\main\java\com\example\Myfirst\beans\Student.java +C:\Users\abhishek.sharma\eclipse-workspace\MyFirst\src\main\java\com\example\Myfirst\controllers\StudentRegistrationController.java +C:\Users\abhishek.sharma\eclipse-workspace\MyFirst\src\main\java\com\example\Myfirst\beans\StudentRegistrationReply.java +C:\Users\abhishek.sharma\eclipse-workspace\MyFirst\src\main\java\com\example\Myfirst\beans\StudentRegistration.java +C:\Users\abhishek.sharma\eclipse-workspace\MyFirst\src\main\java\com\example\Myfirst\SpringBootRest2Application.java +C:\Users\abhishek.sharma\eclipse-workspace\MyFirst\src\main\java\com\example\Myfirst\controllers\StudentRetrieveController.java diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..7f7c11e --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -0,0 +1 @@ +com\example\Myfirst\MyFirstApplicationTests.class diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..858c501 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +C:\Users\abhishek.sharma\eclipse-workspace\MyFirst\src\test\java\com\example\Myfirst\MyFirstApplicationTests.java diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/2019-02-04T16-47-51_039.dumpstream b/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/2019-02-04T16-47-51_039.dumpstream new file mode 100644 index 0000000..b9004e4 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/2019-02-04T16-47-51_039.dumpstream @@ -0,0 +1,15 @@ +# Created on 2019-02-04T16:47:51.041 +WARNING: An illegal reflective access operation has occurred + +# Created on 2019-02-04T16:47:51.051 +WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/abhishek.sharma/.m2/repository/org/springframework/spring-core/5.0.12.RELEASE/spring-core-5.0.12.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) + +# Created on 2019-02-04T16:47:51.069 +WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1 + +# Created on 2019-02-04T16:47:51.095 +WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations + +# Created on 2019-02-04T16:47:51.103 +WARNING: All illegal access operations will be denied in a future release + diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/TEST-com.example.Myfirst.MyFirstApplicationTests.xml b/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/TEST-com.example.Myfirst.MyFirstApplicationTests.xml new file mode 100644 index 0000000..f8b4405 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/TEST-com.example.Myfirst.MyFirstApplicationTests.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/com.example.Myfirst.MyFirstApplicationTests.txt b/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/com.example.Myfirst.MyFirstApplicationTests.txt new file mode 100644 index 0000000..8316644 --- /dev/null +++ b/AbhishekSharma Week3/Backend/MyFirst/target/surefire-reports/com.example.Myfirst.MyFirstApplicationTests.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: com.example.Myfirst.MyFirstApplicationTests +------------------------------------------------------------------------------- +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.038 s - in com.example.Myfirst.MyFirstApplicationTests diff --git a/AbhishekSharma Week3/Backend/MyFirst/target/test-classes/com/example/Myfirst/MyFirstApplicationTests.class b/AbhishekSharma Week3/Backend/MyFirst/target/test-classes/com/example/Myfirst/MyFirstApplicationTests.class new file mode 100644 index 0000000..cbe3aae Binary files /dev/null and b/AbhishekSharma Week3/Backend/MyFirst/target/test-classes/com/example/Myfirst/MyFirstApplicationTests.class differ diff --git a/AbhishekSharma Week3/Frontend/DeleteEmployee.html b/AbhishekSharma Week3/Frontend/DeleteEmployee.html new file mode 100644 index 0000000..95acc8c --- /dev/null +++ b/AbhishekSharma Week3/Frontend/DeleteEmployee.html @@ -0,0 +1,37 @@ + + + Delete + + + + +


+ + + + + + + \ No newline at end of file diff --git a/AbhishekSharma Week3/Frontend/EditEmployee.html b/AbhishekSharma Week3/Frontend/EditEmployee.html new file mode 100644 index 0000000..831d2b4 --- /dev/null +++ b/AbhishekSharma Week3/Frontend/EditEmployee.html @@ -0,0 +1,128 @@ + + + Edit + + + + Logo + + + + + + +
+
+

Your Details

+


+ + +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+

+ +
+ + + + + + \ No newline at end of file diff --git a/AbhishekSharma Week3/Frontend/EmployeeAccount.html b/AbhishekSharma Week3/Frontend/EmployeeAccount.html new file mode 100644 index 0000000..3673052 --- /dev/null +++ b/AbhishekSharma Week3/Frontend/EmployeeAccount.html @@ -0,0 +1,57 @@ + + + Employee Account + + + + + Logo + + + + + + +
+
+

Welcome to Cyber Group

+

+ +
+ +

+ +
+ +


+ +
+ +


+ +
+ +


+ + + + +
+
+ + \ No newline at end of file diff --git a/AbhishekSharma Week3/Frontend/EnterEmployeeDetails.html b/AbhishekSharma Week3/Frontend/EnterEmployeeDetails.html new file mode 100644 index 0000000..8405ab4 --- /dev/null +++ b/AbhishekSharma Week3/Frontend/EnterEmployeeDetails.html @@ -0,0 +1,106 @@ + + + Enter Employee Details + + + + Logo +
+
+

Please Enter Your Details

+


+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ + + + + + +
+
+ + + + + + \ No newline at end of file diff --git a/AbhishekSharma Week3/Frontend/Login.html b/AbhishekSharma Week3/Frontend/Login.html new file mode 100644 index 0000000..827e05a --- /dev/null +++ b/AbhishekSharma Week3/Frontend/Login.html @@ -0,0 +1,64 @@ + + + + EMPLOYEE LOGIN + + + + Logo +
+
+

CYBER GROUP LOGIN PAGE

+
+ + +
+

+
+ +

+ + + +

+ + Create New Account + + + +
+
+ + + \ No newline at end of file diff --git a/AbhishekSharma Week3/Frontend/Logo.png b/AbhishekSharma Week3/Frontend/Logo.png new file mode 100644 index 0000000..c2d12fc Binary files /dev/null and b/AbhishekSharma Week3/Frontend/Logo.png differ diff --git a/AbhishekSharma Week3/Frontend/Main.css b/AbhishekSharma Week3/Frontend/Main.css new file mode 100644 index 0000000..cbd00cd --- /dev/null +++ b/AbhishekSharma Week3/Frontend/Main.css @@ -0,0 +1,51 @@ +.box1{ + background-color: white; + border:5px black solid; + margin: 40px; + padding: 40px; + +} +.button{ + margin:5px; + padding: 5px 15px; + text-align: center; + cursor:pointer; + outline:none; + color: black; + box-shadow: 0 9px #999; +} +.button: hover{ +background-color: grey; +top:0px; +} +.button:active{ + box-shadow: 0 5px #666; + top:4px; +} +.container{ + + + width:80%; + margin: auto; + text-align: center; + padding: none; +} +.box1 h1{ +text-decoration: underline; +} + +.box1 li{ + padding-bottom:6px; + border-bottom:dotted 1px #333; +} + +a:hover{ + color:red; +} + +.label{ + + font-size: 20; + font-weight: bold; + +} diff --git a/AbhishekSharma Week3/Frontend/Signup.html b/AbhishekSharma Week3/Frontend/Signup.html new file mode 100644 index 0000000..c18387e --- /dev/null +++ b/AbhishekSharma Week3/Frontend/Signup.html @@ -0,0 +1,55 @@ + + + + New Employee Signup + + + + Logo +
+
+

Create New Employee

+
+ +
+ +

+ +
+ +

+ +
+ +

+ +
+ +

+ + + + +
+
+ + + \ No newline at end of file diff --git a/AbhishekSharma Week3/Frontend/ViewEmployeeDetails.html b/AbhishekSharma Week3/Frontend/ViewEmployeeDetails.html new file mode 100644 index 0000000..e9a5cb9 --- /dev/null +++ b/AbhishekSharma Week3/Frontend/ViewEmployeeDetails.html @@ -0,0 +1,95 @@ + + + View Employees List + + + + + Logo +
+
+ + + + + + + + +

List Of Employees

+ + +

+ + +
+
+ + \ No newline at end of file diff --git a/AbhishekSharma Week3/Frontend/index.html b/AbhishekSharma Week3/Frontend/index.html new file mode 100644 index 0000000..c5c9c26 --- /dev/null +++ b/AbhishekSharma Week3/Frontend/index.html @@ -0,0 +1,20 @@ + + + Links + + + + + + \ No newline at end of file