diff --git a/Week3-Project/DeepakPahuja002/.gitignore b/Week3-Project/DeepakPahuja002/.gitignore new file mode 100644 index 0000000..ca8ca1c --- /dev/null +++ b/Week3-Project/DeepakPahuja002/.gitignore @@ -0,0 +1 @@ +week3/target/ \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.gitignore b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.gitignore new file mode 100644 index 0000000..c456c4a --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.gitignore @@ -0,0 +1,25 @@ +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.mvn/wrapper/maven-wrapper.jar b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..01e6799 Binary files /dev/null and b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.mvn/wrapper/maven-wrapper.properties b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..cd0d451 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/mvnw b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/mvnw new file mode 100644 index 0000000..5551fde --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/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/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/mvnw.cmd b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/mvnw.cmd new file mode 100644 index 0000000..e5cfb0a --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/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/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/pom.xml b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/pom.xml new file mode 100644 index 0000000..b91e037 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/pom.xml @@ -0,0 +1,101 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.0.9.BUILD-SNAPSHOT + + + com.deepakpahuja + EmployeeRegistrationSystem + 0.0.1-SNAPSHOT + EmployeeRegistrationSystem + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter + + + org.springframework + spring-web + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + test + + + com.microsoft.sqlserver + mssql-jdbc + 6.2.2.jre8 + + + + + + + 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/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/EmployeeRegistrationSystemApplication.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/EmployeeRegistrationSystemApplication.java new file mode 100644 index 0000000..f2cf063 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/EmployeeRegistrationSystemApplication.java @@ -0,0 +1,15 @@ +package com.deepakpahuja; + + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication(scanBasePackages = {"com.deepakpahuja"}) +public class EmployeeRegistrationSystemApplication { + + public static void main(String[] args) { + SpringApplication.run(EmployeeRegistrationSystemApplication.class, args); + } + +} + diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/Employee.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/Employee.java new file mode 100644 index 0000000..bcf32df --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/Employee.java @@ -0,0 +1,51 @@ +package com.deepakpahuja.beans; + +public class Employee { + String employeeId; + String name; + String designation; + String phoneNo; + int signUpId; + + + + public Employee(String employeeId, String name, String designation, String phoneNo, int signUpId) { + super(); + this.employeeId = employeeId; + this.name = name; + this.designation = designation; + this.phoneNo = phoneNo; + this.signUpId = signUpId; + } + public String getEmployeeId() { + return employeeId; + } + public void setEmployeeId(String employeeId) { + this.employeeId = employeeId; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getDesignation() { + return designation; + } + public void setDesignation(String designation) { + this.designation = designation; + } + public String getPhoneNo() { + return phoneNo; + } + public void setPhoneNo(String phoneNo) { + this.phoneNo = phoneNo; + } + public int getSignUpId() { + return signUpId; + } + public void setSignUpId(int signUpId) { + this.signUpId = signUpId; + } + +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/EmployeeRegistration.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/EmployeeRegistration.java new file mode 100644 index 0000000..b82b964 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/EmployeeRegistration.java @@ -0,0 +1,147 @@ +package com.deepakpahuja.beans; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +public class EmployeeRegistration { + private List employeeRecords; + private static EmployeeRegistration empregd = null; + private EmployeeRegistration(){ + employeeRecords = new ArrayList(); + } + public static EmployeeRegistration getInstance() { + if(empregd == null) { + empregd = new EmployeeRegistration(); + return empregd; + } + else { + return empregd; + } + } + public boolean add(Employee emp) { +// employeeRecords.add(emp); + + Connection con=null; + try { + String url="jdbc:sqlserver://CYG291;database=EmployeeManagementSystem"; + String user="sa"; + con = DriverManager.getConnection(url, user, "deepak"); + if(con != null) { + Statement stmt = con.createStatement(); + String qry1="Insert Into Employees VALUES('"+ emp.getEmployeeId()+"','" + emp.getName() + + "','" + emp.getDesignation() +"','"+ emp.getPhoneNo() + "',"+ emp.getSignUpId() + ");"; + + return stmt.execute(qry1); + + } + else + { + return false; + } + } + catch(Exception e) { + e.printStackTrace(); + return false; + } + } + public String upDateStudent(Employee emp) { + Connection con=null; + try { + String url="jdbc:sqlserver://CYG291;database=EmployeeManagementSystem"; + String user="sa"; + con = DriverManager.getConnection(url, user, "deepak"); + System.out.println("Outside"); + + if(con!=null) { + System.out.println("In update student"); + Statement stmt = con.createStatement(); + String qry1 = "UPDATE Employees " + + "SET EmployeeId = '" + emp.getEmployeeId() + "'" + + ", Name = '" + emp.getName() + "'" + + ", Designation = '" + emp.getDesignation() + "'" + + ", PhoneNo = '" + emp.getPhoneNo() + "'" + + ", SignUpId = '" + emp.getSignUpId() + "'" + + " WHERE EmployeeId= '" + emp.getEmployeeId() + "'"; + System.out.println(emp.getEmployeeId()); + System.out.println("Below update student"); + + stmt.executeUpdate(qry1); + System.out.println("Below update student"); + + return "Update successful"; + } + + } + catch(Exception e){ + e.printStackTrace(); + } + + return "Update un-successful"; +// for(int i=0; i getStudentRecords() { + List employeeList = new ArrayList(); + Connection con=null; + try { + String url="jdbc:sqlserver://CYG291;database=EmployeeManagementSystem"; + String user="sa"; + con = DriverManager.getConnection(url, user, "deepak"); + if(con != null) { + Statement stmt = con.createStatement(); + String qry1="select * from Employees"; + ResultSet rs = stmt.executeQuery(qry1); + while(rs.next()) + { + employeeList.add(new Employee(rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getInt(5))); + } + } + + } + catch(Exception e) { + e.printStackTrace(); + } + return employeeList; + } + +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/EmployeeRegistrationReply.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/EmployeeRegistrationReply.java new file mode 100644 index 0000000..5d0b57c --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/EmployeeRegistrationReply.java @@ -0,0 +1,46 @@ +package com.deepakpahuja.beans; + +public class EmployeeRegistrationReply { + String EmployeeId; + String Name; + String Designation; + String PhoneNo; + int SignUpId; + String registrationStatus; + public String getEmployeeId() { + return EmployeeId; + } + public void setEmployeeId(String employeeId) { + EmployeeId = employeeId; + } + public String getName() { + return Name; + } + public void setName(String name) { + Name = name; + } + public String getDesignation() { + return Designation; + } + public void setDesignation(String designation) { + Designation = designation; + } + public String getPhoneNo() { + return PhoneNo; + } + public void setPhoneNo(String phoneNo) { + PhoneNo = phoneNo; + } + public int getSignUpId() { + return SignUpId; + } + public void setSignUpId(int signUpId) { + SignUpId = signUpId; + } + public String getRegistrationStatus() { + return registrationStatus; + } + public void setRegistrationStatus(String registrationStatus) { + this.registrationStatus = registrationStatus; + } +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/SignUp.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/SignUp.java new file mode 100644 index 0000000..5f79d2b --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/beans/SignUp.java @@ -0,0 +1,40 @@ +package com.deepakpahuja.beans; + +public class SignUp { + int Id; + String Name; + String EmailId; + String Password; + public int getId() { + return Id; + } + public void setId(int id) { + Id = id; + } + public String getName() { + return Name; + } + public void setName(String name) { + Name = name; + } + public String getEmailId() { + return EmailId; + } + public void setEmailId(String emailId) { + EmailId = emailId; + } + public String getPassword() { + return Password; + } + public void setPassword(String password) { + Password = password; + } + public SignUp(int id, String name, String emailId, String password) { + super(); + Id = id; + Name = name; + EmailId = emailId; + Password = password; + } + +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeDeleteController.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeDeleteController.java new file mode 100644 index 0000000..8cbe665 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeDeleteController.java @@ -0,0 +1,23 @@ +package com.deepakpahuja.controllers; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import com.deepakpahuja.beans.EmployeeRegistration; + +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PathVariable; + +@CrossOrigin +@RestController +public class EmployeeDeleteController { + + @RequestMapping(method = RequestMethod.DELETE, value="/delete/student/{regdNum}") + + @ResponseBody + public String deleteStudentRecord(@PathVariable("regdNum") String regdNum) { + System.out.println("In deleteStudentRecord"); + return EmployeeRegistration.getInstance().deleteStudent(regdNum); + } +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeRegistrationController.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeRegistrationController.java new file mode 100644 index 0000000..7ac9105 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeRegistrationController.java @@ -0,0 +1,37 @@ +package com.deepakpahuja.controllers; + + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; +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 org.springframework.web.bind.annotation.RestController; + +import com.deepakpahuja.beans.*; + +@CrossOrigin +@RestController +public class EmployeeRegistrationController { + + @RequestMapping(method = RequestMethod.POST, value="/register/student") + + @ResponseBody + public EmployeeRegistrationReply registerStudent(@RequestBody Employee employee) { + System.out.println("In registerEmployee"); + System.out.println(employee.getName()); + EmployeeRegistrationReply empregreply = new EmployeeRegistrationReply(); + EmployeeRegistration.getInstance().add(employee); + //We are setting the below value just to reply a message back to the caller + empregreply.setEmployeeId(employee.getEmployeeId()); + empregreply.setName(employee.getName()); + empregreply.setDesignation(employee.getDesignation()); + empregreply.setPhoneNo(employee.getPhoneNo()); + empregreply.setSignUpId(employee.getSignUpId()); + empregreply.setRegistrationStatus("Successful"); + System.out.println("below successful"); + return empregreply; + } + +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeRetrieveController.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeRetrieveController.java new file mode 100644 index 0000000..dd90bf0 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeRetrieveController.java @@ -0,0 +1,24 @@ +package com.deepakpahuja.controllers; + +import java.util.List; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.deepakpahuja.beans.Employee; +import com.deepakpahuja.beans.EmployeeRegistration; + +@CrossOrigin +@Controller +public class EmployeeRetrieveController { + @RequestMapping(method = RequestMethod.GET, value="/student/allstudent") + @ResponseBody + public List getAllStudents() { + System.out.println("In retrieveStudentRecord"); + return EmployeeRegistration.getInstance().getStudentRecords(); + } + +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeUpdateController.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeUpdateController.java new file mode 100644 index 0000000..b3f257a --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/EmployeeUpdateController.java @@ -0,0 +1,22 @@ +package com.deepakpahuja.controllers; + +import org.springframework.web.bind.annotation.CrossOrigin; +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 org.springframework.web.bind.annotation.RestController; + +import com.deepakpahuja.beans.Employee; +import com.deepakpahuja.beans.EmployeeRegistration; + +@CrossOrigin +@RestController +public class EmployeeUpdateController { + @RequestMapping(method = RequestMethod.PUT, value="/update/student") + @ResponseBody + public String updateStudentRecord(@RequestBody Employee empn) { + System.out.println("In updateStudentRecord"); + return EmployeeRegistration.getInstance().upDateStudent(empn); + } +} diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/SignUpController.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/SignUpController.java new file mode 100644 index 0000000..693725f --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/java/com/deepakpahuja/controllers/SignUpController.java @@ -0,0 +1,131 @@ +package com.deepakpahuja.controllers; + + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +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 com.deepakpahuja.beans.SignUp; +@CrossOrigin +@Controller +public class SignUpController { + + + @RequestMapping(method = RequestMethod.GET, value="/SignUp/allSignUp") + @ResponseBody + public List GetSignUpTable() { + List signupList = new ArrayList(); + + Connection con = null; + try { + String url="jdbc:sqlserver://CYG291;database=EmployeeManagementSystem"; + String user="sa"; + con = DriverManager.getConnection(url, user, "deepak"); + if(con != null) { + Statement stmt = con.createStatement(); + String query1 = "SELECT * FROM SignUp"; + ResultSet rs = stmt.executeQuery(query1); + while(rs.next()) + { + signupList.add(new SignUp(rs.getInt("Id"),rs.getString("Name"),rs.getString("EmailId"),rs.getString("Password"))); + } + } + } + catch(Exception e) { + e.printStackTrace(); + } + return signupList; + + } + + + @RequestMapping(method = RequestMethod.PUT, value="/register/SignUp/{id}") + @ResponseBody + public void PutSignUpTable(@RequestBody SignUp su, @PathVariable("id") String id) { + Connection con = null; + try { + String url="jdbc:sqlserver://CYG291;database=EmployeeManagementSystem"; + String user="sa"; + con = DriverManager.getConnection(url, user, "deepak"); + if(con != null) { + Statement stmt = con.createStatement(); + String qry1="UPDATE SignUp SET Password = '" + su.getPassword() + + "', EmailId = '" + su.getEmailId() + "' WHERE Id = '" + id + "';"; + + stmt.execute(qry1); + } + } + catch(Exception e) { + e.printStackTrace(); + } + + } + + + @RequestMapping(method = RequestMethod.POST, value="/register/SignUp") + @ResponseBody + public boolean postSignUpTable(@RequestBody SignUp su) { + Connection con; + System.out.println("In retrieveStudentRecord"); + + try { + String url="jdbc:sqlserver://CYG291;database=EmployeeManagementSystem"; + String user="sa"; + con = DriverManager.getConnection(url, user, "deepak"); + if(con != null) { + Statement stmt = con.createStatement(); + System.out.println("In retrieveStudentRecord"); + + String qry1="INSERT INTO SignUp(Name, EmailId, Password) VALUES('" + su.getName() + "', '" + + su.getEmailId() + "', '" + su.getPassword() + "');"; + + return stmt.execute(qry1); + } + } + catch(Exception e) { + e.printStackTrace(); + } + + return false; + + } + + + @RequestMapping(method = RequestMethod.DELETE, value="/register/SignUp/{id}") + @ResponseBody + public String deleteSignUp(@PathVariable("id") int id) { + Connection con = null; + try { + String url="jdbc:sqlserver://CYG291;database=EmployeeManagementSystem"; + String user="sa"; + con = DriverManager.getConnection(url, user, "deepak"); + if(con!= null) { + Statement stmt = con.createStatement(); + String qry1 = "DELETE FROM SignUp " + + "WHERE Id = " + id + ""; + stmt.execute(qry1); + return "Deleted Successfully"; + } + } + catch(Exception e) { + e.printStackTrace(); + } + + return "Delete un-successful"; + } +} + + + + diff --git a/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/resources/application.properties b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/main/resources/application.properties new file mode 100644 index 0000000..328a9a6 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/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/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/test/java/com/deepakpahuja/EmployeeRegistrationSystemApplicationTests.java b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/test/java/com/deepakpahuja/EmployeeRegistrationSystemApplicationTests.java new file mode 100644 index 0000000..5523c3f --- /dev/null +++ b/Week3-Project/DeepakPahuja002/EmployeeRegistrationSystem/src/test/java/com/deepakpahuja/EmployeeRegistrationSystemApplicationTests.java @@ -0,0 +1,17 @@ +package com.deepakpahuja; + +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 EmployeeRegistrationSystemApplicationTests { + + @Test + public void contextLoads() { + } + +} + diff --git a/Week3-Project/DeepakPahuja002/create_user.html b/Week3-Project/DeepakPahuja002/create_user.html new file mode 100644 index 0000000..d073ff5 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/create_user.html @@ -0,0 +1,252 @@ + + + + + + + LogIn Page + + + + + + + +
+
+
+ + + + + +
+
+
CREATE / UPDATE Your User profile
+ + + + + +
+
+
Enter User Information
+ + + +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ + + + + + +
+
+ + + + + + + + +
+
+
+
+ +
+ + + \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/css/create_user.css b/Week3-Project/DeepakPahuja002/css/create_user.css new file mode 100644 index 0000000..17f24dc --- /dev/null +++ b/Week3-Project/DeepakPahuja002/css/create_user.css @@ -0,0 +1,82 @@ +ul.navbar-nav{ + float: right; +} +.navbar-default{ + padding: 10px 40px; +} +.navbar-header{ + width: 200px; +} +.background_pic{ + min-height: 100vh; + background-image: url(https://images.unsplash.com/photo-1536553176585-67a46418b7d1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=882&q=80); + background-repeat: no-repeat; + background-position: center center; + background-size: cover; + width: 100%; + overflow-x: scroll; + +} +.overlay { + background-color: rgba(0, 0, 0, 0.7); + top: 0; + left: 0; + width: 100%; + height: 100vh; + position: relative; + z-index: 1; + overflow-x: scroll; +} +.navbar-default .navbar-nav>li>a{ + color: white; +} +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover{ + color: black; + font-weight: 600; + background-color: greenyellow; + border-radius: 10px; +} +.navbar-nav>li{ + border-radius: 15px; +} +.active{ + background-color: green; + color: green; +} + + +////////////////////////////////// Navbar code above this point ////////////////////////////// + + + +.create_your_profile_heading{ + text-align: center; + font-size: 30px; + letter-spacing: 2px; +} +.container{ + background-color: white; + color: black; + border-radius: 25px; + padding: 20px; + max-width: 800px; +} +.container .row{ + padding: 10px; + border-radius: 15px; +} +input.form-control{ + border-color: black; +} +div.form_heading, .main_heading{ + /* width: 100%; */ + background-color: #000; + color: white; + margin-bottom: 20px; + text-transform: uppercase; +} +.main_heading{ + margin-top: 10px; + margin-bottom: 40px; + background-color: green; +} diff --git a/Week3-Project/DeepakPahuja002/css/login.css b/Week3-Project/DeepakPahuja002/css/login.css new file mode 100644 index 0000000..b3b068d --- /dev/null +++ b/Week3-Project/DeepakPahuja002/css/login.css @@ -0,0 +1,105 @@ +ul.navbar-nav{ + float: right; +} +.navbar-default{ + padding: 10px 40px; +} +.navbar-header{ + width: 200px; +} +.background_pic{ + height: 100vh; + background-image: url(https://images.unsplash.com/photo-1536553176585-67a46418b7d1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=882&q=80); + background-repeat: no-repeat; + background-position: center; + background-size: cover; + width: 100%; + +} +.overlay { + background-color: rgba(0, 0, 0, 0.7); + top: 0; + left: 0; + width: 100%; + height: 100vh; + position: relative; + z-index: 1; +} +.container{ + background-color: white; + border-radius: 15px; + box-sizing: border-box; + padding: 50px ; + color: black; + margin-top: 60px; + padding-top: 30px; + max-width: 500px; +} +.navbar-default .navbar-nav>li>a{ + color: white; +} +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover{ + color: black; + font-weight: 600; + background-color: greenyellow; + border-radius: 10px; +} +.navbar-nav>li{ + border-radius: 15px; +} +.active{ + background-color: green; + color: green; +} + +////////////////////////////////// Navbar code above this point ////////////////////////////// + + +.btn{ + width: 100%; + border-radius: 15px; +} +.col .col-lg-6{ + width: 100%; +} +#sign_in_options{ + margin-top: 15px;; +} +.sign_in_options_button{ + padding: 10px; + color: white; + width: 100%; + border-radius: 10px; + border-style: none; +} +.sign_in_options_button:hover{ + box-shadow: 5px 5px 5px 1px gray; +} +.google{ +background-color: #d34836; +} +.facebook{ +background-color: #4267b2; +} +.login_heading{ + text-align: center; + max-width: 50px; + margin: 0 auto; + width: 100%; + margin: 150px; + font-size: 30px; + font-weight: 600; + letter-spacing: 2px; +} +div#go_to_signup_page{ + margin-top: 20px; +} +.go_to_signup_page{ + color:blue; + outline-color: none; + text-decoration: underline; + margin-left: 70px; +} + + + diff --git a/Week3-Project/DeepakPahuja002/css/main.css b/Week3-Project/DeepakPahuja002/css/main.css new file mode 100644 index 0000000..eaa9ee3 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/css/main.css @@ -0,0 +1,67 @@ +ul.navbar-nav{ + float: right; +} +.navbar-default{ + padding: 10px 40px; +} +.navbar-header{ + width: 200px; +} +.background_pic{ + height: 100vh; + background-image: url(https://images.unsplash.com/photo-1536553176585-67a46418b7d1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=882&q=80); + background-repeat: no-repeat; + background-position: center; + background-size: cover; + width: 100%; + +} +.overlay { + background-color: rgba(0, 0, 0, 0.7); + top: 0; + left: 0; + width: 100%; + height: 100vh; + position: relative; + z-index: 1; +} +.container{ + background-color: white; + border-radius: 15px; + box-sizing: border-box; + padding: 50px ; + color: black; + margin-top: 60px; + padding-top: 30px; + max-width: 500px; +} +.navbar-default .navbar-nav>li>a{ + color: white; +} +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover{ + color: black; + font-weight: 600; + background-color: greenyellow; + border-radius: 10px; +} +.navbar-nav>li{ + border-radius: 15px; +} +.active{ + background-color: green; + color: green; +} + +////////////////////////////////// Navbar code above this point ////////////////////////////// + +.my_class{ + text-decoration: none; + color: white; + width: 100px; + +} +.my_class:hover{ + text-decoration: none; + color: white; + +} \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/css/nodejs_tut.js b/Week3-Project/DeepakPahuja002/css/nodejs_tut.js new file mode 100644 index 0000000..e69de29 diff --git a/Week3-Project/DeepakPahuja002/css/nodejs_tut.txt b/Week3-Project/DeepakPahuja002/css/nodejs_tut.txt new file mode 100644 index 0000000..e69de29 diff --git a/Week3-Project/DeepakPahuja002/css/required_user.css b/Week3-Project/DeepakPahuja002/css/required_user.css new file mode 100644 index 0000000..30b4384 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/css/required_user.css @@ -0,0 +1,94 @@ +ul.navbar-nav{ + float: right; +} +.navbar-default{ + padding: 10px 40px; +} +.navbar-header{ + width: 200px; +} + +.navbar-default .navbar-nav>li>a{ + color: white; +} +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover{ + color: black; + font-weight: 600; + background-color: greenyellow; + border-radius: 10px; +} +.navbar-nav>li{ + border-radius: 15px; +} +.active{ + background-color: green; + color: green; +} + + +////////////////////////////////// Navbar code above this point ////////////////////////////// + +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover{ + color: black; + font-weight: 600; + background-color: greenyellow; + border-radius: 10px; +} +img .Profile_photo{ + border-radius: 141px; +} +.btn_div{ + margin-right: 0px; + margin-left: 0px; +} +.main_heading{ + font-size: 30px; + color: white; + line-height: 110px; + text-transform: uppercase; + text-align: left; +} +.sign_in_options_button{ + padding: 10px 20px; + color: white; + border-radius: 10px; + border-style: none; +} +.sign_in_options_button:hover{ + box-shadow: 5px 5px 10px 1px rgba(255,255,255,0.7); +} +div.form_heading{ + /* width: 100%; */ + background-color: yellowgreen; + border-radius: 30px; + font-weight: bold; + font-size: 1.2em; + padding: 15px; + text-align: center; + color: black; + margin-bottom: 20px; + margin-top: 20px; + text-transform: uppercase; +} +.row{ + margin: 20px auto 15px auto; +} +.container .required_user_container{ + color: white; + text-align: center; +} +/* div.col.col-lg-3, input#EmployeeId.inputs{ + width: 100%; + + border-radius: 30px; + border-style: solid; + border-color: red; + /* color: white; */ + /* border: solid; */ +} */ + +.row .col.col-lg-6 input{ + color: black; +} + + diff --git a/Week3-Project/DeepakPahuja002/css/signup.css b/Week3-Project/DeepakPahuja002/css/signup.css new file mode 100644 index 0000000..6878b85 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/css/signup.css @@ -0,0 +1,103 @@ +ul.navbar-nav{ + float: right; +} +.navbar-default{ + padding: 10px 40px; +} +.navbar-header{ + width: 200px; +} +.background_pic{ + height: 100vh; + background-image: url(https://images.unsplash.com/photo-1536553176585-67a46418b7d1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=882&q=80); + background-repeat: no-repeat; + background-position: center; + background-size: cover; + width: 100%; + +} +.overlay { + background-color: rgba(0, 0, 0, 0.7); + top: 0; + left: 0; + width: 100%; + height: 100%; + position: relative; + z-index: 1; +} +.container{ + background-color: white; + border-radius: 15px; + box-sizing: border-box; + padding: 50px ; + color: black; + margin-top: 40px; + padding-top: 30px; + padding-bottom: 40px; + max-width: 500px; +}.navbar-default .navbar-nav>li>a{ + color: white; +} +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover{ + color: black; + font-weight: 600; + background-color: greenyellow; + border-radius: 10px; +} +.navbar-nav>li{ + border-radius: 15px; +} +.active{ + background-color: green; + color: green; +} +.btn{ + width: 100%; + border-radius: 15px; +} +.col .col-lg-6{ + width: 100%; +} +#sign_in_options{ + margin-top: 15px;; +} +.sign_in_options_button{ + padding: 10px; + color: white; + width: 100%; + border-radius: 10px; + border-style: none; +} +.sign_in_options_button:hover{ + box-shadow: 5px 5px 5px 1px gray; + +} +.google{ +background-color: #d34836; +} +.facebook{ +background-color: #4267b2; +} +.signup_heading{ + text-align: center; + max-width: 50px; + margin: 0 auto; + width: 100%; + margin: 135px; + font-size: 30px; + font-weight: 600; + letter-spacing: 2px; +} +div#go_to_login_page{ + margin-top: 20px; +} +.go_to_login_page{ + color:blue; + outline-color: none; + text-decoration: underline; + margin-left: 120px; +} + + + + diff --git a/Week3-Project/DeepakPahuja002/css/user_list.css b/Week3-Project/DeepakPahuja002/css/user_list.css new file mode 100644 index 0000000..e447c75 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/css/user_list.css @@ -0,0 +1,84 @@ +ul.navbar-nav{ + float: right; +} +.navbar-default{ + padding: 10px 40px; +} +.navbar-header{ + width: 200px; +} +.background_pic{ + min-height: 100%; + overflow-x: scroll; + background-image: url(https://images.unsplash.com/photo-1536553176585-67a46418b7d1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=882&q=80); + background-repeat: no-repeat; + background-position: center center; + background-attachment: fixed; + background-size: cover; + width: 100%; + +} +.overlay { + background-color: rgba(0, 0, 0, 0.7); + top: 0; + left: 0; + width: 100%; + height: 100vh; + position: relative; + z-index: 1; + overflow-x: scroll; + +} +.navbar-default .navbar-nav>li>a{ + color: white; +} +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover{ + color: black; + font-weight: 600; + background-color: greenyellow; + border-radius: 10px; +} +.navbar-nav>li{ + border-radius: 15px; +} +.active{ + background-color: green; + color: green; +} + + +////////////////////////////////// Navbar code above this point ////////////////////////////// + + + +.create_your_profile_heading{ + text-align: center; + font-size: 30px; + letter-spacing: 2px; +} +.container{ + background-color: white; + color: black; + border-radius: 25px; + padding: 20px; + max-width: 1000px; +} +.container .row{ + padding: 10px; + border-radius: 15px; +} +input.form-control{ + border-color: black; +} +div.form_heading, .main_heading{ + /* width: 100%; */ + background-color: #000; + color: white; + margin-bottom: 20px; + text-transform: uppercase; +} +.main_heading{ + margin-top: 10px; + margin-bottom: 40px; + background-color: green; +} diff --git a/Week3-Project/DeepakPahuja002/images/profile-talent-ant-simpson-feature.jpg b/Week3-Project/DeepakPahuja002/images/profile-talent-ant-simpson-feature.jpg new file mode 100644 index 0000000..6a3c1cf Binary files /dev/null and b/Week3-Project/DeepakPahuja002/images/profile-talent-ant-simpson-feature.jpg differ diff --git a/Week3-Project/DeepakPahuja002/index.html b/Week3-Project/DeepakPahuja002/index.html new file mode 100644 index 0000000..cae74a0 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/index.html @@ -0,0 +1,64 @@ + + + + + + + LogIn Page + + + + + + + +
+
+
+ + + + + + +
+
+ +
+ + + \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/js/create_user.js b/Week3-Project/DeepakPahuja002/js/create_user.js new file mode 100644 index 0000000..7df89ab --- /dev/null +++ b/Week3-Project/DeepakPahuja002/js/create_user.js @@ -0,0 +1,39 @@ +$(document).ready(function(){ + $("#createNewUser").click(createNewUser); + var getUrl = function getUrl(param){ + var pageUrl = window.location.search.substring(1); + var urlVariables = pageUrl.split("&"); + var parameterName; + var i; + for(i=0; i' + (i+1) + + '' + data[i].EmployeeId + '' + + '' + data[i].Name + + '' + data[i].Designation + + '' + SignUpData[i].EmailId + + '' + data[i].PhoneNo + + '' + ); + } + } + }); + } + }); +}); \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/js/login.js b/Week3-Project/DeepakPahuja002/js/login.js new file mode 100644 index 0000000..e9ed759 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/js/login.js @@ -0,0 +1,20 @@ +$(document).ready(function(){ + $("#LoginBtn").click(Login); + function Login(){ + var EmailId = document.getElementById("EmailId"); + var Password = document.getElementById("Password"); + $.ajax({ + type: 'GET', + url: 'http://localhost:64061/api/SignUps', + success: function(data) { + for(i=0; i + + + + + LogIn Page + + + + + + + +
+
+
+ + + + + +
+
+
LIST OF ALL USERS
+
+
+ + + + + + + + + + + + + +
#Employee IdNameDesignationEmail IdPhone No.
+
+
+
+ + +
+
+
+ +
+ + + \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/login.html b/Week3-Project/DeepakPahuja002/login.html new file mode 100644 index 0000000..befe0ba --- /dev/null +++ b/Week3-Project/DeepakPahuja002/login.html @@ -0,0 +1,90 @@ + + + + + + + LogIn Page + + + + + + + + +
+
+
+ + + + + + +
+ + +
+
+
+
+ + +
+
+ + +
+
+ + Forgot Password ? +
+ + +
+
+
+
+ +
+
+
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/required_user.html b/Week3-Project/DeepakPahuja002/required_user.html new file mode 100644 index 0000000..9b76436 --- /dev/null +++ b/Week3-Project/DeepakPahuja002/required_user.html @@ -0,0 +1,219 @@ + + + + + + + LogIn Page + + + + + + + + +
+
+
+ + + + + +
+
+
+
+ +
+
+ Deepak Pahuja Profile + +
+
+ + + + + + + +
+
+
User Information
+ + + +
+
Employee ID -   +
+
Name -   +
+
+ + + +
+
Designation -   +
+
Phone No. -   +
+
+ +
+
Email Id -   +
+
+
+
+ + + + + + + + + + + + + +
+
+
+
+ + + \ No newline at end of file diff --git a/Week3-Project/DeepakPahuja002/signup.html b/Week3-Project/DeepakPahuja002/signup.html new file mode 100644 index 0000000..b44e6ad --- /dev/null +++ b/Week3-Project/DeepakPahuja002/signup.html @@ -0,0 +1,94 @@ + + + + + + + LogIn Page + + + + + + + +
+
+
+ + + + + + + +
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + + + +
+
+
+
+
+ +
+ + + \ No newline at end of file